Skip to content

Commit

Permalink
[GR-54762] Backport to 24.0: Add default manifest entries to maven jars.
Browse files Browse the repository at this point in the history
PullRequest: mx/1811
  • Loading branch information
ansalond committed Jun 17, 2024
2 parents 401d1fe + 7c4fbc4 commit 5eb6d6f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 24 deletions.
8 changes: 4 additions & 4 deletions ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ local with(platform, java_release, timelimit="15:00") = {
[mx, "build"],
],
run: [
[mx, "sclone", "--kind", "git", "--source", "https://github.com/oracle/graal.git", "--dest", "../graal"],
[mx, "sclone", "--kind", "git", "--source", "https://github.com/oracle/graal.git", "--dest", "../graal", "--branch", "cpu/graal-vm/24.0"],
[mx, "-p", "../graal/compiler", "build"],
[mx, "-p", "../graal/compiler", "profrecord", "-E", "gate-xcomp", "$JAVA_HOME/bin/java", "-Xcomp", "foo", "||", "true"],
[mx, "-p", "../graal/compiler", "profpackage", "gate-xcomp"],
Expand Down Expand Up @@ -165,7 +165,7 @@ local with(platform, java_release, timelimit="15:00") = {
PATH: "$BUILD_DIR/main:$PATH", # add ./mx on PATH
},
run: [
[mx, "sclone", "--kind", "git", "--source", "https://github.com/graalvm/truffleruby.git", "--dest", "../truffleruby"],
[mx, "sclone", "--kind", "git", "--source", "https://github.com/graalvm/truffleruby.git", "--dest", "../truffleruby", "--branch", "cpu/graal-vm/24.0"],
["cd", "../truffleruby"],
["bin/jt", "build", "--env", "native", "--native-images=truffleruby"],
["bin/jt", "-u", "native", "ruby", "-v", "-e", 'puts "Hello Ruby!"'],
Expand All @@ -177,7 +177,7 @@ local with(platform, java_release, timelimit="15:00") = {
make: ">=" + versions.make,
},
run: [
[mx, "sclone", "--kind", "git", "--source", "https://github.com/oracle/graal.git", "--dest", "../graal"],
[mx, "sclone", "--kind", "git", "--source", "https://github.com/oracle/graal.git", "--dest", "../graal", "--branch", "cpu/graal-vm/24.0"],
] + self.java_home_in_env("../graal/vm", "vm") + [
[mx, "-p", "../graal/vm", "--env", "ce", "build"],
],
Expand Down Expand Up @@ -220,7 +220,7 @@ local with(platform, java_release, timelimit="15:00") = {
specVersion: "3",

# Overlay
overlay: "6def1af6dac47b0c2b7ebf7cbbde821ef8f4b41d",
overlay: "c88b1aada9c0105c3c09696b390c823b40c6113e",

# For use by overlay
versions:: versions,
Expand Down
17 changes: 12 additions & 5 deletions ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ local common_json = import "../common.json";
[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)),
# We do not want to expose galahad-jdk
assert std.assertEqual([x for x in std.objectFields(common_json.jdks) if x != "galahad-jdk"], 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;
local _ov = _oraclejdk.build_id;
local _lv = std.strReplace(_labsjdk.version, "ee-", "jdk-");
# Skip the check if we are not using a labsjdk. This can happen on JDK integration branches.
local no_labsjdk = _labsjdk.name != "labsjdk";
assert no_labsjdk || std.startsWith(_lv, _ov) : "update oraclejdk-latest to match labsjdk-ee-latest: %s+%s vs %s" % [_oraclejdk.version, _oraclejdk.build_id, _labsjdk.version];
Expand Down Expand Up @@ -115,6 +116,8 @@ local common_json = import "../common.json";
"linux-jdk19": { packages+: { "devkit:gcc11.2.0-OL6.4+1": "==0" }},
"linux-jdk20": { packages+: { "devkit:gcc11.2.0-OL6.4+1": "==0" }},
"linux-jdk21": { packages+: { "devkit:gcc11.2.0-OL6.4+1": "==0" }},
"linux-jdk-latest": { packages+: { "devkit:gcc13.2.0-OL6.4+1": "==0" }},
"linux-jdkLatest": self["linux-jdk-latest"],
},

# Dependencies
Expand Down Expand Up @@ -213,7 +216,7 @@ local common_json = import "../common.json";

truffleruby:: {
packages+: (if self.os == "linux" && self.arch == "amd64" then {
ruby: "==3.1.2", # Newer version, also used for benchmarking
ruby: "==3.2.2", # Newer version, also used for benchmarking
} else {
ruby: "==3.0.2",
}) + (if self.os == "linux" then {
Expand All @@ -228,6 +231,9 @@ local common_json = import "../common.json";
},

svm:: {
packages+: {
cmake: "==3.22.2",
},
environment+: {
DEFAULT_VM: "server",
LANG: "en_US.UTF-8",
Expand Down Expand Up @@ -340,7 +346,8 @@ local common_json = import "../common.json";
},

local linux = { os:: "linux", capabilities+: [self.os] },
local darwin = { os:: "darwin", capabilities+: [self.os] },
# Run darwin jobs on Big Sur or later by excluding all older versions
local darwin = { os:: "darwin", capabilities+: [self.os, "!darwin_sierra", "!darwin_mojave", "!darwin_catalina"] },
local windows = { os:: "windows", capabilities+: [self.os] },

local amd64 = { arch:: "amd64", capabilities+: [self.arch] },
Expand Down
30 changes: 16 additions & 14 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "7.3.2",
"mx_version": "7.4.1",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "22", "build_id": "jdk-22+25", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk11": {"name": "jpg-jdk", "version": "11.0.11", "build_id": "9", "release": true, "platformspecific": true, "extrabundles": ["static-libs"] },

"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "8", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]},
Expand Down Expand Up @@ -35,20 +37,20 @@
"labsjdk-ee-20-llvm": {"name": "labsjdk", "version": "ee-20.0.2+2-jvmci-23.1-b02-sulong", "platformspecific": true },

"oraclejdk21": {"name": "jpg-jdk", "version": "21", "build_id": "33", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-21": {"name": "labsjdk", "version": "ce-21.0.1+12-jvmci-23.1-b22", "platformspecific": true },
"labsjdk-ce-21Debug": {"name": "labsjdk", "version": "ce-21.0.1+12-jvmci-23.1-b22-debug", "platformspecific": true },
"labsjdk-ce-21-llvm": {"name": "labsjdk", "version": "ce-21.0.1+12-jvmci-23.1-b22-sulong", "platformspecific": true },
"labsjdk-ee-21": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b22", "platformspecific": true },
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b22-debug", "platformspecific": true },
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b22-sulong", "platformspecific": true },
"labsjdk-ce-21": {"name": "labsjdk", "version": "ce-21.0.1+12-jvmci-23.1-b26", "platformspecific": true },
"labsjdk-ce-21Debug": {"name": "labsjdk", "version": "ce-21.0.1+12-jvmci-23.1-b26-debug", "platformspecific": true },
"labsjdk-ce-21-llvm": {"name": "labsjdk", "version": "ce-21.0.1+12-jvmci-23.1-b26-sulong", "platformspecific": true },
"labsjdk-ee-21": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b26", "platformspecific": true },
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b26-debug", "platformspecific": true },
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b26-sulong", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "22", "build_id": "25", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-22+25-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-22+25-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-22+25-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-22+25-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-22+25-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-22+25-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "22", "build_id": "jdk-22.0.2+9", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-22.0.2+9-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-22.0.2+9-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-22.0.2+9-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-22.0.2+9-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-22.0.2+9-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-22.0.2+9-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -19233,7 +19233,7 @@ def alarm_handler(signum, frame):
abort(1, killsig=signal.SIGINT)

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.4.1") # GR-49878 LibGraal source bundle
version = VersionSpec("7.4.1.1") # GR-54502

_mx_start_datetime = datetime.utcnow()
_last_timestamp = _mx_start_datetime
Expand Down
11 changes: 11 additions & 0 deletions src/mx/_impl/mx_jardistribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,17 @@ def stage_archive(self):
+ self.manifest['Main-Class'] + " of the " + dist.name + " distribution. There should be only one definition.")
self.manifest['Main-Class'] = mainClass

if self.dist.maven:
developer = self.dist.suite.developer
release_version = self.dist.suite.release_version()

self.manifest.setdefault('Name', self.dist.maven_artifact_id())

for group in 'Specification', 'Implementation':
self.manifest.setdefault(f'{group}-Version', release_version)
if 'organization' in developer:
self.manifest.setdefault(f'{group}-Vendor', developer['organization'])

for dep in head + tail:
self.stage_dep(dep)

Expand Down

0 comments on commit 5eb6d6f

Please sign in to comment.