Skip to content

Commit 944ab3e

Browse files
committed
improved CI config
1 parent 2fc91b0 commit 944ab3e

File tree

2 files changed

+78
-68
lines changed

2 files changed

+78
-68
lines changed

.ci/ci.jsonnet

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# To process this file using Jsonnet commandline interpreter
2-
# Use the following command: jsonnet .ci/ci.jsonnet
1+
# This file is rendered into JSON with:
2+
#
3+
# sjsonnet .ci/ci.jsonnet
4+
#
5+
# See: https://github.com/databricks/sjsonnet/releases
36

4-
# https://github.com/graalvm/labs-openjdk/blob/master/doc/testing.md
7+
# JDK tests to run
58
local run_test_spec = 'test/hotspot/jtreg/compiler/jvmci test/jdk/tools/jlink/plugins/SaveJlinkArgfilesPluginTest.java';
69

7-
810
local common = import 'common.libsonnet';
911

1012
{
@@ -33,7 +35,7 @@ local common = import 'common.libsonnet';
3335
notify_emails: [defs.build_failure_notify],
3436
publishArtifacts: [
3537
{
36-
name: 'jdk-%s-%s-%s_tlda' % [release.name, major_java_version, release.version],
38+
name: 'jdk-%s-%s-%s_tlda' % [release.name, major_java_version, release.build],
3739
dir: '.',
3840
patterns: [prebuild_artifact_url],
3941
},
@@ -55,7 +57,7 @@ local common = import 'common.libsonnet';
5557
'--fingerprint=' + 'prebuild.fingerprint',
5658
'--graalvm-version=%s' % release.name,
5759
'--check-exists',
58-
release.version,
60+
release.build,
5961
'labsjdk-ee',
6062
'jdk_tlda',
6163
],
@@ -165,7 +167,7 @@ local common = import 'common.libsonnet';
165167

166168
local requireTLDAArtifacts = if edition == 'ee' then [
167169
{
168-
name: 'jdk-%s-%s-%s_tlda' % [release.name, major_java_version, release.version],
170+
name: 'jdk-%s-%s-%s_tlda' % [release.name, major_java_version, release.build],
169171
dir: '.',
170172
},
171173
] else [],
@@ -180,7 +182,7 @@ local common = import 'common.libsonnet';
180182
'--log=' + if os == 'windows' then 'info' else 'warn',
181183
'--java-major-version=' + major_java_version,
182184
'--java-build-number=' + build_number,
183-
'--jvmci-version=' + release.version,
185+
'--jvmci-version=' + release.build,
184186
'--boot-jdk=${BOOT_JDK}',
185187
'--patches=' + jdk_src_dir + '/patches.tar.gz',
186188
'--clean-after-build',
@@ -267,7 +269,7 @@ local common = import 'common.libsonnet';
267269
] + static_libs_platforms(major_java_version, release, defs), # For building musl boot JDKs
268270

269271
SourceBuild(java_version, release, defs):: common.LinuxAMD64(defs, java_version) + common.AMD64 + common.OCI + common.DefaultBootJDK + common.Packages + common.mxDependencies + {
270-
local jvmci_build_number = release.version,
272+
local jvmci_build_number = release.build,
271273
local repo_name = 'labsjdk-ee',
272274
local jdk_conf_name = 'linux-x86_64-server-release',
273275
local src_bundle_suffixes = ['', '-security'],
@@ -305,21 +307,21 @@ local common = import 'common.libsonnet';
305307
'--enable-jvm-feature-shenandoahgc',
306308
'--with-version-build=${JAVA_VERSION_BUILD}',
307309
'--with-version-pre=',
308-
'--with-version-opt=LTS-jvmci-' + release.name + '-' + release.version,
310+
'--with-version-opt=LTS-jvmci-' + release.name + '-' + release.build,
309311
],
310312
['make', 'source'],
311313
] +
312314
[self.copy_source_bundle(suffix) for suffix in src_bundle_suffixes] +
313315
[
314316
['zip', '-ur', '../results/jdk-${JAVA_VERSION}+${JAVA_VERSION_BUILD}_src.zip', '$BUILD_MAIN/closed/make/conf/*'],
315-
['tar', 'czf', '../' + 'labsjdk-ee-${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}-src.tar.gz' % [release.name, release.version], '../results'],
317+
['tar', 'czf', '../' + 'labsjdk-ee-${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}-src.tar.gz' % [release.name, release.build], '../results'],
316318
['cd', '$JDK_SOURCE/jvmci'],
317319
] +
318320
[self.unzip_source_bundle(suffix) for suffix in src_bundle_suffixes] +
319321
[
320322
[ 'sh', 'configure',
321323
'--with-version-pre=',
322-
'--with-version-opt=jvmci-' + release.version,
324+
'--with-version-opt=jvmci-' + release.build,
323325
'--with-devkit=$DEVKIT_ROOT',
324326
'--with-boot-jdk=$BOOT_JDK',
325327
'--with-version-build=${JAVA_VERSION_BUILD}',
@@ -330,10 +332,10 @@ local common = import 'common.libsonnet';
330332
['make', 'images', 'static-libs-bundles'],
331333
[
332334
'artifact_uploader.py',
333-
'../' + 'labsjdk-ee-${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}-src.tar.gz' % [release.name, release.version],
334-
'labsjdk/' + 'labsjdk-ee-${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}-src.tar.gz' % [release.name, release.version],
335+
'../' + 'labsjdk-ee-${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}-src.tar.gz' % [release.name, release.build],
336+
'labsjdk/' + 'labsjdk-ee-${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}-src.tar.gz' % [release.name, release.build],
335337
'labsjdk',
336-
'--version', '${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}' % [release.name, release.version],
338+
'--version', '${JAVA_VERSION}+${JAVA_VERSION_BUILD}-jvmci-%s-%s-${SNAPSHOT_ID}' % [release.name, release.build],
337339
'--jdk', java_version + '',
338340
'--revision', ['git', '-C', '$JDK_SOURCE/' + repo_name + '/open', 'rev-parse', 'HEAD'],
339341
'--edition', 'ee',
@@ -424,7 +426,7 @@ local common = import 'common.libsonnet';
424426
'--candidate-jvmci-release', '%s' % release.candidate_jvmci_release,
425427
'--graal-integration-branch', 'master',
426428
'--allow-missing', 'patches',
427-
'--upload-ce-artifact', '%s' % release.github_upload_labsjdk_ce,
429+
'--upload-ce-artifact', '%s' % release.github_upload,
428430
'--pass-snapshots-file', 'true',
429431
],
430432
],
@@ -456,11 +458,7 @@ local common = import 'common.libsonnet';
456458
run+: (if !is_musl_build then [
457459
# Checks that each devkit mentioned in this file corresponds to a devkit in make/conf/jib-profiles.js
458460
['python3', '-u', conf.path('${PWD}/.ci/check_devkit_versions.py')],
459-
] else []) + [
460-
['set-export', 'LABSJDK_BUILDER_DIR', conf.path('${PWD}/../labsjdk-builder')],
461-
['git', 'clone', '--quiet', '--config', 'core.autocrlf=input', defs.labsjdk_builder_url, '${LABSJDK_BUILDER_DIR}'],
462-
['git', '-C', '${LABSJDK_BUILDER_DIR}', 'checkout', common.labsjdk_builder_version],
463-
461+
] else []) + common.clone_labsjdk_builder(defs, conf.os == 'windows') + [
464462
# This restricts cygwin to be on the PATH only while using jib.
465463
# It must not be on the PATH when building Graal.
466464
['set-export', 'OLD_PATH', '${PATH}'],

.ci/common.libsonnet

Lines changed: 59 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,71 @@
1-
# One-off snapshots metadata
2-
local one_off_release = {
3-
name: '25.1',
4-
version: 'b10',
5-
candidate_jvmci_release: '25.0.1+8-jvmci-25.1-b10',
6-
github_upload_labsjdk_ce: 'true',
7-
java_versions: [25],
8-
musl: [25],
9-
llvm: [25],
10-
};
1+
{
2+
# The JVMCI releases that can be built from this repo.
3+
jvmci_releases:: [
4+
self.JVMCIRelease(name='25.1', build='b10', jdk_version='25.0.1+8', github_upload=true)
5+
],
6+
7+
# Specifies a JVMCI release.
8+
#
9+
# name:
10+
# The release name (see GR-70870). The value is an arbitrary string.
11+
# It may look like a version (e.g. "25.1") but can just as easily be
12+
# something like "Feature".
13+
# See: jdk.graal.compiler.hotspot.JVMCIVersionCheck.Version#releaseName
14+
#
15+
# build:
16+
# The JVMCI build number string (e.g. "b03" or "b10")
17+
# See: jdk.graal.compiler.hotspot.JVMCIVersionCheck.Version#jvmciBuild
18+
#
19+
# jdk_version:
20+
# The JDK version info to include in artifact names (e.g. "25.0.1+8")
21+
#
22+
# github_upload:
23+
# Controls whether the binaries are uploaded to GitHub (TBD: where? when?)
24+
#
25+
JVMCIRelease(name, build, jdk_version, github_upload):: {
26+
name: name,
27+
build: build,
28+
github_upload: github_upload,
1129

30+
# (TBD)
31+
candidate_jvmci_release: '%s-jvmci-%s-%s' % [jdk_version, name, build],
1232

13-
{
33+
# (TBD)
34+
has_musl_static_libs: true,
35+
36+
# (TBD)
37+
has_llvm_libs: false,
38+
},
1439

15-
labsjdk_builder_version:: '243066362288ec0c8557bf96140c2578630448cd',
16-
17-
# This function is used to clone closed and open JDK repository
18-
# Always checkout branch jdk25 for labsjdk-ee repository
19-
# Always checkout the revision defined in MAIN_REVISION environement variable for labsjdk-ce repository
20-
clone(defs, repo, release, dst_dir, is_windows=false, is_closed=false):: [
21-
['git', 'clone', '--config', 'core.autocrlf=input', '--quiet', defs.bitbucket_base_url + repo + '.git', dst_dir],
22-
] + (if is_closed then [
23-
['git', '-C', dst_dir, 'checkout', 'jdk25'],
24-
] else [
25-
['git', '-C', dst_dir, 'checkout', '${MAIN_REVISION}'],
26-
]),
27-
28-
# This function is used to clone labsjdk-builder repository
29-
clone_labsjdk_builder(defs, is_windows=false):: (if !is_windows then [
30-
['set-export', 'LABSJDK_BUILDER_DIR', '${PWD}/labsjdk-builder'],
31-
] else [
32-
['set-export', 'LABSJDK_BUILDER_DIR', '${PWD}' + '\\' + 'labsjdk-builder'],
33-
]) + [
34-
['git', 'clone', '--quiet', '--config', 'core.autocrlf=input', defs.labsjdk_builder_url, '${LABSJDK_BUILDER_DIR}'],
35-
['git', '-C', '${LABSJDK_BUILDER_DIR}', 'checkout', self.labsjdk_builder_version],
36-
],
40+
# Version of the labsjdk-builder scripts to use
41+
labsjdk_builder_version:: '243066362288ec0c8557bf96140c2578630448cd',
42+
43+
# Clones a JDK repository
44+
# If `!is_closed`, then the cloned repo is checked out to branch ${MAIN_REVISION}.
45+
# If `is_closed`, then the cloned repo is checked out to branch jdk25.
46+
clone(defs, repo, release, dst_dir, is_windows=false, is_closed=false):: [
47+
['git', 'clone', '--config', 'core.autocrlf=input', '--quiet', defs.bitbucket_base_url + repo + '.git', dst_dir],
48+
] + (if is_closed then [
49+
['git', '-C', dst_dir, 'checkout', 'jdk25'],
50+
] else [
51+
['git', '-C', dst_dir, 'checkout', '${MAIN_REVISION}'],
52+
]),
53+
54+
# Clones the labsjdk-builder repository to ${PWD}/labsjdk-builder
55+
clone_labsjdk_builder(defs, is_windows=false):: (if !is_windows then [
56+
['set-export', 'LABSJDK_BUILDER_DIR', '${PWD}/../labsjdk-builder'],
57+
] else [
58+
['set-export', 'LABSJDK_BUILDER_DIR', '${PWD}\\..\\labsjdk-builder'],
59+
]) + [
60+
['git', 'clone', '--quiet', '--config', 'core.autocrlf=input', defs.labsjdk_builder_url, '${LABSJDK_BUILDER_DIR}'],
61+
['git', '-C', '${LABSJDK_BUILDER_DIR}', 'checkout', self.labsjdk_builder_version],
62+
],
3763

3864
# Returns the value of the `name` field if it exists in `obj` otherwise `default`.
3965
get(obj, name, default=null)::
4066
if obj == null then default else
4167
if std.objectHas(obj, name) then obj[name] else default,
4268

43-
# Specifies a JVMCI release currently in development and
44-
JVMCIRelease(name, version, java_versions, candidate_jvmci_release, github_upload_labsjdk_ce, has_musl_static_libs, has_llvm_libs):: {
45-
name: name,
46-
version: version,
47-
java_versions: java_versions,
48-
candidate_jvmci_release: candidate_jvmci_release,
49-
github_upload_labsjdk_ce: github_upload_labsjdk_ce,
50-
has_musl_static_libs: has_musl_static_libs,
51-
has_llvm_libs: has_llvm_libs,
52-
},
53-
jvmci_releases:: [self.JVMCIRelease(one_off_release.name, one_off_release.version, one_off_release.java_versions, one_off_release.candidate_jvmci_release, one_off_release.github_upload_labsjdk_ce, true, false)],
54-
5569
# Returns true if `str` contains `needle` as a substring.
5670
contains(str, needle):: std.findSubstr(needle, str) != [],
5771

@@ -274,6 +288,4 @@ local one_off_release = {
274288
name+: '-aarch64',
275289
arch:: 'aarch64',
276290
},
277-
278-
279291
}

0 commit comments

Comments
 (0)