Skip to content

Commit 16d4551

Browse files
committed
8355452: GHA: Test jtreg tier1 on linux-x64 static-jdk
Reviewed-by: ihse, shade
1 parent 72e440d commit 16d4551

File tree

5 files changed

+105
-16
lines changed

5 files changed

+105
-16
lines changed

.github/actions/get-bundles/action.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ inputs:
3232
debug-suffix:
3333
description: 'File name suffix denoting debug level, possibly empty'
3434
required: false
35+
static-suffix:
36+
description: 'Static bundle file name suffix'
37+
required: false
3538
outputs:
3639
jdk-path:
3740
description: 'Path to the installed JDK bundle'
3841
value: ${{ steps.path-name.outputs.jdk }}
42+
static-jdk-path:
43+
description: 'Path to the installed static JDK bundle'
44+
value: ${{ steps.path-name.outputs.static_jdk }}
3945
symbols-path:
4046
description: 'Path to the installed symbols bundle'
4147
value: ${{ steps.path-name.outputs.symbols }}
@@ -61,6 +67,15 @@ runs:
6167
path: bundles
6268
if: steps.download-bundles.outcome == 'failure'
6369

70+
- name: 'Download static bundles artifact'
71+
id: download-static-bundles
72+
uses: actions/download-artifact@v4
73+
with:
74+
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}
75+
path: bundles
76+
continue-on-error: true
77+
if: ${{ inputs.static-suffix == '-static' }}
78+
6479
- name: 'Unpack bundles'
6580
run: |
6681
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
@@ -75,6 +90,20 @@ runs:
7590
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
7691
fi
7792
93+
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
94+
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip ]]; then
95+
echo 'Unpacking static jdk bundle...'
96+
mkdir -p bundles/static-jdk
97+
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip -d bundles/static-jdk
98+
fi
99+
100+
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz ]]; then
101+
echo 'Unpacking static jdk bundle...'
102+
mkdir -p bundles/static-jdk
103+
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz -C bundles/static-jdk
104+
fi
105+
fi
106+
78107
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
79108
echo 'Unpacking symbols bundle...'
80109
mkdir -p bundles/symbols
@@ -106,4 +135,12 @@ runs:
106135
echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
107136
echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
108137
echo "tests=$tests_dir" >> $GITHUB_OUTPUT
138+
139+
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
140+
static_jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/static-jdk -name bin -type d))"
141+
if [[ '${{ runner.os }}' == 'Windows' ]]; then
142+
static_jdk_dir="$(cygpath $static_jdk_dir)"
143+
fi
144+
echo "static_jdk=$static_jdk_dir" >> $GITHUB_OUTPUT
145+
fi
109146
shell: bash

.github/actions/upload-bundles/action.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ inputs:
3535
bundle-suffix:
3636
description: 'Bundle name suffix, possibly empty'
3737
required: false
38+
static-suffix:
39+
description: 'Static JDK bundle name suffix, possibly empty'
40+
required: false
3841

3942
runs:
4043
using: composite
@@ -46,6 +49,8 @@ runs:
4649
# Rename bundles to consistent names
4750
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
4851
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
52+
static_jdk_bundle_zip="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
53+
static_jdk_bundle_tar_gz="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
4954
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
5055
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
5156
static_libs_bundle="$(ls build/*/bundles/jdk-*_bin-static-libs${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
@@ -58,6 +63,12 @@ runs:
5863
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
5964
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
6065
fi
66+
if [[ "$static_jdk_bundle_zip" != "" ]]; then
67+
mv "$static_jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip"
68+
fi
69+
if [[ "$static_jdk_bundle_tar_gz" != "" ]]; then
70+
mv "$static_jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz"
71+
fi
6172
if [[ "$symbols_bundle" != "" ]]; then
6273
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
6374
fi
@@ -68,7 +79,7 @@ runs:
6879
mv "$static_libs_bundle" "bundles/static-libs-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
6980
fi
7081
71-
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
82+
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$static_jdk_bundle_zip$static_jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
7283
echo 'bundles-found=true' >> $GITHUB_OUTPUT
7384
else
7485
echo 'bundles-found=false' >> $GITHUB_OUTPUT
@@ -78,7 +89,7 @@ runs:
7889
- name: 'Upload bundles artifact'
7990
uses: actions/upload-artifact@v4
8091
with:
81-
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
92+
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
8293
path: bundles
8394
retention-days: 1
8495
if: steps.bundles.outputs.bundles-found == 'true'

.github/workflows/build-linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ on:
6464
bundle-suffix:
6565
required: false
6666
type: string
67+
static-suffix:
68+
required: false
69+
type: string
6770

6871
jobs:
6972
build-linux:
@@ -143,3 +146,4 @@ jobs:
143146
platform: ${{ inputs.platform }}
144147
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
145148
bundle-suffix: ${{ inputs.bundle-suffix }}
149+
static-suffix: ${{ inputs.static-suffix }}

.github/workflows/main.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,14 @@ jobs:
231231
uses: ./.github/workflows/build-linux.yml
232232
with:
233233
platform: linux-x64
234-
make-target: 'static-jdk-image'
234+
make-target: 'static-jdk-bundles'
235235
# There are issues with fastdebug static build in GHA due to space limit.
236236
# Only do release build for now.
237237
debug-levels: '[ "release" ]'
238238
gcc-major-version: '10'
239239
configure-arguments: ${{ github.event.inputs.configure-arguments }}
240240
make-arguments: ${{ github.event.inputs.make-arguments }}
241-
# It currently doesn't produce any bundles, but probably will do in
242-
# the future.
243-
bundle-suffix: "-static"
241+
static-suffix: "-static"
244242
if: needs.prepare.outputs.linux-x64 == 'true'
245243

246244
build-linux-x64-static-libs:
@@ -361,6 +359,19 @@ jobs:
361359
platform: linux-x64
362360
bootjdk-platform: linux-x64
363361
runs-on: ubuntu-22.04
362+
debug-suffix: -debug
363+
364+
test-linux-x64-static:
365+
name: linux-x64-static
366+
needs:
367+
- build-linux-x64
368+
- build-linux-x64-static
369+
uses: ./.github/workflows/test.yml
370+
with:
371+
platform: linux-x64
372+
bootjdk-platform: linux-x64
373+
runs-on: ubuntu-22.04
374+
static-suffix: "-static"
364375

365376
test-macos-aarch64:
366377
name: macos-aarch64
@@ -372,6 +383,7 @@ jobs:
372383
bootjdk-platform: macos-aarch64
373384
runs-on: macos-14
374385
xcode-toolset-version: '15.4'
386+
debug-suffix: -debug
375387

376388
test-windows-x64:
377389
name: windows-x64
@@ -382,3 +394,4 @@ jobs:
382394
platform: windows-x64
383395
bootjdk-platform: windows-x64
384396
runs-on: windows-2019
397+
debug-suffix: -debug

.github/workflows/test.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ on:
4040
xcode-toolset-version:
4141
required: false
4242
type: string
43+
debug-suffix:
44+
required: false
45+
type: string
46+
static-suffix:
47+
required: false
48+
type: string
4349

4450
env:
4551
# These are needed to make the MSYS2 bash work properly
@@ -86,35 +92,35 @@ jobs:
8692

8793
- test-name: 'hs/tier1 common'
8894
test-suite: 'test/hotspot/jtreg/:tier1_common'
89-
debug-suffix: -debug
95+
debug-suffix: ${{ inputs.debug-suffix }}
9096

9197
- test-name: 'hs/tier1 compiler part 1'
9298
test-suite: 'test/hotspot/jtreg/:tier1_compiler_1'
93-
debug-suffix: -debug
99+
debug-suffix: ${{ inputs.debug-suffix }}
94100

95101
- test-name: 'hs/tier1 compiler part 2'
96102
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
97-
debug-suffix: -debug
103+
debug-suffix: ${{ inputs.debug-suffix }}
98104

99105
- test-name: 'hs/tier1 compiler part 3'
100106
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
101-
debug-suffix: -debug
107+
debug-suffix: ${{ inputs.debug-suffix }}
102108

103109
- test-name: 'hs/tier1 gc'
104110
test-suite: 'test/hotspot/jtreg/:tier1_gc'
105-
debug-suffix: -debug
111+
debug-suffix: ${{ inputs.debug-suffix }}
106112

107113
- test-name: 'hs/tier1 runtime'
108114
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
109-
debug-suffix: -debug
115+
debug-suffix: ${{ inputs.debug-suffix }}
110116

111117
- test-name: 'hs/tier1 serviceability'
112118
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
113-
debug-suffix: -debug
119+
debug-suffix: ${{ inputs.debug-suffix }}
114120

115121
- test-name: 'lib-test/tier1'
116122
test-suite: 'test/lib-test/:tier1'
117-
debug-suffix: -debug
123+
debug-suffix: ${{ inputs.debug-suffix }}
118124

119125
steps:
120126
- name: 'Checkout the JDK source'
@@ -140,6 +146,7 @@ jobs:
140146
with:
141147
platform: ${{ inputs.platform }}
142148
debug-suffix: ${{ matrix.debug-suffix }}
149+
static-suffix: ${{ inputs.static-suffix }}
143150

144151
- name: 'Install dependencies'
145152
run: |
@@ -160,6 +167,21 @@ jobs:
160167
else
161168
echo "value=$PATH" >> $GITHUB_OUTPUT
162169
fi
170+
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
171+
echo "static-hotspot-problemlist-path=`pwd`/test/hotspot/jtreg/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
172+
echo "static-jdk-problemlist-path=`pwd`/test/jdk/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
173+
echo "static-langtools-problemlist-path=`pwd`/test/langtools/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
174+
echo "static-lib-test-problemlist-path=`pwd`/test/lib-test/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
175+
fi
176+
177+
- name: 'Set Extra Options'
178+
id: extra-options
179+
run: |
180+
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
181+
echo "test-jdk=JDK_UNDER_TEST=${{ steps.bundles.outputs.static-jdk-path }}" >> $GITHUB_OUTPUT
182+
echo "compile-jdk=JDK_FOR_COMPILE=${{ steps.bundles.outputs.jdk-path }}" >> $GITHUB_OUTPUT
183+
echo "extra-problem-lists=EXTRA_PROBLEM_LISTS=${{ steps.path.outputs.static-hotspot-problemlist-path }}%20${{ steps.path.outputs.static-jdk-problemlist-path }}%20${{ steps.path.outputs.static-langtools-problemlist-path }}%20${{ steps.path.outputs.static-lib-test-problemlist-path }}" >> $GITHUB_OUTPUT
184+
fi
163185
164186
- name: 'Run tests'
165187
id: run-tests
@@ -171,7 +193,9 @@ jobs:
171193
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
172194
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
173195
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
174-
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
196+
${{ steps.extra-options.outputs.test-jdk }}
197+
${{ steps.extra-options.outputs.compile-jdk }}
198+
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful;${{ steps.extra-options.outputs.extra-problem-lists }}'
175199
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
176200
env:
177201
PATH: ${{ steps.path.outputs.value }}
@@ -204,7 +228,7 @@ jobs:
204228
echo '::warning ::Missing test-support directory'
205229
fi
206230
207-
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
231+
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }}${{ inputs.static-suffix }} | tr '/ ' '__')"
208232
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
209233
if: always()
210234

0 commit comments

Comments
 (0)