Skip to content

Commit 8dc6edf

Browse files
committed
[GR-59415] Add assertions to native-image layer build command
PullRequest: graal/19145
2 parents 9f31273 + ffb9e52 commit 8dc6edf

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

.github/workflows/ni-layers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
runs-on: ubuntu-latest
9494
env:
9595
GRAALVM_HOME: ${{ github.workspace }}/graalvm
96-
timeout-minutes: 20
96+
timeout-minutes: 30
9797
needs: build-graalvm-and-populate-matrix
9898
strategy:
9999
fail-fast: false
@@ -120,4 +120,4 @@ jobs:
120120
python-version: '${{ env.PYTHON_VERSION }}'
121121
- name: Build layer
122122
run: |
123-
python3 ${{ env.LIBRARY_METADATA_PATH }}/build_native_image_layer.py ${{ env.GRAALVM_HOME }}/bin/native-image "${{ matrix.coordinates }}"
123+
python3 ${{ env.LIBRARY_METADATA_PATH }}/build_native_image_layer.py ${{ env.GRAALVM_HOME }}/bin/native-image "${{ matrix.coordinates }}"

vm/tests/gh_workflows/NILayerTests/build_native_image_layer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def build_layers(native_image_path, coordinates, delimiter):
109109
os.chdir(library_path)
110110
dependency_path = subprocess.check_output(['mvn', '-q', 'exec:exec', '-Dexec.executable=echo', '-Dexec.args=%classpath']).decode('utf-8').rstrip()
111111
os.chdir(image_path)
112-
command = [native_image_path, '-H:+UnlockExperimentalVMOptions', '-cp' ,f'{jar_path}:{dependency_path}', f'-H:LayerCreate=layer.nil,package={jar_path}', '-H:+ReportExceptionStackTraces', '--no-fallback' , '-o', f'{artifact_id}-{version}'] # Assertions currently excluded, see GR-57236
112+
command = [native_image_path, '-J-ea', '-J-esa', '-H:+UnlockExperimentalVMOptions', '-cp' ,f'{jar_path}:{dependency_path}', f'-H:LayerCreate=layer.nil,package={jar_path}', '-H:+ReportExceptionStackTraces', '--no-fallback' , '-o', f'{artifact_id}-{version}']
113113
print(f'Command: {' '.join(command)}')
114-
subprocess.run(command)
114+
subprocess.run(command, check=True)
115115
os.chdir('..')
116116

117117
os.chdir(currDir)
@@ -125,4 +125,4 @@ def build_layers(native_image_path, coordinates, delimiter):
125125
build_layers(sys.argv[1], sys.argv[2], delimiter)
126126
else:
127127
print("Error: Wrong number of arguments!")
128-
sys.exit(1)
128+
sys.exit(1)

vm/tests/gh_workflows/NILayerTests/excluded-popular-maven-libraries.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
{
105105
"group_id": "io.quarkus",
106106
"artifact_id": "quarkus-junit5",
107-
"version": "3.14.2",
107+
"version": "3.14.3",
108108
"reason": "GR-57711"
109109
},
110110
{
@@ -212,7 +212,7 @@
212212
{
213213
"group_id": "io.opentelemetry",
214214
"artifact_id": "opentelemetry-api",
215-
"version": "1.42.0",
215+
"version": "1.42.1",
216216
"reason": "[Maven ERROR] Missing dependencies"
217217
},
218218
{
@@ -284,7 +284,7 @@
284284
{
285285
"group_id": "org.redisson",
286286
"artifact_id": "redisson",
287-
"version": "3.35.0",
287+
"version": "3.36.0",
288288
"reason": "Finishes generating, but requires user 'initialize-at-build-time' and 'initialize-at-run-time' input"
289289
},
290290
{
@@ -296,7 +296,7 @@
296296
{
297297
"group_id": "com.amazonaws",
298298
"artifact_id": "aws-java-sdk",
299-
"version": "1.12.771",
299+
"version": "1.12.772",
300300
"reason": "Finishes generating, but requires user 'initialize-at-build-time' and 'initialize-at-run-time' input"
301301
},
302302
{
@@ -502,5 +502,11 @@
502502
"artifact_id": "jaxb-runtime",
503503
"version": "4.0.5",
504504
"reason": "GR-58503"
505+
},
506+
{
507+
"group_id": "org.typelevel",
508+
"artifact_id": "cats-effect_3",
509+
"version": "3.6-0142603",
510+
"reason": "GR-59420"
505511
}
506512
]

0 commit comments

Comments
 (0)