Skip to content

Commit

Permalink
[GR-26395] Periodic update of the graal import.
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/4025
  • Loading branch information
OracleLabsAutomation authored and eregon committed Oct 9, 2023
2 parents bb05e0b + e02aef0 commit 6c4c2df
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
31 changes: 26 additions & 5 deletions ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ local common_json = import "../common.json";
# ***************
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) =
local parse_labsjdk_version(jdk) =
if jdk.name == "jpg-jdk" then jdk.version else
local version = jdk.version;
assert std.startsWith(version, "ce-") || std.startsWith(version, "ee-") : "Unsupported labsjdk version: " + version;
local number_prefix(str) =
if std.length(str) == 0 || std.length(std.findSubstr(str[0], "0123456789")) == 0 then
Expand All @@ -35,6 +37,12 @@ local common_json = import "../common.json";
;
std.parseInt(number_prefix(version[3:]))
,
# gets the build_id from a labsjdk version string (e.g., "ce-21+35-jvmci-23.1-b15" -> 21)
local get_labsjdk_build_id(jdk) =
local _parts = std.split(jdk.version, "-");
local _version_build_id = std.split(_parts[1], "+");
_version_build_id[1]
,
local jdks_data = {
oraclejdk11: jdk_base + common_json.jdks["oraclejdk11"] + { jdk_version:: 11 },
} + {
Expand All @@ -50,10 +58,18 @@ local common_json = import "../common.json";
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 21 }
for name in ["oraclejdk21"] + variants("labsjdk-ce-21") + variants("labsjdk-ee-21")
} + {
[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")
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: parse_labsjdk_version(self), jdk_name:: "jdk-latest"}
for name in ["oraclejdk-latest"] + variants("labsjdk-ce-latest") + variants("labsjdk-ee-latest")
},
assert std.assertEqual(std.objectFields(common_json.jdks), std.objectFields(jdks_data)),
# Verify oraclejdk-latest and labsjdk-ee-latest versions match
assert
local _labsjdk = common_json.jdks["labsjdk-ee-latest"];
local _oraclejdk = common_json.jdks["oraclejdk-latest"];
local _ov = "ee-%s+%s" % [_oraclejdk.version, _oraclejdk.build_id];
local _lv = _labsjdk.version;
assert std.startsWith(_lv, _ov) : "update oraclejdk-latest to match labsjdk-ee-latest: %s+%s vs %s" % [_oraclejdk.version, _oraclejdk.build_id, _labsjdk.version];
true,

# The raw jdk data, the same as common_json.jdks + { jdk_version:: }
jdks_data: jdks_data,
Expand All @@ -76,8 +92,13 @@ local common_json = import "../common.json";
labsjdk20ce: self["labsjdk-ce-20"],
labsjdk20ee: self["labsjdk-ee-20"],

labsjdkLatestCE: self["labsjdk-ce-21"],
labsjdkLatestEE: self["labsjdk-ee-21"],
labsjdk21ce: self["labsjdk-ce-21"],
labsjdk21ee: self["labsjdk-ee-21"],

labsjdkLatestCE: self["labsjdk-ce-latest"],
labsjdkLatestEE: self["labsjdk-ee-latest"],

oraclejdkLatest: self["oraclejdk-latest"],
},

# The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)
Expand Down
1 change: 1 addition & 0 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"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 },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "22", "build_id": "16", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-22+16-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-22+16-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-22+16-jvmci-b01-sulong", "platformspecific": true },
Expand Down
4 changes: 2 additions & 2 deletions mx.truffleruby/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"name": "regex",
"subdir": True,
"version": "b1a2f4c7fd54238c532ea5437f8dac42f386e1e3",
"version": "c1b45e412a198f635e468e9906bc9103a7ea9c3a",
"urls": [
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
Expand All @@ -29,7 +29,7 @@
{
"name": "sulong",
"subdir": True,
"version": "b1a2f4c7fd54238c532ea5437f8dac42f386e1e3",
"version": "c1b45e412a198f635e468e9906bc9103a7ea9c3a",
"urls": [
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
Expand Down

0 comments on commit 6c4c2df

Please sign in to comment.