Skip to content

Commit 6af23b2

Browse files
committed
[GR-13923] Refactor ci files.
PullRequest: fastr/1916
2 parents 8716afd + 15ff875 commit 6af23b2

File tree

2 files changed

+48
-44
lines changed

2 files changed

+48
-44
lines changed

ci.hocon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include "ci_common/common.hocon"
88
# The standard set of gate builds. N.B. the style/builtin checks are only run on Linux as they are not OS-dependent.
99

1010
# in case you do not want to enforce a specific overlay commit, comment:
11-
overlay = "0b367cfd0464913874ec1067d1f579d0f37b9a6f"
11+
overlay = "f2f27ae819a1f8ce3398aaf43c79aec358acd0a2"
1212
builds = [
1313
${gateTestLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64"}
1414
${gateTestNoDSLCacheLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64-no-dsl-cache"}

ci_common/common.hocon

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,23 @@ logfiles : [
5050
# on the CI cluster. Not all of the modules are needed by FastR but all are needed by the
5151
# embedded GNU R that is built within FastR.
5252

53-
pkgEnvironment: {
53+
environmentLinux: {
5454
environment : {
55-
PKG_INCLUDE_FLAGS_OVERRIDE : """-I/cm/shared/apps/zlib/1.2.11/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/curl/7.50.1/include"""
56-
PKG_LDFLAGS_OVERRIDE : """-L/cm/shared/apps/zlib/1.2.11/lib -L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/4.9.1/lib64"""
57-
TZDIR: "/usr/share/zoneinfo"
55+
PKG_INCLUDE_FLAGS_OVERRIDE : "-I/cm/shared/apps/zlib/1.2.11/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/curl/7.50.1/include"
56+
PKG_LDFLAGS_OVERRIDE : "-L/cm/shared/apps/zlib/1.2.11/lib -L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/4.9.1/lib64"
57+
TZDIR: "/usr/share/zoneinfo"
5858
}
5959
}
6060

61-
packagesLinux : ${pkgEnvironment} {
61+
environmentDarwin : {
62+
environment : {
63+
PATH : "/usr/local/bin:$JAVA_HOME/bin:$PATH"
64+
F77: "/usr/local/bin/gfortran-4.9"
65+
TZDIR: "/usr/share/zoneinfo"
66+
}
67+
}
68+
69+
packagesLinux : {
6270
packages : {
6371
git : ">=1.8.3"
6472
mercurial : ">=2.2"
@@ -80,25 +88,28 @@ packagesDarwin : {
8088
"pip:pylint" : "==1.1.0"
8189
"pip:ninja_syntax" : "==1.7.2"
8290
"pcre" : "==8.38"
91+
"homebrew/gcc" : "==4.9"
8392
}
8493

85-
# Common settings for all builds but note that it uses the Linux package settings,
86-
# so these must be overridden in any darwin builds
94+
# Common settings for all builds
8795

88-
common : ${java8Downloads} ${packagesLinux} {
96+
common : ${java8Downloads} {
8997
logs: ${logfiles}
9098
catch_files : [
9199
"Graal diagnostic output saved in (?P<filename>.+\.zip)"
92100
]
93101
timelimit : "1:00:00"
94102
environment : {
95-
FASTR_TEST_trace_tests : "true"
96-
PKG_TEST_ENV_miniUI : "LC_ALL=C"
97-
PKG_TEST_ENV_compare : "LC_ALL=C"
98-
FASTR_OPTION_PrintErrorStacktracesToFile: "true"
103+
FASTR_TEST_trace_tests : "true"
104+
PKG_TEST_ENV_miniUI : "LC_ALL=C"
105+
PKG_TEST_ENV_compare : "LC_ALL=C"
106+
FASTR_OPTION_PrintErrorStacktracesToFile: "true"
99107
}
100108
}
101109

110+
commonLinux: ${common} ${packagesLinux} ${environmentLinux}
111+
commonDarwin: ${common} ${packagesDarwin} ${environmentDarwin}
112+
102113
# Every "pull request" (PR) is subject to a series of "gate" commands that must pass
103114
# for the PR to be accepted into the master branch. The gate commands are run under
104115
# the "mx" tool. This defines a common prefix for all gate commands. The "-t"
@@ -110,17 +121,24 @@ gateCmd : ["mx", "-v", "--strict-compliance", "rgate", "-B=--force-deprecation-a
110121

111122
# The standard set of gate tasks: the actual executable tests are in the "UnitTests" task.
112123

113-
gateTestCommon : ${common} {
124+
gateTestCommon : {
114125
run : [
115126
${gateCmd} ["Versions,JDKReleaseInfo,BuildJavaWithJavac,UnitTests: with specials,Rembedded"]
116127
]
117128
}
118129

119-
gateTestLinux : ${gateTestCommon} {
130+
gateTestLinux : ${gateTestCommon} ${commonLinux}
131+
132+
gateTestDarwin : ${gateTestCommon} ${commonDarwin} {
133+
setup : [
134+
[set-export, PKG_INCLUDE_FLAGS_OVERRIDE, "-I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/curl/7.50.1/include"]
135+
[set-export, MOD_LIB_PATH, [echo, "${LD_LIBRARY_PATH}", |, tr, "\:", "\\n", |, grep, lib/gcc, |, tail, "-1"]]
136+
[set-export, PKG_LDFLAGS_OVERRIDE, "-L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L${MOD_LIB_PATH} -L/usr/lib"]
137+
]
120138
}
121139

122-
gateTestNoDSLCacheLinux : ${common} {
123-
environment : ${common.environment} {
140+
gateTestNoDSLCacheLinux : ${commonLinux} {
141+
environment : ${common.environment} ${environmentLinux.environment} {
124142
FASTR_RELEASE: "true", # release build so that we also tests recommended pkgs installation
125143
FASTR_OPTION_DSLCacheSizeFactor: "0"
126144
}
@@ -131,14 +149,14 @@ gateTestNoDSLCacheLinux : ${common} {
131149
]
132150
}
133151

134-
gateTestNoSpecialsLinux : ${common} {
152+
gateTestNoSpecialsLinux : ${commonLinux} {
135153
run : [
136154
${gateCmd} ["Versions,JDKReleaseInfo,BuildJavaWithJavac,UnitTests: no specials"]
137155
]
138156
}
139157

140-
gateTestNoDSLCacheNoSpecialsLinux : ${common} {
141-
environment : ${common.environment} {
158+
gateTestNoDSLCacheNoSpecialsLinux : ${commonLinux} {
159+
environment : ${common.environment} ${environmentLinux.environment} {
142160
FASTR_RELEASE: "true", # release build so that we also tests recommended pkgs installation
143161
FASTR_OPTION_DSLCacheSizeFactor: "0"
144162
}
@@ -149,22 +167,8 @@ gateTestNoDSLCacheNoSpecialsLinux : ${common} {
149167
]
150168
}
151169

152-
darwinEnvironment : {
153-
environment : {
154-
PATH : "/usr/local/bin:$JAVA_HOME/bin:$PATH"
155-
F77: "/usr/local/bin/gfortran-4.9"
156-
TZDIR: "/usr/share/zoneinfo"
157-
PKG_INCLUDE_FLAGS_OVERRIDE : """-I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/curl/7.50.1/include"""
158-
PKG_LDFLAGS_OVERRIDE : """-L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/4.9.1/lib64 -L/usr/local/Cellar/[email protected]/4.9.4/lib/gcc/4.9/ -L/usr/lib"""
159-
}
160-
}
161-
162-
gateTestDarwin : ${gateTestCommon} ${darwinEnvironment} {
163-
packages : ${packagesDarwin}
164-
}
165-
166-
gateTestLinuxNFI : ${gateTestCommon} {
167-
environment : {
170+
gateTestLinuxNFI : ${gateTestLinux} {
171+
environment : ${common.environment} ${environmentLinux.environment} {
168172
FASTR_RFFI : "nfi"
169173
TZDIR: "/usr/share/zoneinfo"
170174
}
@@ -177,7 +181,7 @@ requireGCC: {
177181
}
178182
}
179183

180-
gateTestJava9Linux : ${java9Downloads} ${gateTestCommon} {
184+
gateTestJava9Linux : ${java9Downloads} ${gateTestLinux} {
181185
downloads : {
182186
JAVA_HOME : ${java9Downloads.downloads.JAVA_HOME}
183187
EXTRA_JAVA_HOMES : ${java9Downloads.downloads.EXTRA_JAVA_HOMES}
@@ -186,15 +190,15 @@ gateTestJava9Linux : ${java9Downloads} ${gateTestCommon} {
186190

187191
# This performs a number of "style" checks on the code to ensure it confirms to the project standards.
188192

189-
gateStyle : ${common} {
193+
gateStyle : ${commonLinux} {
190194
# need pyhocon fix
191195
downloads : {
192196
JAVA_HOME : ${java8Downloads.downloads.JAVA_HOME}
193197
EXTRA_JAVA_HOMES : ${java8Downloads.downloads.EXTRA_JAVA_HOMES}
194198
JDT : {name: ecj, version: "4.5.1", platformspecific: false}
195199
ECLIPSE : {name: eclipse, version: "4.5.2", platformspecific: true}
196200
}
197-
environment : {
201+
environment : ${common.environment} ${environmentLinux.environment} {
198202
ECLIPSE_EXE : "$ECLIPSE/eclipse"
199203
}
200204
run : [
@@ -204,15 +208,15 @@ gateStyle : ${common} {
204208
]
205209
}
206210

207-
gateBuildWithEcj : ${common} {
211+
gateBuildWithEcj : ${commonLinux} {
208212
# need pyhocon fix
209213
downloads : {
210214
JAVA_HOME : ${java8Downloads.downloads.JAVA_HOME}
211215
EXTRA_JAVA_HOMES : ${java8Downloads.downloads.EXTRA_JAVA_HOMES}
212216
JDT : {name: ecj, version: "4.5.1", platformspecific: false}
213217
ECLIPSE : {name: eclipse, version: "4.5.2", platformspecific: true}
214218
}
215-
environment : {
219+
environment : ${common.environment} ${environmentLinux.environment} {
216220
ECLIPSE_EXE : "$ECLIPSE/eclipse"
217221
}
218222
run : [
@@ -222,23 +226,23 @@ gateBuildWithEcj : ${common} {
222226

223227
# This check runs diagnostics on the implementation of the R "builtins" in FastR, e.g., that the argument processing is sound.
224228

225-
rbcheck : ${common} {
229+
rbcheck : ${commonLinux} {
226230
run : [
227231
${gateCmd} ["Versions,JDKReleaseInfo,BuildJavaWithJavac"]
228232
["mx", "rbcheck"]
229233
["mx", "rbdiag"]
230234
]
231235
}
232236

233-
internalPkgtest: ${common} {
237+
internalPkgtest: ${commonLinux} {
234238
run : [
235239
["mx", "build"]
236240
["mx", "pkgtest", "--verbose", "--repos", "FASTR", "--pkg-filelist", "com.oracle.truffle.r.test.native/packages/pkg-filelist"]
237241
]
238242
logs: ${common.logs}
239243
}
240244

241-
gnurTests: ${common} {
245+
gnurTests: ${commonLinux} {
242246
run : [
243247
["mx", "build"]
244248
["mx", "gnu-rtests"]

0 commit comments

Comments
 (0)