1
- local composable = ( import "common-utils.libsonnet" ).composable;
1
+ # This file is only shared between the graal and graal-enterprise repositories.
2
2
3
- local mx_version = (import "../../common.json" ).mx_version;
4
- local common_json = composable(import "../../common.json" );
3
+ local common = import "../common.jsonnet" ;
5
4
local repo_config = import '../repo-configuration.libsonnet' ;
6
- local jdks = common_json.jdks;
7
- local deps = common_json.deps;
8
- local downloads = common_json.downloads;
9
-
10
- # Finds the first integer in a string and returns it as an integer.
11
- local find_first_integer(versionString) =
12
- local charToInt(c) =
13
- std.codepoint (c) - std.codepoint ("0" );
14
- local firstNum(s, i) =
15
- assert std.length (s) > i : "No number found in string " + s;
16
- local n = charToInt(s[i]);
17
- if n >=0 && n < 10 then i else firstNum(s, i + 1 );
18
- local lastNum(s, i) =
19
- if i >= std.length (s) then
20
- i
21
- else
22
- local n = charToInt(s[i]);
23
- if n < 0 || n > 9 then i else lastNum(s, i + 1 );
24
- local versionIndexStart = firstNum(versionString, 0 );
25
- local versionIndexEnd = lastNum(versionString, versionIndexStart);
26
- std.parseInt (versionString[versionIndexStart: versionIndexEnd])
27
- ;
28
- # jdk_version is an hidden field that can be used to generate job names
29
- local add_jdk_version(name) =
30
- local jdk = jdks[name];
31
- // this assumes that the version is the first number in the jdk.version string
32
- local version = find_first_integer(jdk.version);
33
- // santity check that the parsed version is also included in the name
34
- assert std.length (std.findSubstr (std.toString (version), name)) == 1 : "Cannot find version %d in name %s" % [version, name];
35
- { jdk_version:: version }
36
- ;
37
-
38
- {
39
-
40
- mx:: {
41
- packages+: {
42
- mx: mx_version
43
- }
44
- },
45
-
46
- eclipse:: downloads.eclipse,
47
- jdt:: downloads.jdt,
48
- devkits:: common_json.devkits,
49
-
50
- svm_deps:: common_json.svm.deps + repo_config.native_image.extra_deps,
51
5
6
+ common + common.frequencies + {
52
7
build_base:: {
53
8
// holds location of CI resources that can easily be overwritten in an overlay
54
9
ci_resources:: (import "ci/ci_common/ci-resources.libsonnet" ),
55
10
},
56
11
57
- // Job frequencies
58
- // ***************
59
- on_demand:: {
60
- targets+: ["ondemand" ],
61
- },
62
- post_merge:: {
63
- targets+: ["post-merge" ],
64
- },
65
- daily:: {
66
- targets+: ["daily" ],
67
- },
68
- weekly:: {
69
- targets+: ["weekly" ],
70
- },
71
- monthly:: {
72
- targets+: ["monthly" ],
73
- },
74
-
75
12
# Add a guard to `build` that prevents it from running in the gate
76
13
# for a PR that only touches *.md files, the docs, are config files for GitHub
77
14
add_excludes_guard(build):: build + {
@@ -111,13 +48,7 @@ local add_jdk_version(name) =
111
48
}
112
49
},
113
50
114
- } + {
115
- // JDK definitions
116
- // ***************
117
- // this adds all jdks from common.json
118
- [name]: add_jdk_version(name) + { downloads+: { [if std.endsWith (name, "llvm" ) then "LLVM_JAVA_HOME" else "JAVA_HOME" ] : jdks[name] }},
119
- for name in std.objectFieldsAll (jdks)
120
- } + {
51
+ } + common.jdks + {
121
52
# Aliases to edition specific labsjdks
122
53
labsjdk17:: self ["labsjdk-" + repo_config.graalvm_edition + "-17" ],
123
54
labsjdk19:: self ["labsjdk-" + repo_config.graalvm_edition + "-19" ],
@@ -130,52 +61,28 @@ local add_jdk_version(name) =
130
61
labsjdk20Debug:: self ["labsjdk-" + repo_config.graalvm_edition + "-20Debug" ],
131
62
labsjdk20LLVM:: self ["labsjdk-" + repo_config.graalvm_edition + "-20-llvm" ],
132
63
133
-
134
64
// Hardware definitions
135
65
// ********************
136
- common:: deps.common + self .mx + {
137
- local where = if std.objectHas (self , "name" ) then " in " + self .name else "" ,
138
- # enforce self.os (useful for generating job names)
139
- os:: error "self.os not set" + where,
140
- # enforce self.arch (useful for generating job names)
141
- arch:: error "self.arch not set" + where,
142
- capabilities +: [],
143
- catch_files +: common_json.catch_files,
144
- logs +: [
66
+ local graal_common_extras = common.deps.pylint + {
67
+ logs+: [
145
68
"*.bgv" ,
146
- "./" + repo_config.compiler.compiler_suite + "/graal_dumps/*/*"
147
- ]
69
+ "./" + repo_config.compiler.compiler_suite + "/graal_dumps/*/*" ,
70
+ ],
71
+ timelimit: "30:00" ,
148
72
},
149
-
150
- ol7:: {
151
- docker+: {
152
- image: "buildslave_ol7" ,
153
- mount_modules: true ,
73
+ local linux_deps_extras = {
74
+ packages+: {
75
+ "apache/ant" : ">=1.9.4" ,
154
76
},
155
77
},
156
78
157
- linux:: deps.linux + self .common + {os:: "linux" , capabilities+: [self .os]},
158
- darwin:: deps.darwin + self .common + {os:: "darwin" , capabilities+: [self .os]},
159
- windows:: deps.windows + self .common + {os:: "windows" , capabilities+: [self .os]},
160
- windows_server_2016:: self .windows + {capabilities+: ["windows_server_2016" ]},
161
-
162
- amd64:: { arch:: "amd64" , capabilities+: [self .arch]},
163
- aarch64:: { arch:: "aarch64" , capabilities+: [self .arch]},
164
-
165
- linux_amd64:: self .linux + self .amd64 + self .ol7,
166
- darwin_amd64:: self .darwin + self .amd64,
167
- darwin_aarch64:: self .darwin + self .aarch64 + {
168
- # only needed until GR-22580 is resolved?
169
- python_version: 3 ,
170
- },
171
- windows_amd64:: self .windows + self .amd64,
172
- windows_server_2016_amd64:: self .windows_server_2016 + self .amd64,
173
- linux_aarch64:: self .linux + self .aarch64,
79
+ linux_amd64: linux_deps_extras + common.linux_amd64 + graal_common_extras,
80
+ linux_aarch64: linux_deps_extras + common.linux_aarch64 + graal_common_extras,
81
+ darwin_amd64: common.darwin_amd64 + graal_common_extras,
82
+ darwin_aarch64: common.darwin_aarch64 + graal_common_extras,
83
+ windows_amd64: common.windows_amd64 + graal_common_extras,
84
+ windows_server_2016_amd64: common.windows_server_2016_amd64 + graal_common_extras,
174
85
86
+ // Other
175
87
mach5_target:: {targets+: ["mach5" ]},
176
-
177
- // Utils
178
- disable_proxies:: {
179
- setup+: [["unset" , "HTTP_PROXY" , "HTTPS_PROXY" , "FTP_PROXY" , "NO_PROXY" , "http_proxy" , "https_proxy" , "ftp_proxy" , "no_proxy" ]],
180
- },
181
88
}
0 commit comments