Skip to content

Commit 552192f

Browse files
committed
8255305: Add Linux x86_32 tier1 to submit workflow
Reviewed-by: ihse
1 parent 66a3917 commit 552192f

File tree

1 file changed

+199
-8
lines changed

1 file changed

+199
-8
lines changed

.github/workflows/submit.yml

Lines changed: 199 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
platforms:
1010
description: "Platform(s) to execute on"
1111
required: true
12-
default: "Linux x64, Windows x64, macOS x64"
12+
default: "Linux x64, Linux x86, Windows x64, macOS x64"
1313

1414
jobs:
1515
prerequisites:
@@ -18,7 +18,7 @@ jobs:
1818
outputs:
1919
should_run: ${{ steps.check_submit.outputs.should_run }}
2020
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
21-
platform_linux_x32: ${{ steps.check_platforms.outputs.platform_linux_x32 }}
21+
platform_linux_x86: ${{ steps.check_platforms.outputs.platform_linux_x86 }}
2222
platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
2323
platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
2424
platform_macos_x64: ${{ steps.check_platforms.outputs.platform_macos_x64 }}
@@ -33,7 +33,7 @@ jobs:
3333
id: check_platforms
3434
run: |
3535
echo "::set-output name=platform_linux_x64::${{ contains(github.event.inputs.platforms, 'linux x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x64'))) }}"
36-
echo "::set-output name=platform_linux_x32::${{ contains(github.event.inputs.platforms, 'linux x32') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x32'))) }}"
36+
echo "::set-output name=platform_linux_x86::${{ contains(github.event.inputs.platforms, 'linux x86') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x86'))) }}"
3737
echo "::set-output name=platform_windows_x64::${{ contains(github.event.inputs.platforms, 'windows x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows x64'))) }}"
3838
echo "::set-output name=platform_macos_x64::${{ contains(github.event.inputs.platforms, 'macos x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos x64'))) }}"
3939
if: steps.check_submit.outputs.should_run != 'false'
@@ -386,16 +386,17 @@ jobs:
386386
path: ~/linux-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
387387
continue-on-error: true
388388

389-
linux_x32_build:
390-
name: Linux x32
389+
linux_x86_build:
390+
name: Linux x86
391391
runs-on: "ubuntu-latest"
392392
needs: prerequisites
393-
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x32 != 'false'
393+
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x86 != 'false'
394394

395395
strategy:
396396
fail-fast: false
397397
matrix:
398398
flavor:
399+
- build release
399400
- build debug
400401
include:
401402
- flavor: build debug
@@ -466,7 +467,7 @@ jobs:
466467
- name: Configure
467468
run: >
468469
bash configure
469-
--with-conf-name=linux-x32
470+
--with-conf-name=linux-x86
470471
--with-target-bits=32
471472
${{ matrix.flags }}
472473
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
@@ -480,9 +481,198 @@ jobs:
480481
working-directory: jdk
481482

482483
- name: Build
483-
run: make CONF_NAME=linux-x32 ${{ matrix.build-target }}
484+
run: make CONF_NAME=linux-x86 ${{ matrix.build-target }}
484485
working-directory: jdk
485486

487+
- name: Persist test bundles
488+
uses: actions/upload-artifact@v2
489+
with:
490+
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
491+
path: |
492+
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz
493+
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz
494+
if: matrix.build-target == false
495+
496+
linux_x86_test:
497+
name: Linux x86
498+
runs-on: "ubuntu-latest"
499+
needs:
500+
- prerequisites
501+
- linux_x86_build
502+
503+
strategy:
504+
fail-fast: false
505+
matrix:
506+
test:
507+
- jdk/tier1 part 1
508+
- jdk/tier1 part 2
509+
- jdk/tier1 part 3
510+
- langtools/tier1
511+
- hs/tier1 common
512+
- hs/tier1 compiler
513+
- hs/tier1 gc
514+
- hs/tier1 runtime
515+
- hs/tier1 serviceability
516+
include:
517+
- test: jdk/tier1 part 1
518+
suites: test/jdk/:tier1_part1
519+
- test: jdk/tier1 part 2
520+
suites: test/jdk/:tier1_part2
521+
- test: jdk/tier1 part 3
522+
suites: test/jdk/:tier1_part3
523+
- test: langtools/tier1
524+
suites: test/langtools/:tier1
525+
- test: hs/tier1 common
526+
suites: test/hotspot/jtreg/:tier1_common
527+
artifact: -debug
528+
- test: hs/tier1 compiler
529+
suites: test/hotspot/jtreg/:tier1_compiler
530+
artifact: -debug
531+
- test: hs/tier1 gc
532+
suites: test/hotspot/jtreg/:tier1_gc
533+
artifact: -debug
534+
- test: hs/tier1 runtime
535+
suites: test/hotspot/jtreg/:tier1_runtime
536+
artifact: -debug
537+
- test: hs/tier1 serviceability
538+
suites: test/hotspot/jtreg/:tier1_serviceability
539+
artifact: -debug
540+
541+
# Reduced 32-bit build uses the same boot JDK as 64-bit build
542+
env:
543+
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
544+
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
545+
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
546+
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
547+
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
548+
549+
steps:
550+
- name: Checkout the source
551+
uses: actions/checkout@v2
552+
553+
- name: Restore boot JDK from cache
554+
id: bootjdk
555+
uses: actions/cache@v2
556+
with:
557+
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
558+
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
559+
560+
- name: Download boot JDK
561+
run: |
562+
mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
563+
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
564+
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
565+
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
566+
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
567+
if: steps.bootjdk.outputs.cache-hit != 'true'
568+
569+
- name: Restore jtreg artifact
570+
id: jtreg_restore
571+
uses: actions/download-artifact@v2
572+
with:
573+
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
574+
path: ~/jtreg/
575+
continue-on-error: true
576+
577+
- name: Restore jtreg artifact (retry)
578+
uses: actions/download-artifact@v2
579+
with:
580+
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
581+
path: ~/jtreg/
582+
if: steps.jtreg_restore.outcome == 'failure'
583+
584+
- name: Restore build artifacts
585+
id: build_restore
586+
uses: actions/download-artifact@v2
587+
with:
588+
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
589+
path: ~/jdk-linux-x86${{ matrix.artifact }}
590+
continue-on-error: true
591+
592+
- name: Restore build artifacts (retry)
593+
uses: actions/download-artifact@v2
594+
with:
595+
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
596+
path: ~/jdk-linux-x86${{ matrix.artifact }}
597+
if: steps.build_restore.outcome == 'failure'
598+
599+
- name: Unpack jdk
600+
run: |
601+
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
602+
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
603+
604+
- name: Unpack tests
605+
run: |
606+
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}"
607+
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}"
608+
609+
- name: Find root of jdk image dir
610+
run: |
611+
imageroot=`find ${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }} -name release -type f`
612+
echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
613+
614+
- name: Run tests
615+
run: >
616+
JDK_IMAGE_DIR=${{ env.imageroot }}
617+
TEST_IMAGE_DIR=${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}
618+
BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
619+
JT_HOME=${HOME}/jtreg
620+
make test-prebuilt
621+
CONF_NAME=run-test-prebuilt
622+
LOG_CMDLINES=true
623+
JTREG_VERBOSE=fail,error,time
624+
TEST="${{ matrix.suites }}"
625+
TEST_OPTS_JAVA_OPTIONS=
626+
JTREG_KEYWORDS="!headful"
627+
JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash"
628+
629+
- name: Check that all tests executed successfully
630+
if: always()
631+
run: >
632+
if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then
633+
cat build/*/test-results/*/text/newfailures.txt ;
634+
exit 1 ;
635+
fi
636+
637+
- name: Create suitable test log artifact name
638+
if: always()
639+
run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV
640+
641+
- name: Package test results
642+
if: always()
643+
working-directory: build/run-test-prebuilt/test-results/
644+
run: >
645+
zip -r9
646+
"$HOME/linux-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip"
647+
.
648+
continue-on-error: true
649+
650+
- name: Package test support
651+
if: always()
652+
working-directory: build/run-test-prebuilt/test-support/
653+
run: >
654+
zip -r9
655+
"$HOME/linux-x86${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip"
656+
.
657+
-i *.jtr
658+
-i hs_err*
659+
-i replay*
660+
continue-on-error: true
661+
662+
- name: Persist test results
663+
if: always()
664+
uses: actions/upload-artifact@v2
665+
with:
666+
path: ~/linux-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip
667+
continue-on-error: true
668+
669+
- name: Persist test outputs
670+
if: always()
671+
uses: actions/upload-artifact@v2
672+
with:
673+
path: ~/linux-x86${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
674+
continue-on-error: true
675+
486676
windows_x64_build:
487677
name: Windows x64
488678
runs-on: "windows-latest"
@@ -1089,6 +1279,7 @@ jobs:
10891279
needs:
10901280
- prerequisites
10911281
- linux_x64_test
1282+
- linux_x86_test
10921283
- windows_x64_test
10931284
- macos_x64_test
10941285

0 commit comments

Comments
 (0)