add security/infra/java/security/cert/CertPathValidator/certification… #507
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | ||
# Copyright (c) 2022 Alibaba Group Holding Limited. All Rights Reserved. | ||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
# | ||
# This code is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License version 2 only, as | ||
# published by the Free Software Foundation. Alibaba designates this | ||
# particular file as subject to the "Classpath" exception as provided | ||
# by Oracle in the LICENSE file that accompanied this code. | ||
# | ||
# This code is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
# version 2 for more details (a copy is included in the LICENSE file that | ||
# accompanied this code). | ||
# | ||
# You should have received a copy of the GNU General Public License version | ||
# 2 along with this work; if not, write to the Free Software Foundation, | ||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
name: Dragonwell_8_build_test | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
prerequisites: | ||
name: Prerequisites | ||
uses: ./.github/workflows/check_pr.yml | ||
with: | ||
platforms: 'linux x64, linux aarch64' | ||
<<<<<<< HEAD | ||
build-linux-x64: | ||
name: linux-x64 | ||
======= | ||
steps: | ||
- name: Check if submit tests should actually run depending on secrets and manual triggering | ||
id: check_submit | ||
run: echo "should_run=${{ github.event.inputs.platforms != '' || (!secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/')) }}" >> $GITHUB_OUTPUT | ||
- name: Check which platforms should be included | ||
id: check_platforms | ||
run: | | ||
echo "platform_linux_additional=${{ contains(github.event.inputs.platforms, 'linux additional (hotspot only)') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux additional (hotspot only)'))) }}" >> $GITHUB_OUTPUT | ||
echo "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'))) }}" >> $GITHUB_OUTPUT | ||
echo "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'))) }}" >> $GITHUB_OUTPUT | ||
echo "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'))) }}" >> $GITHUB_OUTPUT | ||
echo "platform_windows_x86=${{ contains(github.event.inputs.platforms, 'windows x86') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows x86'))) }}" >> $GITHUB_OUTPUT | ||
echo "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'))) }}" >> $GITHUB_OUTPUT | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Determine unique bundle identifier | ||
id: check_bundle_id | ||
run: echo "bundle_id=${GITHUB_ACTOR}_${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jdk | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Determine versions and locations to be used for dependencies | ||
id: check_deps | ||
run: "echo dependencies=`cat common/autoconf/version-numbers make/conf/test-dependencies | sed -e '1i {' -e 's/#.*//g' -e 's/\"//g' -e 's/\\(.*\\)=\\(.*\\)/\"\\1\": \"\\2\",/g' -e '$s/,\\s\\{0,\\}$/\\}/'` >> $GITHUB_OUTPUT" | ||
working-directory: jdk | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Print extracted dependencies to the log | ||
run: "echo '${{ steps.check_deps.outputs.dependencies }}'" | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Determine the jtreg ref to checkout | ||
run: "echo JTREG_REF=jtreg${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}-${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_BUILD }} >> $GITHUB_ENV" | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Determine the jtreg version to build | ||
run: echo "BUILD_VERSION=${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}" >> $GITHUB_ENV | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Determine the jtreg build number to build | ||
run: echo "BUILD_NUMBER=${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_BUILD }}" >> $GITHUB_ENV | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Check if a jtreg image is present in the cache | ||
id: jtreg | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/jtreg/ | ||
key: jtreg-${{ env.JTREG_REF }}-v1 | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
- name: Checkout the jtreg source | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "openjdk/jtreg" | ||
ref: ${{ env.JTREG_REF }} | ||
path: jtreg | ||
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true' | ||
- name: Build jtreg | ||
run: bash make/build-all.sh ${JAVA_HOME_8_X64} | ||
working-directory: jtreg | ||
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true' | ||
- name: Move jtreg image to destination folder | ||
run: mv build/images/jtreg ~/ | ||
working-directory: jtreg | ||
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true' | ||
- name: Store jtreg for use by later steps | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ steps.check_bundle_id.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.check_submit.outputs.should_run != 'false' | ||
linux_x64_build: | ||
name: Linux x64 | ||
runs-on: "ubuntu-20.04" | ||
>>>>>>> jdk8u432-ga | ||
needs: prerequisites | ||
uses: ./.github/workflows/build-linux.yml | ||
with: | ||
platform: linux-x64 | ||
conf-arguments: linux-x86_64-normal-server | ||
make-target: 'images' | ||
runs-on: '"ubuntu-20.04"' | ||
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x64 != 'false' | ||
<<<<<<< HEAD | ||
build-linux-aarch64: | ||
name: linux-aarch64 | ||
======= | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: | ||
- build release | ||
- build debug | ||
include: | ||
- flavor: build debug | ||
flags: --enable-debug | ||
artifact: -debug | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jdk | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Fix jtreg permissions | ||
run: chmod -R a+rx ${HOME}/jtreg/ | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install openjdk-8-jdk gcc-9 g++-9 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | ||
- name: Configure | ||
run: > | ||
bash configure | ||
--with-conf-name=linux-x64 | ||
${{ matrix.flags }} | ||
--with-user-release-suffix=${GITHUB_ACTOR}-${GITHUB_SHA} | ||
--with-build-number=b00 | ||
--with-jtreg=${HOME}/jtreg | ||
--with-zlib=bundled | ||
working-directory: jdk | ||
- name: Build | ||
run: make CONF_NAME=linux-x64 LOG_LEVEL=debug images | ||
working-directory: jdk | ||
- name: Pack artifacts | ||
run: | | ||
tar -czf jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz -C jdk/build/linux-x64/images j2sdk-image | ||
- name: Persist test bundles | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: | | ||
jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz | ||
linux_x64_test: | ||
name: Linux x64 | ||
runs-on: "ubuntu-20.04" | ||
needs: | ||
- prerequisites | ||
- linux_x64_build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
- jdk/tier1 | ||
- langtools/tier1 | ||
- hotspot/tier1 | ||
include: | ||
- test: jdk/tier1 | ||
suites: jdk_tier1 | ||
- test: langtools/tier1 | ||
suites: langtools_tier1 | ||
- test: hotspot/tier1 | ||
suites: hotspot_tier1 | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK: "/usr/lib/jvm/java-8-openjdk-amd64" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Restore build artifacts | ||
id: build_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-linux-x64${{ matrix.artifact }} | ||
continue-on-error: true | ||
- name: Restore build artifacts (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-linux-x64${{ matrix.artifact }} | ||
if: steps.build_restore.outcome == 'failure' | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install openjdk-8-jdk | ||
- name: Unpack jdk | ||
run: | | ||
mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}" | ||
tar -xzf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}" | ||
- name: Run tests | ||
run: > | ||
chmod +x "${HOME}/jtreg/bin/jtreg" && | ||
mkdir test-results && | ||
cd test && | ||
PRODUCT_HOME="${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}/j2sdk-image" | ||
JT_HOME="${HOME}/jtreg" | ||
ALT_OUTPUTDIR="${GITHUB_WORKSPACE}/test-results" | ||
JAVA_ARGS="-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest" | ||
JTREG_TIMEOUT_FACTOR="4" | ||
make | ||
"${{ matrix.suites }}" | ||
- name: Check that all tests executed successfully | ||
if: always() | ||
run: > | ||
if cat test-results/testoutput/*/exitcode.txt | grep -q -v '^0$' | ||
|| ! cat test-results/testoutput/*/Stats.txt | grep -q 'fail=0' ; then | ||
cat test-results/testoutput/*/JTreport/text/{newfailures,other_errors}.txt ; | ||
exit 1 ; | ||
fi | ||
- name: Create suitable test log artifact name | ||
if: always() | ||
run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV | ||
- name: Package test results | ||
if: always() | ||
working-directory: test-results | ||
run: > | ||
zip -r9 | ||
"$HOME/linux-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip" | ||
. | ||
-x "*ARCHIVE_BUNDLE.zip" | ||
continue-on-error: true | ||
- name: Persist test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: linux-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }} | ||
path: ~/linux-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip | ||
continue-on-error: true | ||
linux_additional_build: | ||
name: Linux additional | ||
runs-on: "ubuntu-20.04" | ||
needs: | ||
- prerequisites | ||
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_additional != 'false' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: | ||
- hs x64 build only | ||
- hs x64 zero build only | ||
- hs x86 minimal build only | ||
- hs x86 client build only | ||
- hs aarch64 build only | ||
- hs arm build only | ||
- hs s390x build only | ||
- hs ppc64le build only | ||
include: | ||
- flavor: hs x64 build only | ||
flags: --enable-debug --disable-precompiled-headers | ||
- flavor: hs x64 zero build only | ||
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero | ||
- flavor: hs x86 minimal build only | ||
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=minimal1 --with-target-bits=32 | ||
multilib: true | ||
- flavor: hs x86 client build only | ||
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=client --with-target-bits=32 | ||
multilib: true | ||
- flavor: hs aarch64 build only | ||
flags: --enable-debug --disable-precompiled-headers | ||
debian-arch: arm64 | ||
gnu-arch: aarch64 | ||
- flavor: hs arm build only | ||
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero | ||
debian-arch: armhf | ||
gnu-arch: arm | ||
gnu-flavor: eabihf | ||
- flavor: hs s390x build only | ||
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero | ||
debian-arch: s390x | ||
gnu-arch: s390x | ||
- flavor: hs ppc64le build only | ||
flags: --enable-debug --disable-precompiled-headers | ||
debian-arch: ppc64el | ||
gnu-arch: powerpc64le | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK: "/usr/lib/jvm/java-8-openjdk-amd64" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jdk | ||
- name: Update apt | ||
run: sudo apt-get update | ||
- name: Install native host dependencies | ||
run: | | ||
sudo apt-get install openjdk-8-jdk gcc-9 g++-9 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | ||
if: matrix.debian-arch == '' | ||
- name: Install multilib dependencies | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
sudo apt-get update | ||
sudo apt-get install --only-upgrade apt | ||
sudo apt-get install openjdk-8-jdk gcc-9-multilib g++-9-multilib libfreetype6-dev:i386 libxrandr-dev:i386 libxtst-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libcups2-dev:i386 libasound2-dev:i386 | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | ||
if: matrix.multilib != '' | ||
- name: Install cross-compilation host dependencies | ||
run: sudo apt-get install openjdk-8-jdk gcc-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} g++-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} | ||
if: matrix.debian-arch != '' | ||
- name: Cache sysroot | ||
id: cache-sysroot | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/sysroot-${{ matrix.debian-arch }}/ | ||
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('jdk/.github/workflows/submit.yml') }} | ||
if: matrix.debian-arch != '' | ||
- name: Install sysroot host dependencies | ||
run: sudo apt-get install debootstrap qemu-user-static | ||
if: matrix.debian-arch != '' && steps.cache-sysroot.outputs.cache-hit != 'true' | ||
- name: Create sysroot | ||
run: > | ||
sudo qemu-debootstrap | ||
--arch=${{ matrix.debian-arch }} | ||
--verbose | ||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev | ||
--resolve-deps | ||
bullseye | ||
~/sysroot-${{ matrix.debian-arch }} | ||
http://httpredir.debian.org/debian/ | ||
if: matrix.debian-arch != '' && steps.cache-sysroot.outputs.cache-hit != 'true' | ||
- name: Prepare sysroot for caching | ||
run: | | ||
sudo chroot ~/sysroot-${{ matrix.debian-arch }} symlinks -cr . | ||
sudo chown ${USER} -R ~/sysroot-${{ matrix.debian-arch }} | ||
rm -rf ~/sysroot-${{ matrix.debian-arch }}/{dev,proc,run,sys} | ||
if: matrix.debian-arch != '' && steps.cache-sysroot.outputs.cache-hit != 'true' | ||
- name: Configure cross compiler | ||
run: | | ||
echo "CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}-gcc-9" >> $GITHUB_ENV | ||
echo "CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}-g++-9" >> $GITHUB_ENV | ||
if: matrix.debian-arch != '' | ||
- name: Configure cross specific flags | ||
run: > | ||
echo "cross_flags= | ||
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} | ||
--with-sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}/ | ||
--with-cups=${HOME}/sysroot-${{ matrix.debian-arch }}/usr | ||
--with-freetype-lib=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/lib/${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} | ||
--with-freetype-include=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/include/freetype2 | ||
--with-alsa=${HOME}/sysroot-${{ matrix.debian-arch }}/usr | ||
--with-fontconfig=${HOME}/sysroot-${{ matrix.debian-arch }}/usr | ||
" >> $GITHUB_ENV | ||
&& echo "cross_conf_env= | ||
CFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }} | ||
CXXFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }} | ||
LDFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }} | ||
" >> $GITHUB_ENV | ||
if: matrix.debian-arch != '' | ||
- name: Configure | ||
run: > | ||
${{ env.cross_conf_env }} | ||
bash configure | ||
--with-conf-name=linux-${{ matrix.gnu-arch }}-hotspot | ||
${{ matrix.flags }} | ||
${{ env.cross_flags }} | ||
--with-user-release-suffix=${GITHUB_ACTOR}-${GITHUB_SHA} | ||
--with-build-number=b00 | ||
--with-boot-jdk=${BOOT_JDK} | ||
--disable-headful | ||
--with-zlib=bundled | ||
working-directory: jdk | ||
- name: Build | ||
run: | | ||
cat build/linux-${{ matrix.gnu-arch }}-hotspot/spec.gmk | ||
cat build/linux-${{ matrix.gnu-arch }}-hotspot/hotspot-spec.gmk | ||
make CONF_NAME=linux-${{ matrix.gnu-arch }}-hotspot LOG_LEVEL=debug hotspot | ||
working-directory: jdk | ||
linux_x86_build: | ||
name: Linux x86 | ||
runs-on: "ubuntu-20.04" | ||
>>>>>>> jdk8u432-ga | ||
needs: prerequisites | ||
uses: ./.github/workflows/build-linux.yml | ||
with: | ||
platform: linux-aarch64 | ||
conf-arguments: linux-aarch64-normal-server | ||
make-target: 'images' | ||
runs-on: '["self-hosted", "ARM64"]' | ||
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_aarch64 != 'false' | ||
<<<<<<< HEAD | ||
test-linux-x64: | ||
name: linux-x64 | ||
======= | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: | ||
- build release | ||
- build debug | ||
include: | ||
- flavor: build debug | ||
flags: --enable-debug | ||
artifact: -debug | ||
# Reduced 32-bit build uses the same boot JDK as 64-bit build | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK: "/usr/lib/jvm/java-8-openjdk-amd64" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jdk | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Fix jtreg permissions | ||
run: chmod -R a+rx ${HOME}/jtreg/ | ||
# Roll in the multilib environment and its dependencies. | ||
# Some multilib libraries do not have proper inter-dependencies, so we have to | ||
# install their dependencies manually. Additionally, upgrading apt solves | ||
# the libc6 installation bugs until base image catches up, see JDK-8260460. | ||
- name: Install dependencies | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
sudo apt-get update | ||
sudo apt-get install --only-upgrade apt | ||
sudo apt-get install openjdk-8-jdk gcc-9-multilib g++-9-multilib libfreetype6-dev:i386 libxrandr-dev:i386 libxtst-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libcups2-dev:i386 libasound2-dev:i386 | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | ||
- name: Configure | ||
run: > | ||
bash configure | ||
--with-conf-name=linux-x86 | ||
--with-target-bits=32 | ||
${{ matrix.flags }} | ||
--with-user-release-suffix=${GITHUB_ACTOR}-${GITHUB_SHA} | ||
--with-build-number=b00 | ||
--with-boot-jdk=${BOOT_JDK} | ||
--with-jtreg=${HOME}/jtreg | ||
--with-zlib=bundled | ||
working-directory: jdk | ||
- name: Build | ||
run: make CONF_NAME=linux-x86 images | ||
working-directory: jdk | ||
- name: Pack artifacts | ||
run: | | ||
tar -czf jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz -C jdk/build/linux-x86/images j2sdk-image | ||
- name: Persist test bundles | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: | | ||
jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz | ||
linux_x86_test: | ||
name: Linux x86 | ||
runs-on: "ubuntu-20.04" | ||
>>>>>>> jdk8u432-ga | ||
needs: | ||
- build-linux-x64 | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
platform: linux-x64 | ||
debug-suffix: -release | ||
runs-on: '"ubuntu-20.04"' | ||
<<<<<<< HEAD | ||
test-linux-aarch64: | ||
name: linux-aarch64 | ||
======= | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
- jdk/tier1 | ||
- langtools/tier1 | ||
- hotspot/tier1 | ||
include: | ||
- test: jdk/tier1 | ||
suites: jdk_tier1 | ||
- test: langtools/tier1 | ||
suites: langtools_tier1 | ||
- test: hotspot/tier1 | ||
suites: hotspot_tier1 | ||
# Reduced 32-bit build uses the same boot JDK as 64-bit build | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK: "/usr/lib/jvm/java-8-openjdk-amd64" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Restore build artifacts | ||
id: build_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-linux-x86${{ matrix.artifact }} | ||
continue-on-error: true | ||
- name: Restore build artifacts (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-linux-x86${{ matrix.artifact }} | ||
if: steps.build_restore.outcome == 'failure' | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install openjdk-8-jdk gcc-9-multilib g++-9-multilib | ||
- name: Unpack jdk | ||
run: | | ||
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}" | ||
tar -xzf "${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 }}" | ||
- name: Build multilib docker image | ||
if: matrix.test == 'hotspot/tier1' | ||
run: > | ||
printf '%s\n%s\n' | ||
'FROM ubuntu:latest' | ||
'RUN dpkg --add-architecture i386 && apt-get update && apt-get -y install libc6:i386' | ||
| docker build -t 'ubuntu-multilib:latest' - | ||
- name: Run tests | ||
run: > | ||
chmod +x "${HOME}/jtreg/bin/jtreg" && | ||
mkdir test-results && | ||
cd test && | ||
PRODUCT_HOME="${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}/j2sdk-image" | ||
JT_HOME="${HOME}/jtreg" | ||
ALT_OUTPUTDIR="${GITHUB_WORKSPACE}/test-results" | ||
JAVA_ARGS="-Djdk.test.docker.image.name=ubuntu-multilib -Djdk.test.docker.image.version=latest" | ||
JTREG_TIMEOUT_FACTOR="4" | ||
make | ||
"${{ matrix.suites }}" | ||
- name: Check that all tests executed successfully | ||
if: always() | ||
run: > | ||
if cat test-results/testoutput/*/exitcode.txt | grep -q -v '^0$' | ||
|| ! cat test-results/testoutput/*/Stats.txt | grep -q 'fail=0' ; then | ||
cat test-results/testoutput/*/JTreport/text/{newfailures,other_errors}.txt ; | ||
exit 1 ; | ||
fi | ||
- name: Create suitable test log artifact name | ||
if: always() | ||
run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV | ||
- name: Package test results | ||
if: always() | ||
working-directory: test-results | ||
run: > | ||
zip -r9 | ||
"$HOME/linux-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip" | ||
. | ||
-x "*ARCHIVE_BUNDLE.zip" | ||
continue-on-error: true | ||
- name: Persist test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: linux-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }} | ||
path: ~/linux-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip | ||
continue-on-error: true | ||
windows_x64_build: | ||
name: Windows x64 | ||
runs-on: "windows-2019" | ||
needs: prerequisites | ||
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_x64 != 'false' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: | ||
- build release | ||
- build debug | ||
include: | ||
- flavor: build debug | ||
flags: --enable-debug | ||
artifact: -debug | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" | ||
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}" | ||
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}" | ||
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}" | ||
VS2017_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2017_FILENAME }}" | ||
VS2017_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2017_URL }}" | ||
VS2017_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2017_SHA256 }}" | ||
steps: | ||
- name: Restore cygwin installer from cache | ||
id: cygwin-installer | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/setup-x86_64.exe | ||
key: cygwin-installer | ||
- name: Download cygwin installer | ||
run: | | ||
New-Item -Force -ItemType directory -Path "$HOME\cygwin" | ||
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe" | ||
if: steps.cygwin-installer.outputs.cache-hit != 'true' | ||
- name: Restore cygwin packages from cache | ||
id: cygwin | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/packages | ||
key: cygwin-packages-${{ runner.os }}-v1 | ||
- name: Install cygwin | ||
run: | | ||
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jdk | ||
- name: Checkout the FreeType source | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "freetype/freetype" | ||
ref: VER-2-8-1 | ||
path: freetype | ||
- name: Restore boot JDK from cache | ||
id: bootjdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} | ||
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 | ||
- name: Download boot JDK | ||
run: | | ||
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash.Hash -eq $env:BOOT_JDK_SHA256 | ||
& unzip "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -d "$HOME/bootjdk/$env:BOOT_JDK_VERSION" | ||
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
if: steps.bootjdk.outputs.cache-hit != 'true' | ||
- name: Restore Visual Studio 2017 from cache | ||
id: vs2017 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/${{ env.VS2017_FILENAME }} | ||
key: vs2017 | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Uninstall WinSDKs | ||
run: > | ||
Start-Process -FilePath 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe' -Wait -NoNewWindow -ArgumentList | ||
'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" | ||
--remove Microsoft.VisualStudio.Component.Windows10SDK.18362 | ||
--remove Microsoft.VisualStudio.Component.Windows10SDK.19041 | ||
--remove Microsoft.VisualStudio.Component.Windows10SDK.20348 | ||
--remove Microsoft.VisualStudio.Component.Windows10SDK.22000 | ||
--quiet' | ||
- name: Download Visual Studio 2017 | ||
run: | | ||
curl -L "$env:VS2017_URL" -o "$HOME/$env:VS2017_FILENAME" | ||
if: steps.vs2017.outputs.cache-hit != 'true' | ||
- name: Install Visual Studio 2017 | ||
run: > | ||
Start-Process -FilePath "$HOME\$env:VS2017_FILENAME" -Wait -NoNewWindow -ArgumentList | ||
'install --productId Microsoft.VisualStudio.Product.Community --channelId VisualStudio.15.Release | ||
--add Microsoft.VisualStudio.Workload.NativeDesktop | ||
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 | ||
--add Microsoft.VisualStudio.Component.Windows10SDK.17763 | ||
--quiet --wait' | ||
- name: Fix OpenJDK permissions | ||
run: bash -c "chmod -R 0777 jdk" | ||
- name: Copy FreeType project file | ||
run: > | ||
Remove-Item "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ; | ||
Copy-Item -Path "$env:GITHUB_WORKSPACE\jdk\.github\workflows\freetype.vcxproj" | ||
-Destination "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ; | ||
- name: Configure | ||
run: > | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; | ||
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ; | ||
$env:FREETYPE_HOME = "$env:GITHUB_WORKSPACE\freetype" ; | ||
$env:JT_HOME = cygpath "$HOME/jtreg" ; | ||
& bash configure | ||
--with-toolchain-version=2017 | ||
--with-conf-name=windows-x64 | ||
${{ matrix.flags }} | ||
--with-user-release-suffix="$env:GITHUB_ACTOR-$env:GITHUB_SHA" | ||
--with-build-number=b00 | ||
--with-boot-jdk="$env:BOOT_JDK" | ||
--with-freetype-src="$env:FREETYPE_HOME" | ||
--with-jtreg="$env:JT_HOME" ; | ||
bash -c "cat $(find -name config.log)" | ||
working-directory: jdk | ||
- name: Build | ||
run: | | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; | ||
& make CONF_NAME=windows-x64 FORCE_MSC_VER=1912 FORCE_LD_VER=1412 images | ||
working-directory: jdk | ||
- name: Pack artifacts | ||
run: > | ||
dir ; | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
zip -r9 | ||
"${{ github.workspace }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip" | ||
j2sdk-image | ||
working-directory: jdk/build/windows-x64/images | ||
- name: Persist test bundles | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: | | ||
jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip | ||
windows_x86_build: | ||
name: Windows x86 | ||
runs-on: "windows-2019" | ||
needs: prerequisites | ||
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_x86 != 'false' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: | ||
- build release | ||
- build debug | ||
include: | ||
- flavor: build debug | ||
flags: --enable-debug | ||
artifact: -debug | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" | ||
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X86_BOOT_JDK_FILENAME }}" | ||
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X86_BOOT_JDK_URL }}" | ||
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X86_BOOT_JDK_SHA256 }}" | ||
VS2010_DIR: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_DIR }}" | ||
VS2010_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_FILENAME }}" | ||
VS2010_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_URL }}" | ||
VS2010_TORRENT_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_TORRENT_URL }}" | ||
VS2010_TORRENT_DIR: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_TORRENT_DIR }}" | ||
VS2010_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_SHA256 }}" | ||
steps: | ||
- name: Restore cygwin installer from cache | ||
id: cygwin-installer | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/setup-x86_64.exe | ||
key: cygwin-installer | ||
- name: Download cygwin installer | ||
run: | | ||
New-Item -Force -ItemType directory -Path "$HOME\cygwin" | ||
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe" | ||
if: steps.cygwin-installer.outputs.cache-hit != 'true' | ||
- name: Restore cygwin packages from cache | ||
id: cygwin | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/packages | ||
key: cygwin-packages-${{ runner.os }}-v1 | ||
- name: Install cygwin | ||
run: | | ||
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jdk | ||
- name: Checkout the FreeType source | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "freetype/freetype" | ||
ref: VER-2-8-1 | ||
path: freetype | ||
- name: Restore boot JDK from cache | ||
id: bootjdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} | ||
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 | ||
- name: Download boot JDK | ||
run: | | ||
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash.Hash -eq $env:BOOT_JDK_SHA256 | ||
& unzip "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -d "$HOME/bootjdk/$env:BOOT_JDK_VERSION" | ||
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
if: steps.bootjdk.outputs.cache-hit != 'true' | ||
- name: Restore Visual Studio 2010 from cache | ||
id: vs2010 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/${{ env.VS2010_DIR }} | ||
key: vs2010 | ||
- name: Download and unpack Visual Studio 2010 | ||
run: | | ||
mkdir "$HOME\$env:VS2010_DIR" | ||
$ImagePath = "$HOME/$env:VS2010_TORRENT_DIR/$env:VS2010_FILENAME" | ||
& aria2c -d "$HOME" --seed-time=0 --bt-stop-timeout=300 "$env:VS2010_TORRENT_URL" || & curl -L "$env:VS2010_URL" -o "$ImagePath" --create-dirs | ||
$FileHash = Get-FileHash -Algorithm SHA256 "$ImagePath" | ||
$FileHash.Hash -eq $env:VS2010_SHA256 | ||
& 7z x -o"$HOME/$env:VS2010_DIR" "$ImagePath" | ||
& dir "$HOME/$env:VS2010_DIR" | ||
if: steps.vs2010.outputs.cache-hit != 'true' | ||
- name: Install VS2010Express | ||
run: | | ||
Start-Process -FilePath "$HOME\$env:VS2010_DIR\VCExpress\setup.exe" -ArgumentList "/q /norestart" -Wait -NoNewWindow | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Fix OpenJDK permissions | ||
run: bash -c "chmod -R 0777 jdk" | ||
- name: Copy FreeType project file | ||
run: > | ||
Remove-Item "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ; | ||
Copy-Item -Path "$env:GITHUB_WORKSPACE\jdk\.github\workflows\freetype.vcxproj" | ||
-Destination "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ; | ||
- name: Configure | ||
run: > | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; | ||
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ; | ||
$env:FREETYPE_HOME = "$env:GITHUB_WORKSPACE\freetype" ; | ||
$env:JT_HOME = cygpath "$HOME/jtreg" ; | ||
& bash configure | ||
--with-conf-name=windows-x86 | ||
--with-toolchain-version=2010 | ||
--with-msvcr-dll='C:\Windows\SysWOW64\msvcr100.dll' | ||
--with-target-bits=32 | ||
${{ matrix.flags }} | ||
--with-user-release-suffix="$env:GITHUB_ACTOR-$env:GITHUB_SHA" | ||
--with-build-number=b00 | ||
--with-boot-jdk="$env:BOOT_JDK" | ||
--with-freetype-src="$env:FREETYPE_HOME" | ||
--with-jtreg="$env:JT_HOME" ; | ||
bash -c "cat $(find -name config.log)" | ||
working-directory: jdk | ||
- name: Build | ||
run: | | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; | ||
& make CONF_NAME=windows-x86 images | ||
working-directory: jdk | ||
- name: Pack artifacts | ||
run: > | ||
dir ; | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
zip -r9 | ||
"${{ github.workspace }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x86_bin${{ matrix.artifact }}.zip" | ||
j2sdk-image | ||
working-directory: jdk/build/windows-x86/images | ||
- name: Persist test bundles | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: transient_jdk-windows-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: | | ||
jdk-${{ env.JDK_VERSION }}-internal+0_windows-x86_bin${{ matrix.artifact }}.zip | ||
windows_x64_test: | ||
name: Windows x64 | ||
runs-on: "windows-2019" | ||
>>>>>>> jdk8u432-ga | ||
needs: | ||
- build-linux-aarch64 | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
platform: linux-aarch64 | ||
debug-suffix: -release | ||
runs-on: '["self-hosted", "ARM64"]' | ||
remove-bundles: | ||
name: 'Remove bundle artifacts' | ||
runs-on: ubuntu-22.04 | ||
<<<<<<< HEAD | ||
======= | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" | ||
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}" | ||
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}" | ||
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
- name: Restore boot JDK from cache | ||
id: bootjdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} | ||
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 | ||
- name: Download boot JDK | ||
run: | | ||
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash.Hash -eq $env:BOOT_JDK_SHA256 | ||
& unzip "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -d "$HOME/bootjdk/$env:BOOT_JDK_VERSION" | ||
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
if: steps.bootjdk.outputs.cache-hit != 'true' | ||
- name: Restore cygwin installer from cache | ||
id: cygwin-installer | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/setup-x86_64.exe | ||
key: cygwin-installer | ||
- name: Download cygwin installer | ||
run: | | ||
New-Item -Force -ItemType directory -Path "$HOME\cygwin" | ||
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe" | ||
if: steps.cygwin-installer.outputs.cache-hit != 'true' | ||
- name: Restore cygwin packages from cache | ||
id: cygwin | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/packages | ||
key: cygwin-packages-${{ runner.os }}-v1 | ||
- name: Install cygwin | ||
run: | | ||
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Restore build artifacts | ||
id: build_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-windows-x64${{ matrix.artifact }} | ||
continue-on-error: true | ||
- name: Restore build artifacts (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-windows-x64${{ matrix.artifact }} | ||
if: steps.build_restore.outcome == 'failure' | ||
- name: Unpack jdk | ||
run: | | ||
mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}" | ||
unzip "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip" -d "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}" | ||
- name: Create results dir | ||
run: | | ||
mkdir test-results | ||
- name: Run tests | ||
working-directory: test | ||
run: > | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; | ||
$env:PRODUCT_HOME = cygpath "$HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}/j2sdk-image" ; | ||
$env:JT_HOME = cygpath "$HOME/jtreg" ; | ||
$env:ALT_OUTPUTDIR = cygpath "$env:GITHUB_WORKSPACE/test-results" ; | ||
$env:JAVA_ARGS = "-XX:-CreateMinidumpOnCrash -Djdk.test.container.command=skipcontianer" ; | ||
$env:JTREG_TIMEOUT_FACTOR = "4" ; | ||
& make | ||
"${{ matrix.suites }}" | ||
- name: Check that all tests executed successfully | ||
if: always() | ||
run: > | ||
if ((Get-ChildItem -Path test-results\testoutput\*\exitcode.txt -Recurse | Select-String -Pattern '^0$' -NotMatch ).Count -gt 0) { | ||
Get-Content -Path test-results\testoutput\*\JTreport\text\newfailures.txt ; | ||
Get-Content -Path test-results\testoutput\*\JTreport\text\other_errors.txt ; | ||
exit 1 | ||
} | ||
- name: Create suitable test log artifact name | ||
if: always() | ||
run: echo ("logsuffix=" + ("${{ matrix.test }}" -replace "/", "_" -replace " ", "_")) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 | ||
- name: Package test results | ||
if: always() | ||
working-directory: test-results | ||
run: > | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
zip -r9 | ||
"$HOME/windows-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip" | ||
. | ||
-x "*ARCHIVE_BUNDLE.zip" | ||
continue-on-error: true | ||
- name: Persist test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: windows-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }} | ||
path: ~/windows-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip | ||
continue-on-error: true | ||
windows_x86_test: | ||
name: Windows x86 | ||
runs-on: "windows-2019" | ||
>>>>>>> jdk8u432-ga | ||
needs: | ||
- build-linux-x64 | ||
- build-linux-aarch64 | ||
- test-linux-x64 | ||
- test-linux-aarch64 | ||
steps: | ||
<<<<<<< HEAD | ||
- name: 'Get API configuration' | ||
id: api | ||
uses: actions/github-script@v6 | ||
with: | ||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }' | ||
- name: 'Remove bundle artifacts' | ||
run: | | ||
ALL_ARTIFACT_URLS="$(curl -s \ | ||
-H 'Accept: application/json;api-version=6.0-preview' \ | ||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \ | ||
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')" | ||
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')" | ||
for url in $BUNDLE_ARTIFACT_URLS; do | ||
echo "Removing $url" | ||
curl -s \ | ||
-H 'Accept: application/json;api-version=6.0-preview' \ | ||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \ | ||
-X DELETE "$url" \ | ||
|| echo "Failed to remove bundle" | ||
done | ||
#linux_x64_build: | ||
# needs: prerequisites | ||
# name: Linux x64 | ||
# runs-on: "ubuntu-20.04" | ||
# steps: | ||
# - name: Checkout target source | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.event.pull_request.head.sha }} | ||
# - name: Update apt and download dependency | ||
# run: | | ||
# sudo apt update -y | ||
# sudo apt install -y libxtst-dev libxt-dev libxrender-dev libxrandr-dev libxi-dev libcups2-dev libfontconfig1-dev libasound2-dev unzip zip openjdk-8-jdk | ||
# - name: Compile debug | ||
# run: | | ||
# sh configure --with-debug-level=fastdebug --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto | ||
# make images CONF=linux-x86_64-normal-server-fastdebug | ||
# - name: Compile release | ||
# run: | | ||
# make clean || true | ||
# [ -d build ] && rm -rf build | ||
# sh configure --with-debug-level=release --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto | ||
# make images CONF=linux-x86_64-normal-server-release | ||
# - name: Install dependencies | ||
# run: | | ||
# wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz | ||
# tar -xvf apache-maven-3.8.8-bin.tar.gz | ||
# - name: Download serverless-adapter-jdk8 source code | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# repository: dragonwell-project/serverless-adapter-jdk8 | ||
# ref: main | ||
# path: serverless-adapter-jdk8 | ||
# - name: Build serverless-adapter-jdk8 | ||
# run: | | ||
# export JAVA_HOME=../build/linux-x86_64-normal-server-release/images/j2sdk-image | ||
# ../apache-maven-3.8.8/bin/mvn package | ||
# mkdir -p ../build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/serverless | ||
# cp -f target/serverless-adapter-0.1.jar ../build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/serverless/serverless-adapter.jar | ||
# cp -f output/libloadclassagent.so ../build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/serverless/ | ||
# working-directory: serverless-adapter-jdk8 | ||
# - name: Upload Test image | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: dragonwell8_x86_release_image_${{ needs.prerequisites.outputs.bundle_id }} | ||
# path: | | ||
# build/linux-x86_64-normal-server-release/images/j2sdk-image | ||
#linux_x64_test: | ||
# name: Linux x64 Test | ||
# needs: | ||
# - prerequisites | ||
# - linux_x64_build | ||
# runs-on: "ubuntu-20.04" | ||
# container: | ||
# image: docker.io/dragonwelljdk/build_jdk:8u | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# test: | ||
# - jdk/test/:jdk_tier1 | ||
# - jdk/test/:dragonwell_jdk_features | ||
# - hotspot/test/:hotspot_tier1 | ||
# - hotspot/test/:hotspot_jwarmup | ||
# - hotspot/test/:hotspot_elastic_heap | ||
# - hotspot/test/:hotspot_multi_tenant | ||
# steps: | ||
# - name: Checkout target source | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.event.pull_request.head.sha }} | ||
# - name: Clear Dragonwell8 Dir | ||
# run: | | ||
# rm -rf /opt/dragonwell8 | ||
# - name: Download image | ||
# id: jtreg_restore | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: dragonwell8_x86_release_image_${{ needs.prerequisites.outputs.bundle_id }} | ||
# path: /opt/dragonwell8 | ||
# continue-on-error: false | ||
# - name: Test image version | ||
# run: | | ||
# ls /opt/dragonwell8 | ||
# chmod -R 777 /opt/dragonwell8 | ||
# /opt/dragonwell8/bin/java -version | ||
# - name: Test | ||
# run: | | ||
# jtreg -agentvm -a -ea -esa -v:fail,error,time,nopass -jdk:/opt/dragonwell8 -exclude:"/__w/dragonwell8/dragonwell8/hotspot/test/ProblemList.txt" -exclude:"/__w/dragonwell8/dragonwell8/jdk/test/ProblemList.txt" "${{ matrix.test }}" | ||
# - name: Check that all tests executed successfully | ||
# run: > | ||
# if [[ egrep -q "(failed|error)" /__w/dragonwell8/dragonwell8/JTreport/text/stats.txt ]]; then | ||
# cat /__w/dragonwell8/dragonwell8/JTreport/newfailures.txt /__w/dragonwell8/dragonwell8/JTreport/other_errors.txt; | ||
# exit 1 ; | ||
# fi | ||
#linux_aarch64_release_build: | ||
# needs: prerequisites | ||
# name: Linux aarch64(release) | ||
# runs-on: ["ubuntu", "ARM64"] | ||
# steps: | ||
# - name: Get boot jdk | ||
# run: | | ||
# if [ ! -f /home/${USER}/dragonwell8/dragonwell-8.15.16/bin/java ];then | ||
# mkdir -p /home/${USER}/dragonwell8 | ||
# rm -rf /home/${USER}/dragonwell8/* /home/${USER}/dragonwell8.tar.gz | ||
# wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/8.15.16/Alibaba_Dragonwell_Extended_8.15.16_aarch64_linux.tar.gz -O /home/${USER}/dragonwell8.tar.gz | ||
# tar zxf /home/${USER}/dragonwell8.tar.gz -C /home/${USER}/dragonwell8 | ||
# fi | ||
# - name: Checkout target source | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.event.pull_request.head.sha }} | ||
# - name: Compile release | ||
# run: | | ||
# sh configure --with-debug-level=release --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto --with-boot-jdk=/home/${USER}/dragonwell8/dragonwell-8.15.16 | ||
# make images CONF=linux-aarch64-normal-server-release | ||
# - name: Install dependencies | ||
# run: | | ||
# wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz | ||
# tar -xvf apache-maven-3.8.8-bin.tar.gz | ||
# - name: Download serverless-adapter-jdk8 source code | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# repository: dragonwell-project/serverless-adapter-jdk8 | ||
# ref: main | ||
# path: serverless-adapter-jdk8 | ||
# - name: Build serverless-adapter-jdk8 | ||
# run: | | ||
# export JAVA_HOME=../build/linux-aarch64-normal-server-release/images/j2sdk-image | ||
# ../apache-maven-3.8.8/bin/mvn package | ||
# mkdir -p ../build/linux-aarch64-normal-server-release/images/j2sdk-image/jre/lib/aarch64/serverless | ||
# cp -f target/serverless-adapter-0.1.jar ../build/linux-aarch64-normal-server-release/images/j2sdk-image/jre/lib/aarch64/serverless/serverless-adapter.jar | ||
# cp -f output/libloadclassagent.so ../build/linux-aarch64-normal-server-release/images/j2sdk-image/jre/lib/aarch64/serverless/ | ||
# ../build/linux-aarch64-normal-server-release/images/j2sdk-image/bin/java -version | ||
# working-directory: serverless-adapter-jdk8 | ||
# - name: Upload Test image | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: dragonwell8_aarch64_release_image_${{ needs.prerequisites.outputs.bundle_id }} | ||
# path: | | ||
# build/linux-aarch64-normal-server-release/images/j2sdk-image | ||
#linux_aarch64_debug_build: | ||
# needs: prerequisites | ||
# name: Linux aarch64(fastdebug) | ||
# runs-on: ["ubuntu", "ARM64"] | ||
# steps: | ||
# - name: Get boot jdk | ||
# run: | | ||
# if [ ! -f /home/${USER}/dragonwell8/dragonwell-8.15.16/bin/java ];then | ||
# mkdir -p /home/${USER}/dragonwell8 | ||
# rm -rf /home/${USER}/dragonwell8/* /home/${USER}/dragonwell8.tar.gz | ||
# wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/8.15.16/Alibaba_Dragonwell_Extended_8.15.16_aarch64_linux.tar.gz -O /home/${USER}/dragonwell8.tar.gz | ||
# tar zxf /home/${USER}/dragonwell8.tar.gz -C /home/${USER}/dragonwell8 | ||
# fi | ||
# - name: Checkout target source | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.event.pull_request.head.sha }} | ||
# - name: Compile debug | ||
# run: | | ||
# sh configure --with-debug-level=fastdebug --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto --with-boot-jdk=/home/${USER}/dragonwell8/dragonwell-8.15.16 | ||
# make images CONF=linux-aarch64-normal-server-fastdebug | ||
#linux_aarch64_test: | ||
# name: Linux aarch64 Test | ||
# needs: | ||
# - prerequisites | ||
# - linux_aarch64_release_build | ||
# runs-on: ["ubuntu", "ARM64"] | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# test: | ||
# - jdk/test/:jdk_tier1 | ||
# - jdk/test/:dragonwell_jdk_features | ||
# - hotspot/test/:hotspot_tier1 | ||
# - hotspot/test/:hotspot_jwarmup | ||
# - hotspot/test/:hotspot_elastic_heap | ||
# steps: | ||
# - name: Checkout target source | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.event.pull_request.head.sha }} | ||
# - name: Clear Dragonwell8 Dir | ||
# run: | | ||
# rm -rf /opt/dragonwell8 | ||
# - name: Download image | ||
# id: jtreg_restore | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: dragonwell8_aarch64_release_image_${{ needs.prerequisites.outputs.bundle_id }} | ||
# path: /opt/dragonwell8 | ||
# continue-on-error: false | ||
# - name: Test image version | ||
# run: | | ||
# ls /opt/dragonwell8 | ||
# chmod -R 777 /opt/dragonwell8 | ||
# /opt/dragonwell8/bin/java -version | ||
# - name: Get jtreg image | ||
# run: | | ||
# if [ ! -f /home/${USER}/jtreg/bin/jtreg ];then | ||
# wget https://compiler-ci-bucket.oss-cn-hangzhou.aliyuncs.com/tools/jtreg_5_1_b01.zip -O /home/${USER}/jtreg_5_1_b01.zip | ||
# cd /home/${USER} | ||
# unzip jtreg_5_1_b01.zip | ||
# fi | ||
# - name: Test | ||
# run: | | ||
# /home/${USER}/jtreg/bin/jtreg -agentvm -a -ea -esa -v:fail,error,time,nopass -jdk:/opt/dragonwell8 -exclude:"/home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/hotspot/test/ProblemList.txt" -exclude:"/home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/jdk/test/ProblemList.txt" "${{ matrix.test }}" | ||
# - name: Check that all tests executed successfully | ||
# run: > | ||
# if [ -n "$(cat /home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/JTreport/text/stats.txt | grep -E 'failed|error')" ]; then | ||
# cat /home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/JTreport/newfailures.txt /home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/JTreport/other_errors.txt; | ||
# exit 1 ; | ||
# fi | ||
======= | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
- name: Restore boot JDK from cache | ||
id: bootjdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} | ||
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 | ||
- name: Download boot JDK | ||
run: | | ||
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" | ||
$FileHash.Hash -eq $env:BOOT_JDK_SHA256 | ||
& unzip "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -d "$HOME/bootjdk/$env:BOOT_JDK_VERSION" | ||
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION" | ||
if: steps.bootjdk.outputs.cache-hit != 'true' | ||
- name: Restore cygwin installer from cache | ||
id: cygwin-installer | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/setup-x86_64.exe | ||
key: cygwin-installer | ||
- name: Download cygwin installer | ||
run: | | ||
New-Item -Force -ItemType directory -Path "$HOME\cygwin" | ||
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe" | ||
if: steps.cygwin-installer.outputs.cache-hit != 'true' | ||
- name: Restore cygwin packages from cache | ||
id: cygwin | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/cygwin/packages | ||
key: cygwin-packages-${{ runner.os }}-v1 | ||
- name: Install cygwin | ||
run: | | ||
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Restore build artifacts | ||
id: build_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-windows-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-windows-x86${{ matrix.artifact }} | ||
continue-on-error: true | ||
- name: Restore build artifacts (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-windows-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-windows-x86${{ matrix.artifact }} | ||
if: steps.build_restore.outcome == 'failure' | ||
- name: Unpack jdk | ||
run: | | ||
mkdir -p "${HOME}/jdk-windows-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x86_bin${{ matrix.artifact }}" | ||
unzip "${HOME}/jdk-windows-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x86_bin${{ matrix.artifact }}.zip" -d "${HOME}/jdk-windows-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x86_bin${{ matrix.artifact }}" | ||
- name: Create results dir | ||
run: | | ||
mkdir test-results | ||
- name: Run tests | ||
working-directory: test | ||
run: > | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; | ||
$env:PRODUCT_HOME = cygpath "$HOME/jdk-windows-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x86_bin${{ matrix.artifact }}/j2sdk-image" ; | ||
$env:JT_HOME = cygpath "$HOME/jtreg" ; | ||
$env:ALT_OUTPUTDIR = cygpath "$env:GITHUB_WORKSPACE/test-results" ; | ||
$env:JAVA_ARGS = "-XX:-CreateMinidumpOnCrash -Djdk.test.container.command=skipcontianer" ; | ||
$env:JTREG_TIMEOUT_FACTOR = "4" ; | ||
& make | ||
"${{ matrix.suites }}" | ||
- name: Check that all tests executed successfully | ||
if: always() | ||
run: > | ||
if ((Get-ChildItem -Path test-results\testoutput\*\exitcode.txt -Recurse | Select-String -Pattern '^0$' -NotMatch ).Count -gt 0) { | ||
Get-Content -Path test-results\testoutput\*\JTreport\text\newfailures.txt ; | ||
Get-Content -Path test-results\testoutput\*\JTreport\text\other_errors.txt ; | ||
exit 1 | ||
} | ||
- name: Create suitable test log artifact name | ||
if: always() | ||
run: echo ("logsuffix=" + ("${{ matrix.test }}" -replace "/", "_" -replace " ", "_")) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 | ||
- name: Package test results | ||
if: always() | ||
working-directory: test-results | ||
run: > | ||
$env:Path = "$HOME\cygwin\cygwin64\bin;$env:Path" ; | ||
zip -r9 | ||
"$HOME/windows-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip" | ||
. | ||
-x "*ARCHIVE_BUNDLE.zip" | ||
continue-on-error: true | ||
- name: Persist test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: windows-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }} | ||
path: ~/windows-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip | ||
continue-on-error: true | ||
macos_x64_build: | ||
name: macOS x64 | ||
runs-on: "macos-13" | ||
needs: prerequisites | ||
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_macos_x64 != 'false' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: | ||
- build release | ||
- build debug | ||
include: | ||
- flavor: build release | ||
- flavor: build debug | ||
flags: --enable-debug | ||
artifact: -debug | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" | ||
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}" | ||
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}" | ||
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_SHA256 }}" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jdk | ||
- name: Restore boot JDK from cache | ||
id: bootjdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} | ||
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 | ||
- name: Download boot JDK | ||
run: | | ||
mkdir -p ${HOME}/bootjdk/${BOOT_JDK_VERSION} || true | ||
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}" | ||
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | shasum -a 256 -c >/dev/null - | ||
tar -xzf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}" | ||
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/" | ||
if: steps.bootjdk.outputs.cache-hit != 'true' | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Fix jtreg permissions | ||
run: chmod -R a+rx ${HOME}/jtreg/ | ||
- name: Install dependencies | ||
run: brew install make gawk | ||
- name: Select Xcode version | ||
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer | ||
- name: Configure | ||
run: > | ||
bash configure | ||
--with-conf-name=macos-x64 | ||
${{ matrix.flags }} | ||
--with-user-release-suffix=${GITHUB_ACTOR}-${GITHUB_SHA} | ||
--with-build-number=b00 | ||
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home | ||
--with-jtreg=${HOME}/jtreg | ||
--with-zlib=system | ||
working-directory: jdk | ||
- name: Build | ||
run: make CONF_NAME=macos-x64 images | ||
working-directory: jdk | ||
- name: Pack artifacts | ||
run: | | ||
tar -czf jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}.tar.gz -C jdk/build/macos-x64/images j2sdk-image | ||
- name: Persist test bundles | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: | | ||
jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}.tar.gz | ||
macos_x64_test: | ||
name: macOS x64 | ||
runs-on: "macos-13" | ||
needs: | ||
- prerequisites | ||
- macos_x64_build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
- jdk/tier1 | ||
- langtools/tier1 | ||
- hotspot/tier1 | ||
include: | ||
- test: jdk/tier1 | ||
suites: jdk_tier1 | ||
- test: langtools/tier1 | ||
suites: langtools_tier1 | ||
- test: hotspot/tier1 | ||
suites: hotspot_tier1 | ||
env: | ||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}" | ||
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" | ||
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}" | ||
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}" | ||
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_SHA256 }}" | ||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v4 | ||
- name: Restore boot JDK from cache | ||
id: bootjdk | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} | ||
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 | ||
- name: Download boot JDK | ||
run: | | ||
mkdir -p ${HOME}/bootjdk/${BOOT_JDK_VERSION} || true | ||
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}" | ||
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | shasum -a 256 -c >/dev/null - | ||
tar -xzf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}" | ||
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/" | ||
if: steps.bootjdk.outputs.cache-hit != 'true' | ||
- name: Restore jtreg artifact | ||
id: jtreg_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
continue-on-error: true | ||
- name: Restore jtreg artifact (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jtreg/ | ||
if: steps.jtreg_restore.outcome == 'failure' | ||
- name: Restore build artifacts | ||
id: build_restore | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-macos-x64${{ matrix.artifact }} | ||
continue-on-error: true | ||
- name: Restore build artifacts (retry) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} | ||
path: ~/jdk-macos-x64${{ matrix.artifact }} | ||
if: steps.build_restore.outcome == 'failure' | ||
- name: Unpack jdk | ||
run: | | ||
mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}" | ||
tar -xzf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}" | ||
- name: Install dependencies | ||
run: brew install make gawk | ||
- name: Select Xcode version | ||
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer | ||
- name: Run tests | ||
run: > | ||
chmod +x "${HOME}/jtreg/bin/jtreg" && | ||
mkdir test-results && | ||
cd test && | ||
PRODUCT_HOME="${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}/j2sdk-image" | ||
JT_HOME="${HOME}/jtreg" | ||
ALT_OUTPUTDIR="${GITHUB_WORKSPACE}/test-results" | ||
JTREG_TIMEOUT_FACTOR="4" | ||
gmake | ||
"${{ matrix.suites }}" | ||
- name: Check that all tests executed successfully | ||
if: always() | ||
run: > | ||
if cat test-results/testoutput/*/exitcode.txt | grep -q -v '^0$' | ||
|| ! cat test-results/testoutput/*/Stats.txt | grep -q 'fail=0' ; then | ||
cat test-results/testoutput/*/JTreport/text/{newfailures,other_errors}.txt ; | ||
exit 1 ; | ||
fi | ||
- name: Create suitable test log artifact name | ||
if: always() | ||
run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV | ||
- name: Package test results | ||
if: always() | ||
working-directory: test-results | ||
run: > | ||
zip -r9 | ||
"$HOME/macos-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip" | ||
. | ||
-x "*ARCHIVE_BUNDLE.zip" | ||
continue-on-error: true | ||
- name: Persist test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }} | ||
path: ~/macos-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip | ||
continue-on-error: true | ||
artifacts: | ||
name: Post-process artifacts | ||
runs-on: "ubuntu-20.04" | ||
if: always() | ||
continue-on-error: true | ||
needs: | ||
- prerequisites | ||
- linux_additional_build | ||
- linux_x64_test | ||
- linux_x86_test | ||
- windows_x64_test | ||
- windows_x86_test | ||
- macos_x64_test | ||
steps: | ||
- name: Display current artifacts | ||
run: | | ||
curl -sL \ | ||
-H 'Accept: application/vnd.github+json' \ | ||
-H 'Authorization: Bearer ${{ github.token }}' \ | ||
-H 'X-GitHub-Api-Version: 2022-11-28' \ | ||
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts' | ||
- name: Delete transient artifacts | ||
run: | | ||
# Find and remove all transient artifacts | ||
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28 | ||
ALL_ARTIFACT_IDS="$(curl -sL \ | ||
-H 'Accept: application/vnd.github+json' \ | ||
-H 'Authorization: Bearer ${{ github.token }}' \ | ||
-H 'X-GitHub-Api-Version: 2022-11-28' \ | ||
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts')" | ||
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("transient_"))) | .[].id')" | ||
for id in $BUNDLE_ARTIFACT_IDS; do | ||
echo "Removing $id" | ||
curl -sL \ | ||
-X DELETE \ | ||
-H 'Accept: application/vnd.github+json' \ | ||
-H 'Authorization: Bearer ${{ github.token }}' \ | ||
-H 'X-GitHub-Api-Version: 2022-11-28' \ | ||
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \ | ||
|| echo "Failed to remove bundle" | ||
done | ||
- name: Upload a combined test results artifact | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: test-results_${{ needs.prerequisites.outputs.bundle_id }} | ||
separate-directories: false | ||
delete-merged: true | ||
>>>>>>> jdk8u432-ga |