Skip to content

Commit

Permalink
Update common CI files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ansalond committed Sep 21, 2023
1 parent 521ff72 commit 5833684
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
28 changes: 22 additions & 6 deletions ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ local common_json = import "../common.json";
{
# JDK definitions
# ***************
local jdk_base = {
name: error "name not set", # string; The JDK provider, e.g. "jpg-jdk", "labsjdk"
version: error "version not set", # string; Full version string, e.g., "ce-21+35-jvmci-23.1-b15"
jdk_version:: error "jdk_version not set", # int; The major JDK version, e.g., 21
jdk_name:: "jdk%d" % self.jdk_version, # string; The major JDK version with the JDK prefix.
# For the latest (unreleased) this should be overridden with "jdk-latest"
# otherwise the jdk_version with the "jdk" prefix, e.g., "jdk21".
# This should be use for constructing CI job names.
# Optional:
# "build_id": "33",
# "release": true,
# "platformspecific": true,
# "extrabundles": ["static-libs"],
},
# ***************
local variants(name) = [name, name + "Debug", name + "-llvm"],
# gets the JDK major version from a labsjdk version string (e.g., "ce-21+35-jvmci-23.1-b15" -> 21)
local parse_labsjdk_version(version) =
Expand All @@ -21,21 +36,21 @@ local common_json = import "../common.json";
std.parseInt(number_prefix(version[3:]))
,
local jdks_data = {
oraclejdk11: common_json.jdks["oraclejdk11"] + { jdk_version:: 11 },
oraclejdk11: jdk_base + common_json.jdks["oraclejdk11"] + { jdk_version:: 11 },
} + {
[name]: common_json.jdks[name] + { jdk_version:: 17 }
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 17 }
for name in ["oraclejdk17"] + variants("labsjdk-ce-17") + variants("labsjdk-ee-17")
} + {
[name]: common_json.jdks[name] + { jdk_version:: 19 }
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 19 }
for name in ["oraclejdk19"] + variants("labsjdk-ce-19") + variants("labsjdk-ee-19")
} + {
[name]: common_json.jdks[name] + { jdk_version:: 20 }
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 20 }
for name in ["oraclejdk20"] + variants("labsjdk-ce-20") + variants("labsjdk-ee-20")
} + {
[name]: common_json.jdks[name] + { jdk_version:: 21 }
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 21 }
for name in ["oraclejdk21"] + variants("labsjdk-ce-21") + variants("labsjdk-ee-21")
} + {
[name]: common_json.jdks[name] + { jdk_version:: parse_labsjdk_version(self.version)}
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: parse_labsjdk_version(self.version), jdk_name:: "jdk-latest"}
for name in variants("labsjdk-ce-latest") + variants("labsjdk-ee-latest")
},
assert std.assertEqual(std.objectFields(common_json.jdks), std.objectFields(jdks_data)),
Expand All @@ -50,6 +65,7 @@ local common_json = import "../common.json";
[if std.endsWith(name, "llvm") then "LLVM_JAVA_HOME" else "JAVA_HOME"]: jdks_data[name]
},
jdk_version:: jdks_data[name].jdk_version,
jdk_name:: jdks_data[name].jdk_name,
},
for name in std.objectFields(jdks_data)
} + {
Expand Down
12 changes: 6 additions & 6 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b15-debug", "platformspecific": true },
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b15-sulong", "platformspecific": true },

"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-22+13-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-22+13-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-22+13-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-22+13-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-22+13-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-22+13-jvmci-b01-sulong", "platformspecific": true }
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-22+15-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-22+15-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-22+15-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-22+15-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-22+15-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-22+15-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down

0 comments on commit 5833684

Please sign in to comment.