Skip to content

Commit 860c909

Browse files
committed
[GR-68212] [GR-68313] Add deps.maven and deps.windows_devkit in ci/common.jsonnet and add mx maven-deploy-public-repo-dir in sdk
PullRequest: graal/21765
2 parents 924c962 + 413e7c9 commit 860c909

File tree

5 files changed

+33
-13
lines changed

5 files changed

+33
-13
lines changed

ci/ci_common/common.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ common + common.frequencies + {
138138
linux_amd64: common.linux_amd64 + graal_common_extras + linux_deps_extras,
139139
linux_amd64_ol9: common.linux_amd64_ol9 + graal_common_extras + linux_deps_extras,
140140
linux_amd64_ubuntu: common.linux_amd64_ubuntu + graal_common_extras,
141-
linux_aarch64: linux_deps_extras + common.linux_aarch64 + graal_common_extras,
142-
linux_aarch64_ol9: linux_deps_extras + common.linux_aarch64_ol9 + graal_common_extras,
141+
linux_aarch64: common.linux_aarch64 + graal_common_extras + linux_deps_extras,
142+
linux_aarch64_ol9: common.linux_aarch64_ol9 + graal_common_extras + linux_deps_extras,
143143
darwin_amd64: common.darwin_amd64 + graal_common_extras,
144144
darwin_aarch64: common.darwin_aarch64 + graal_common_extras,
145145
windows_amd64: common.windows_amd64 + graal_common_extras,

ci/common.jsonnet

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ local common_json = import "../common.json";
110110
oraclejdkLatest: self["oraclejdk-latest"],
111111
},
112112

113-
# The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)
113+
# The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js).
114+
# See deps.windows_devkit to add a devkit on windows conveniently.
114115
devkits: {
115116
"windows-jdk17": { packages+: { "devkit:VS2022-17.1.0+1": "==0" }},
116117
"windows-jdk19": { packages+: { "devkit:VS2022-17.1.0+1": "==0" }},
@@ -175,6 +176,12 @@ local common_json = import "../common.json";
175176

176177
# These dependencies are not included by default in any platform object
177178

179+
# Not included by default in $.windows_amd64 and $.windows_server_2016_amd64 because it needs jdk_name.
180+
# As a note, Native Image needs this to build.
181+
windows_devkit:: {
182+
packages+: if self.os == "windows" then $.devkits["windows-" + self.jdk_name].packages else {},
183+
},
184+
178185
eclipse: {
179186
downloads+: {
180187
ECLIPSE: {
@@ -240,6 +247,21 @@ local common_json = import "../common.json";
240247
} else {},
241248
},
242249

250+
maven:: {
251+
local this = self,
252+
packages+: (if self.os == "linux" && self.arch == "amd64" then {
253+
maven: '==3.9.10',
254+
} else {}),
255+
# no maven package available on other platforms
256+
downloads+: (if self.os != "linux" || self.arch != "amd64" then {
257+
# GR-68921: 3.9.10 does not work on Windows
258+
MAVEN_HOME: {name: 'maven', version: (if this.os == "windows" then '3.3.9' else '3.9.10'), platformspecific: false},
259+
} else {}),
260+
setup+: (if self.os != "linux" || self.arch != "amd64" then [
261+
['set-export', 'PATH', (if self.os == "windows" then '$MAVEN_HOME\\bin;$PATH' else '$MAVEN_HOME/bin:$PATH')],
262+
] else []),
263+
},
264+
243265
sulong:: self.cmake + {
244266
packages+: if self.os == "windows" then {
245267
msvc_source: "==14.0",
@@ -276,12 +298,11 @@ local common_json = import "../common.json";
276298
} else {},
277299
},
278300

279-
graalpy:: self.gradle + self.cmake + {
301+
graalpy:: self.gradle + self.cmake + self.maven + {
280302
packages+: if (self.os == "linux") then {
281303
libffi: '==3.2.1',
282304
bzip2: '==1.0.6',
283305
zlib: '==1.2.11',
284-
maven: "==3.6.3",
285306
} else {},
286307
},
287308

sdk/mx.sdk/mx_sdk.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ def description(self):
341341
def maven_deploy_public_repo_dir():
342342
return os.path.join(_suite.get_mx_output_dir(), 'public-maven-repo')
343343

344+
@mx.command(_suite.name, 'maven-deploy-public-repo-dir')
345+
def print_maven_deploy_public_repo_dir(args):
346+
print(maven_deploy_public_repo_dir())
347+
344348
@mx.command(_suite.name, 'maven-deploy-public')
345349
def maven_deploy_public(args, licenses=None, deploy_snapshots=True):
346350
"""Helper to simplify deploying all public Maven dependendencies into the mxbuild directory"""
@@ -373,7 +377,6 @@ def maven_deploy_public(args, licenses=None, deploy_snapshots=True):
373377
mx.log(f'mx maven-deploy {" ".join(deploy_args)}')
374378
mx.maven_deploy(deploy_args)
375379
mx.log(f'Deployed Maven artefacts to {path}')
376-
return path
377380

378381
@mx.command(_suite.name, 'nativebridge-benchmark')
379382
def nativebridge_benchmark(args):

sulong/ci/ci_common/sulong-common.jsonnet

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ local sulong_deps = common.deps.sulong;
8080
linux_aarch64:: linux_aarch64 + sulong_deps,
8181
darwin_amd64:: darwin_amd64 + sulong_deps,
8282
darwin_aarch64:: darwin_aarch64 + sulong_deps,
83-
windows_amd64:: windows_amd64 + sulong_deps + {
84-
local jdk = if self.jdk_name == "jdk-latest" then "jdkLatest" else self.jdk_name,
85-
packages+: common.devkits["windows-" + jdk].packages
86-
},
83+
windows_amd64:: windows_amd64 + sulong_deps + common.deps.windows_devkit,
8784

8885
sulong_notifications:: {
8986
notify_groups:: ["sulong"],

tools/ci/ci.jsonnet

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
local common = import '../../ci/ci_common/common.jsonnet',
33
local utils = import '../../ci/ci_common/common-utils.libsonnet',
44
local top_level_ci = utils.top_level_ci,
5-
local devkits = common.devkits,
65

76
local tools_common = {
87
setup+: [
@@ -92,8 +91,8 @@
9291
common.linux_aarch64 + common.labsjdkLatest + tools_weekly,
9392
common.linux_aarch64 + common.labsjdk21 + tools_weekly,
9493

95-
common.windows_amd64 + common.oraclejdkLatest + tools_weekly + devkits["windows-jdkLatest"],
96-
common.windows_amd64 + common.oraclejdk21 + tools_weekly + devkits["windows-jdk21"],
94+
common.windows_amd64 + common.oraclejdkLatest + tools_weekly + common.deps.windows_devkit,
95+
common.windows_amd64 + common.oraclejdk21 + tools_weekly + common.deps.windows_devkit,
9796

9897
common.darwin_amd64 + common.oraclejdkLatest + tools_weekly,
9998
common.darwin_amd64 + common.oraclejdk21 + tools_weekly,

0 commit comments

Comments
 (0)