-
Notifications
You must be signed in to change notification settings - Fork 195
/
Copy pathcommon.jsonnet
127 lines (107 loc) · 3.82 KB
/
common.jsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
local common = (import "ci/common.jsonnet");
local jdks = {
jdk21:: common.jdks["labsjdk-ee-21"] + {
jdk:: 'jdk' + super.jdk_version,
},
jdklatest:: common.jdks["labsjdk-ee-latest"] + {
jdk:: 'jdklatest',
},
};
local targets = {
deploy:: {targets+: ['deploy'], targetName:: 'deploy'},
gate:: {targets+: ['gate'], targetName:: 'gate'},
postMerge:: {targets+: ['post-merge'], targetName:: 'postmerge'},
daily:: {targets+: ['daily'], targetName:: 'daily'},
weekly:: {targets+: ['weekly'], targetName:: 'weekly'},
ondemand:: {targets+: ['ondemand'], targetName:: 'ondemand'},
bench:: self.postMerge + {targets+: ['bench'], targetName:: super.targetName + "-bench"},
dailyBench:: self.daily + {targets+: ['bench'], targetName:: super.targetName + "-bench"},
weeklyBench:: self.weekly + {targets+: ['bench'], targetName:: super.targetName + "-bench"},
ondemandBench:: self.ondemand + {targets+: ['bench'], targetName:: super.targetName + "-bench"},
};
jdks +
targets +
{
jdks:: jdks,
targets:: targets,
deps:: common.deps,
common_deps:: common.deps.sulong + {
catch_files+: [
'npm-debug.log', // created on npm errors
],
environment+: {
GRAALVM_CHECK_EXPERIMENTAL_OPTIONS: "true",
},
},
linux_common:: self.common_deps + {
packages+: {
maven: '==3.3.9',
},
},
darwin_common:: self.common_deps + self.maven_download,
windows_common:: self.common_deps + self.maven_download,
# for cases where a maven package is not easily accessible
maven_download:: {
downloads+: {
MAVEN_HOME: {name: 'maven', version: '3.3.9', platformspecific: false},
},
local is_windows = 'os' in self && self.os == 'windows',
environment+: {
PATH: if is_windows then '$MAVEN_HOME\\bin;$JAVA_HOME\\bin;$PATH' else '$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH',
},
},
linux_amd64:: common.linux_amd64 + self.linux_common,
e3:: self.linux_amd64 + {
capabilities+: ['tmpfs25g', 'e3'],
},
linux_aarch64:: common.linux_aarch64 + self.linux_common,
darwin_amd64:: common.darwin_amd64 + self.darwin_common + {
environment+: {
// for compatibility with macOS BigSur
MACOSX_DEPLOYMENT_TARGET: '11.0',
},
},
darwin_aarch64:: common.darwin_aarch64 + self.darwin_common + {
environment+: {
// for compatibility with macOS BigSur
MACOSX_DEPLOYMENT_TARGET: '11.0',
},
},
windows_amd64:: common.windows_amd64 + self.windows_common + {
packages+: common.devkits["windows-" + (if self.jdk_name == "jdk-latest" then "jdkLatest" else self.jdk_name)].packages,
local devkit_version = std.filterMap(function(p) std.startsWith(p, 'devkit:VS'), function(p) std.substr(p, std.length('devkit:VS'), 4), std.objectFields(self.packages))[0],
environment+: {
DEVKIT_VERSION: devkit_version,
},
},
gateCmd:: ['mx', 'gate', '-B=--force-deprecation-as-warning', '-B=-A-J-Dtruffle.dsl.SuppressWarnings=truffle'],
gateCmdWithTags:: self.gateCmd + ['--tags', '${TAGS}'],
build:: {
run+: [
['mx', 'build', '--force-javac'],
],
},
buildCompiler:: {
run+: [
['mx', '--dynamicimports', '/compiler', 'build', '--force-javac'],
],
},
gateTags:: {
run+: [
$.gateCmdWithTags,
],
timelimit: if 'timelimit' in super then super.timelimit else '45:00',
},
gateStyleFullBuild:: common.deps.pylint + common.deps.black + common.deps.eclipse + common.deps.jdt + common.deps.spotbugs + {
local is_jdk_latest = 'jdk_name' in self && self.jdk_name == 'jdk-latest',
local strict = !is_jdk_latest,
components+: ['style'],
environment+: {
TAGS: 'style,fullbuild',
},
run+: [
$.gateCmdWithTags + (if strict then ['--strict-mode'] else []),
],
timelimit: if 'timelimit' in super then super.timelimit else '45:00',
},
}