From c3cfc982cabd43125e6a152cd20fd3e323385494 Mon Sep 17 00:00:00 2001 From: jvukicev Date: Wed, 18 Dec 2024 08:58:02 +0100 Subject: [PATCH] Remove libraries from exclude list and add batch mode --- .github/workflows/ni-layers.yml | 2 + .../NILayerTests/build_native_image_layer.py | 4 +- .../excluded-popular-maven-libraries.json | 72 +++++++------------ 3 files changed, 28 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ni-layers.yml b/.github/workflows/ni-layers.yml index bdad617019de..92447cfd1b29 100644 --- a/.github/workflows/ni-layers.yml +++ b/.github/workflows/ni-layers.yml @@ -44,9 +44,11 @@ on: push: paths: - '.github/workflows/ni-layers.yml' + - 'vm/tests/gh_workflows/NILayerTests/**' pull_request: paths: - '.github/workflows/ni-layers.yml' + - 'vm/tests/gh_workflows/NILayerTests/**' schedule: - cron: "0 0 * * 1" # Once a week, at midnight on Monday (00:00 UTC) workflow_dispatch: diff --git a/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py b/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py index c7848caa6e4d..f9b40ac0ed1c 100644 --- a/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py +++ b/vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py @@ -96,7 +96,7 @@ def build_layers(native_image_path, coordinates, delimiter): currDir = os.getcwd() group_id, artifact_id, version = gav.rstrip().split(':') - subprocess.run(['mvn', 'dependency:get', f'-Dartifact={gav}', '-Dtransitive=true']) + subprocess.run(['mvn', '-B', 'dependency:get', f'-Dartifact={gav}', '-Dtransitive=true']) library_path = os.path.join(Path.home(), '.m2', 'repository', group_id.replace('.','/'), artifact_id, version) jar_path = os.path.join(library_path, f'{artifact_id}-{version}.jar') @@ -114,10 +114,10 @@ def build_layers(native_image_path, coordinates, delimiter): '-J-ea', '-J-esa', '--no-fallback', '-cp' ,f'{jar_path}:{dependency_path}', - '-o', f'{artifact_id}-{version}' '-H:+UnlockExperimentalVMOptions', f'-H:LayerCreate=layer.nil,path={jar_path}', '-H:+ReportExceptionStackTraces', + '-o', f'{artifact_id}-{version}' ] print(f'Command: {' '.join(command)}') subprocess.run(command, check=True) diff --git a/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json b/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json index 2dac31698cdd..7dc26dcae4c4 100644 --- a/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json +++ b/vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json @@ -5,29 +5,17 @@ "version": "4.0.22", "reason": "Library too large to be built in a GitHub action. Finishes generating on better systems locally" }, - { - "group_id": "org.apache.logging.log4j", - "artifact_id": "log4j-core", - "version": "2.24.0", - "reason": "GR-57711" - }, { "group_id": "org.scalatest", "artifact_id": "scalatest_3", "version": "3.2.19", "reason": "[Maven ERROR] Unknown packaging: bundle" }, - { - "group_id": "org.springframework.boot", - "artifact_id": "spring-boot-autoconfigure", - "version": "3.3.3", - "reason": "GR-57738" - }, { "group_id": "com.alibaba.fastjson2", "artifact_id": "fastjson2", "version": "2.0.52", - "reason": "GR-57711" + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" }, { "group_id": "org.scala-js", @@ -69,13 +57,7 @@ "group_id": "org.playframework", "artifact_id": "play-test_3", "version": "3.0.5", - "reason": "GR-57711" - }, - { - "group_id": "io.quarkus", - "artifact_id": "quarkus-junit5", - "version": "3.14.3", - "reason": "GR-57711" + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" }, { "group_id": "nl.jqno.equalsverifier", @@ -137,17 +119,11 @@ "version": "2.3.0", "reason": "[Maven ERROR] Unknown packaging: bundle" }, - { - "group_id": "org.gwtproject", - "artifact_id": "gwt-user", - "version": "2.11.0", - "reason": "GR-57738" - }, { "group_id": "io.vertx", "artifact_id": "vertx-core", "version": "4.5.10", - "reason": "GR-57711" + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" }, { "group_id": "org.mariadb.jdbc", @@ -155,12 +131,6 @@ "version": "3.4.1", "reason": "Finishes generating, but requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" }, - { - "group_id": "com.microsoft.sqlserver", - "artifact_id": "mssql-jdbc", - "version": "12.8.1.jre11", - "reason": "GR-57711" - }, { "group_id": "com.fasterxml.jackson.dataformat", "artifact_id": "jackson-dataformat-cbor", @@ -203,12 +173,6 @@ "version": "3.5.2", "reason": "GR-57816" }, - { - "group_id": "org.springframework.security", - "artifact_id": "spring-security-web", - "version": "6.3.3", - "reason": "GR-57738" - }, { "group_id": "org.eclipse.paho", "artifact_id": "org.eclipse.paho.client.mqttv3", @@ -279,13 +243,13 @@ "group_id": "org.jline", "artifact_id": "jline", "version": "3.26.3", - "reason": "GR-57711" + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" }, { "group_id": "org.flywaydb", "artifact_id": "flyway-core", "version": "10.17.3", - "reason": "GR-57711" + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" }, { "group_id": "org.springmodules", @@ -305,12 +269,6 @@ "version": "3.5.2", "reason": "GR-57816" }, - { - "group_id": "org.apache.cassandra", - "artifact_id": "java-driver-core", - "version": "4.18.1", - "reason": "GR-57711" - }, { "group_id": "org.apache.hadoop", "artifact_id": "hadoop-hdfs", @@ -333,7 +291,7 @@ "group_id": "org.apache.hbase", "artifact_id": "hbase-client", "version": "2.6.0", - "reason": "GR-57711" + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" }, { "group_id": "io.circe", @@ -346,5 +304,23 @@ "artifact_id": "cats-effect_3", "version": "3.6-0142603", "reason": "GR-59420" + }, + { + "group_id": "org.apache.cassandra", + "artifact_id": "java-driver-core", + "version": "4.18.1", + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" + }, + { + "group_id": "com.microsoft.sqlserver", + "artifact_id": "mssql-jdbc", + "version": "12.8.1.jre11", + "reason": "GR-57711, also requires user 'initialize-at-build-time' and 'initialize-at-run-time' input" + }, + { + "group_id": "io.quarkus", + "artifact_id": "quarkus-junit5", + "version": "3.14.3", + "reason": "GR-57711" } ]