diff --git a/.github/actions/build-serverless-adapter/action.yml b/.github/actions/build-serverless-adapter/action.yml
new file mode 100644
index 00000000000..034161b3b2c
--- /dev/null
+++ b/.github/actions/build-serverless-adapter/action.yml
@@ -0,0 +1,103 @@
+#
+# Copyright (c) 2024 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: 'Build serverless-adapter'
+description: 'Build it using built JDK'
+inputs:
+ platform:
+ description: 'Platform name'
+ required: true
+ debug-suffix:
+ description: 'File name suffix denoting debug level, possibly empty'
+ required: false
+
+runs:
+ using: composite
+ steps:
+ - name: 'Found bundle'
+ id: bundle_found
+ run: |
+ # Only support linux now.
+ jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
+
+ if [[ "$jdk_bundle_tar_gz" != "" ]]; then
+ jdk_bundle_name=${jdk_bundle_tar_gz##*/}
+ echo "jdk_pkg=$jdk_bundle_tar_gz" >> $GITHUB_OUTPUT
+ echo "jdk_pkg_name=$jdk_bundle_name" >> $GITHUB_OUTPUT
+ echo "decompress_cmd=tar zxf" >> $GITHUB_OUTPUT
+ echo "decompress_redirect_flag=-C" >> $GITHUB_OUTPUT
+ echo "decompress_extra_cmd=--strip-components=1" >> $GITHUB_OUTPUT
+ echo "compress_cmd=tar zcf" >> $GITHUB_OUTPUT
+ else
+ echo "jdk_pkg=" >> $GITHUB_OUTPUT
+ echo "jdk_pkg_name=" >> $GITHUB_OUTPUT
+ echo "decompress_cmd=" >> $GITHUB_OUTPUT
+ echo "decompress_redirect_flag=" >> $GITHUB_OUTPUT
+ echo "decompress_extra_cmd=" >> $GITHUB_OUTPUT
+ echo "compress_cmd=" >> $GITHUB_OUTPUT
+ fi
+ shell: bash
+
+ - name: 'Bundle decompression'
+ id: bundle_decompress
+ run: |
+ mkdir -p bundle_workdir
+ ${{ steps.bundle_found.outputs.decompress_cmd }} ${{ steps.bundle_found.outputs.jdk_pkg }} ${{ steps.bundle_found.outputs.decompress_redirect_flag }} bundle_workdir ${{ steps.bundle_found.outputs.decompress_extra_cmd }}
+ bin_path=$(find bundle_workdir -name bin)
+ pwd=$(pwd)
+ java_home_path=${bin_path%%'/bin'*}
+ echo "bundle_home=$pwd/bundle_workdir" >> $GITHUB_OUTPUT
+ echo "java_home=$pwd/$java_home_path" >> $GITHUB_OUTPUT
+ shell: bash
+ if: steps.bundle_found.outputs.jdk_pkg != '' && steps.bundle_found.outputs.decompress_cmd != ''
+
+ - name: 'Checkout serverless-adapter source code'
+ id: serverless_adapter_checkout
+ uses: actions/checkout@v3
+ with:
+ repository: dragonwell-project/serverless-adapter
+ ref: main
+ path: serverless-adapter
+
+ - name: 'Build serverless-adapter'
+ id: serverless_adapter_build
+ run: |
+ JAVA_HOME=${{ steps.bundle_decompress.outputs.java_home }};PATH=${{ steps.bundle_decompress.outputs.java_home }}/bin:$PATH mvn package
+ shell: bash
+ working-directory: serverless-adapter
+
+ - name: 'Copy serverless-adapter into boot jdk'
+ run: |
+ mkdir -p ${{ steps.bundle_decompress.outputs.java_home }}/lib/serverless
+ cp -f serverless-adapter/target/serverless-adapter-0.1.jar ${{ steps.bundle_decompress.outputs.java_home }}/lib/serverless/serverless-adapter.jar
+ cp -f serverless-adapter/output/libloadclassagent.so ${{ steps.bundle_decompress.outputs.java_home }}/lib/serverless/libloadclassagent.so
+ shell: bash
+
+ - name: 'Regenerate bundle'
+ run: |
+ cd ${{ steps.bundle_decompress.outputs.bundle_home }}
+ if [[ -f "${{ steps.bundle_found.outputs.jdk_pkg_name }}" ]]; then
+ rm -rf ${{ steps.bundle_found.outputs.jdk_pkg_name }}
+ fi
+ ${{ steps.bundle_found.outputs.compress_cmd }} ${{ steps.bundle_found.outputs.jdk_pkg_name }} *
+ cd -
+ mv -f ${{ steps.bundle_decompress.outputs.bundle_home }}/${{ steps.bundle_found.outputs.jdk_pkg_name }} ${{ steps.bundle_found.outputs.jdk_pkg }}
+ shell: bash
diff --git a/.github/actions/config/action.yml b/.github/actions/config/action.yml
index 5f648ffc022..50d34126bd3 100644
--- a/.github/actions/config/action.yml
+++ b/.github/actions/config/action.yml
@@ -43,4 +43,6 @@ runs:
# Extract value from configuration file
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
echo "value=$value" >> $GITHUB_OUTPUT
+ dragonwell_value="$(grep -h ${{ inputs.var }}= make/conf/test-dependencies | cut -d '=' -f 2-)"
+ echo "value=$value" >> $GITHUB_OUTPUT
shell: bash
diff --git a/.github/actions/get-jtreg/action.yml b/.github/actions/get-jtreg/action.yml
index 1a6ffeb126b..596f5058191 100644
--- a/.github/actions/get-jtreg/action.yml
+++ b/.github/actions/get-jtreg/action.yml
@@ -57,7 +57,9 @@ runs:
- name: 'Build JTReg'
run: |
# Build JTReg and move files to the proper locations
- bash make/build.sh --jdk "$JAVA_HOME_11_X64"
+ jdkPath="$(which java)"
+ javaHome=${jdkPath%%'/bin'*}
+ bash make/build.sh --jdk "$javaHome"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml
index 646ac5ed3a6..567b79dfaf1 100644
--- a/.github/workflows/build-linux.yml
+++ b/.github/workflows/build-linux.yml
@@ -61,11 +61,15 @@ on:
make-arguments:
required: false
type: string
+ runs-on:
+ required: true
+ type: string
jobs:
build-linux:
name: build
- runs-on: ubuntu-22.04
+ runs-on: ${{fromJson(inputs.runs-on)}}
+ #runs-on: 'ubuntu-20.04'
strategy:
fail-fast: false
@@ -80,11 +84,11 @@ jobs:
- name: 'Checkout the JDK source'
uses: actions/checkout@v4
- - name: 'Get the BootJDK'
+ - name: 'Get boot JDK'
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
- platform: linux-x64
+ platform: ${{ inputs.platform }}
- name: 'Get JTReg'
id: jtreg
@@ -105,9 +109,14 @@ jobs:
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
sudo dpkg --add-architecture ${{ inputs.apt-architecture }}
fi
- sudo apt-get update
- sudo apt-get install --only-upgrade apt
- sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
+ sudo apt-get update -y
+ sudo apt-get install -y --only-upgrade apt
+ if [[ '${{ inputs.platform }}' == 'linux-aarch64' ]]; then
+ extra_packages='libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libfontconfig1-dev maven tar zip unzip'
+ else
+ extra_packages=
+ fi
+ sudo apt-get install -y gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }} $extra_packages
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
- name: 'Configure'
@@ -116,6 +125,7 @@ jobs:
--with-conf-name=${{ inputs.platform }}
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
+ --with-version-build=0
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
--with-jtreg=${{ steps.jtreg.outputs.path }}
--enable-jtreg-failure-handler
@@ -133,6 +143,13 @@ jobs:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
+ - name: 'Build serverless-adapter'
+ id: build-serverless-adapter
+ uses: ./.github/actions/build-serverless-adapter
+ with:
+ platform: ${{ inputs.platform }}
+ debug-suffix: '${{ matrix.suffix }}'
+
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
diff --git a/.github/workflows/build-riscv.yml b/.github/workflows/build-riscv.yml
new file mode 100644
index 00000000000..51221dd153d
--- /dev/null
+++ b/.github/workflows/build-riscv.yml
@@ -0,0 +1,114 @@
+#
+# Copyright (c) 2024 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: 'Build (riscv)'
+
+on:
+ workflow_call:
+ inputs:
+ platform:
+ required: true
+ type: string
+ extra-conf-options:
+ required: false
+ type: string
+ make-target:
+ required: false
+ type: string
+ default: 'product-bundles test-bundles'
+ debug-levels:
+ required: false
+ type: string
+ default: '[ "release" ]'
+ gcc-major-version:
+ required: false
+ type: string
+ gcc-package-suffix:
+ required: false
+ type: string
+ default: ''
+ apt-architecture:
+ required: false
+ type: string
+ apt-extra-packages:
+ required: false
+ type: string
+ configure-arguments:
+ required: false
+ type: string
+ make-arguments:
+ required: false
+ type: string
+
+jobs:
+ build-linux:
+ name: build
+ runs-on: [self-hosted , X64]
+ container:
+ image: docker.io/alibabadragonwelljdk/centos7_gcc7_build_image:latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ debug-level: ${{ fromJSON(inputs.debug-levels) }}
+
+ steps:
+ - name: 'Checkout the JDK source'
+ uses: actions/checkout@v2
+
+ - name: 'Configure'
+ run: >
+ LD_LIBRARY_PATH=/opt/riscv_toolchain_linux/lib64
+ PATH=/opt/riscv_toolchain_linux/bin:/usr/local/gcc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ bash configure
+ --verbose
+ --with-vendor-name=Alibaba
+ --with-vendor-url=http://www.alibabagroup.com
+ --with-vendor-bug-url='mailto:dragonwell_use@googlegroups.com'
+ --with-vendor-vm-bug-url='mailto:dragonwell_use@googlegroups.com'
+ --without-version-opt
+ --without-version-pre
+ --with-version-build=9
+ --with-version-patch=14
+ --with-boot-jdk=/usr/lib/jvm/jdk-10
+ --with-native-debug-symbols=external
+ --with-jvm-variants=server
+ --disable-warnings-as-errors
+ --openjdk-target=riscv64-unknown-linux-gnu
+ --with-sysroot=/opt/fedora28_riscv_root
+ ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
+ echo "Dumping config.log:" &&
+ cat config.log &&
+ exit 1)
+
+ - name: 'Build'
+ id: build
+ uses: ./.github/actions/do-build
+ with:
+ make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
+ platform: ${{ inputs.platform }}
+ debug-suffix: '${{ matrix.suffix }}'
+
+ - name: 'Upload bundles'
+ uses: ./.github/actions/upload-bundles
+ with:
+ platform: ${{ inputs.platform }}
+ debug-suffix: '${{ matrix.suffix }}'
diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml
index 04f7905ca77..7278993553b 100644
--- a/.github/workflows/check_pr.yml
+++ b/.github/workflows/check_pr.yml
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2019 Alibaba Group Holding Limited. All Rights Reserved.
+# Copyright (c) 2024 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
@@ -19,91 +19,105 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
-name: Dragonwell_11_build_test
+name: Prerequisites
-on: [pull_request]
+on:
+ workflow_call:
+ inputs:
+ platforms:
+ required: true
+ type: string
+ outputs:
+ should_run:
+ value: ${{ jobs.prerequisites.outputs.should_run }}
+ bundle_id:
+ value: ${{ jobs.prerequisites.outputs.bundle_id }}
+ jdk_version:
+ value: ${{ jobs.prerequisites.outputs.jdk_version }}
+ platform_linux_x64:
+ value: ${{ jobs.prerequisites.outputs.platform_linux_x64 }}
+ platform_linux_aarch64:
+ value: ${{ jobs.prerequisites.outputs.platform_linux_aarch64 }}
+ platform_windows_x64:
+ value: ${{ jobs.prerequisites.outputs.platform_windows_x64 }}
+ platform_riscv64:
+ value: ${{ jobs.prerequisites.outputs.platform_riscv64 }}
+ dependencies:
+ value: ${{ jobs.prerequisites.outputs.dependencies }}
jobs:
check_commit:
+ name: 'Check Commit Message'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dragonwell-releng/check_commit_action@master
+ if: github.event_name == 'pull_request'
- build_release_amd64_jdk:
+ prerequisites:
+ name: 'Prerequisites'
runs-on: ubuntu-latest
- container:
- image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
- steps:
- - uses: actions/checkout@v2
- - name: Compile release mode on amd64
- run: |
- chmod 755 configure
- bash make.sh release
-
- - name: Sanity test
- run: |
- TEST_JDK_HOME=build/linux-x86_64-normal-server-release/images/jdk
- ${TEST_JDK_HOME}/bin/java -version
+ outputs:
+ should_run: ${{ steps.check_submit.outputs.should_run }}
+ bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
+ jdk_version: ${{ steps.check_jdk_versions.outputs.jdk_version }}
+ platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
+ platform_linux_aarch64: ${{ steps.check_platforms.outputs.platform_linux_aarch64 }}
+ platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
+ platform_riscv64: ${{ steps.check_platforms.outputs.platform_riscv64 }}
+ dependencies: ${{ steps.check_deps.outputs.dependencies }}
- build_release_arm64_jdk:
- runs-on: [self-hosted , ARM64]
- container:
- image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- - uses: actions/checkout@v2
- - name: Compile release mode on arm64
- run: |
- chmod 755 configure
- bash make.sh release
+ - name: 'Check if submit tests should actually run depending on secrets and manual triggering'
+ id: check_submit
+ run: echo "::set-output name=should_run::${{ inputs.platforms != '' || (!secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/')) }}"
- - name: Sanity test
+ - name: 'Check which platforms should be included'
+ id: check_platforms
run: |
- TEST_JDK_HOME=build/linux-aarch64-normal-server-release/images/jdk
- ${TEST_JDK_HOME}/bin/java -version
+ echo "::set-output name=platform_linux_x64::${{ contains(inputs.platforms, 'linux x64') || (inputs.platforms == '') }}"
+ echo "::set-output name=platform_linux_aarch64::${{ contains(inputs.platforms, 'linux aarch64') || (inputs.platforms == '') }}"
+ echo "::set-output name=platform_windows_x64::${{ contains(inputs.platforms, 'windows x64') || (inputs.platforms == '') }}"
+ echo "::set-output name=platform_riscv64::${{ contains(inputs.platforms, 'riscv64') || (inputs.platforms == '') }}"
+ if: steps.check_submit.outputs.should_run != false
- build_fastdebug_amd64_jdk:
- runs-on: ubuntu-latest
- container:
- image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
- steps:
- - uses: actions/checkout@v2
- - name: Compile slowdebug mode
- run: |
- chmod 755 configure
- bash make.sh fastdebug
+ - name: 'Determine unique bundle identifier'
+ id: check_bundle_id
+ run: echo "::set-output name=bundle_id::${GITHUB_ACTOR}_${GITHUB_SHA:0:8}"
+ if: steps.check_submit.outputs.should_run != 'false'
- - name: Sanity test
- run: |
- TEST_JDK_HOME=build/linux-x86_64-normal-server-fastdebug/images/jdk
- ${TEST_JDK_HOME}/bin/java -version
+ - name: 'Checkout the source'
+ uses: actions/checkout@v3
+ with:
+ path: jdk
+ if: steps.check_submit.outputs.should_run != 'false'
- build_slowdebug_amd64_jdk:
- runs-on: ubuntu-latest
- container:
- image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
- steps:
- - uses: actions/checkout@v2
- - name: Compile slowdebug mode
- run: |
- chmod 755 configure
- bash make.sh debug
+ - name: 'Determine versions and locations to be used for dependencies'
+ id: check_deps
+ run: "echo ::set-output name=dependencies::`cat make/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,\\}$/\\}/'`"
+ working-directory: jdk
+ if: steps.check_submit.outputs.should_run != 'false'
- - name: Sanity test
- run: |
- TEST_JDK_HOME=build/linux-x86_64-normal-server-slowdebug/images/jdk
- ${TEST_JDK_HOME}/bin/java -version
+ - name: 'Print extracted dependencies to the log'
+ run: "echo '${{ steps.check_deps.outputs.dependencies }}'"
+ if: steps.check_submit.outputs.should_run != 'false'
- build_release_riscv_jdk:
- runs-on: [self-hosted , X64]
- container:
- image: docker.io/alibabadragonwelljdk/centos7_gcc7_build_image:latest
- steps:
- - uses: actions/checkout@v2
- - name: Compile release mode riscv jdk
+ - name: 'Determine full JDK versions'
+ id: check_jdk_versions
+ shell: bash
run: |
- chmod 755 configure
- LD_LIBRARY_PATH=/opt/riscv_toolchain_linux/lib64 \
- PATH=/opt/riscv_toolchain_linux/bin:/usr/local/gcc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
- bash configure --verbose --with-vendor-name=Alibaba --with-vendor-url=http://www.alibabagroup.com --with-vendor-bug-url='mailto:dragonwell_use@googlegroups.com' --with-vendor-vm-bug-url='mailto:dragonwell_use@googlegroups.com' --with-vendor-name=Alibaba --with-vendor-url=http://www.alibabagroup.com --with-vendor-bug-url='mailto:dragonwell_use@googlegroups.com' --with-vendor-vm-bug-url='mailto:dragonwell_use@googlegroups.com' --without-version-opt --without-version-pre --with-version-build=9 --with-version-patch=14 --with-boot-jdk=/usr/lib/jvm/jdk-10 --with-debug-level=release --with-native-debug-symbols=external --with-jvm-variants=server --disable-warnings-as-errors --openjdk-target=riscv64-unknown-linux-gnu --with-sysroot=/opt/fedora28_riscv_root -with-boot-jdk=/usr/lib/jvm/jdk-10 --openjdk-target=riscv64-unknown-linux-gnu --with-sysroot=/opt/fedora28_riscv_root
- make images
+ FEATURE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_FEATURE }}
+ INTERIM=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_INTERIM }}
+ UPDATE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_UPDATE }}
+ PATCH=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_PATCH }}
+ if [ "x${PATCH}" != "x0" ]; then
+ V=${FEATURE}.${INTERIM}.${UPDATE}.${PATCH}
+ elif [ "x${UPDATE}" != "x0" ]; then
+ V=${FEATURE}.${INTERIM}.${UPDATE}
+ elif [ "x${INTERIM}" != "x0" ]; then
+ V={FEATURE}.${INTERIM}
+ else
+ V=${FEATURE}
+ fi
+ echo "::set-output name=jdk_version::${V}"
+ if: steps.check_submit.outputs.should_run != 'false'
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8bccbadaa54..846e521e561 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,16 +1,16 @@
#
-# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2024 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. Oracle designates this
+# 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
+# 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).
#
@@ -18,30 +18,32 @@
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-name: 'OpenJDK GHA Sanity Checks'
-#on:
-# push:
-# branches-ignore:
-# - master
-# - pr/*
-# workflow_dispatch:
-# inputs:
-# platforms:
-# description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
-# required: true
-# default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64'
-# configure-arguments:
-# description: 'Additional configure arguments'
-# required: false
-# make-arguments:
-# description: 'Additional make arguments'
-# required: false
+name: 'Dragonwell GHA Sanity Checks'
+
+on:
+ pull_request:
+ branches:
+ - master
+ push:
+ branches-ignore:
+ - pr/*
+ - dragonwell_extended-*
+ - dragonwell_standard-*
+ workflow_dispatch:
+ inputs:
+ platforms:
+ description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
+ required: true
+ #default: 'linux-x64, linux-cross-compile, windows-x64'
+ #default: 'linux-x64, linux-aarch64'
+ default: 'linux aarch64'
+ configure-arguments:
+ description: 'Additional configure arguments'
+ required: false
+ make-arguments:
+ description: 'Additional make arguments'
+ required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -53,69 +55,11 @@ jobs:
### Determine platforms to include
###
- select:
- name: 'Select platforms'
- runs-on: ubuntu-22.04
- outputs:
- linux-x64: ${{ steps.include.outputs.linux-x64 }}
- linux-x86: ${{ steps.include.outputs.linux-x86 }}
- linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
- linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
- macos-x64: ${{ steps.include.outputs.macos-x64 }}
- macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
- windows-x64: ${{ steps.include.outputs.windows-x64 }}
- windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
-
- steps:
- # This function must be inlined in main.yml, or we'd be forced to checkout the repo
- - name: 'Check what jobs to run'
- id: include
- run: |
- # Determine which platform jobs to run
-
- # Returns 'true' if the input platform list matches any of the platform monikers given as argument,
- # 'false' otherwise.
- # arg $1: platform name or names to look for
- function check_platform() {
- if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
- input='${{ github.event.inputs.platforms }}'
- elif [[ $GITHUB_EVENT_NAME == push ]]; then
- if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
- # If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
- >&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
- echo 'false'
- return
- else
- input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
- fi
- fi
-
- normalized_input="$(echo ,$input, | tr -d ' ')"
- if [[ "$normalized_input" == ",," ]]; then
- # For an empty input, assume all platforms should run
- echo 'true'
- return
- else
- # Check for all acceptable platform names
- for part in $* ; do
- if echo "$normalized_input" | grep -q -e ",$part," ; then
- echo 'true'
- return
- fi
- done
- fi
-
- echo 'false'
- }
-
- echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
- echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
- echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
- echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
- echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
- echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
- echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
- echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
+ prerequisites:
+ name: Prerequisites
+ uses: ./.github/workflows/check_pr.yml
+ with:
+ platforms: 'linux x64, linux aarch64, windows x64, riscv64'
###
### Build jobs
@@ -123,128 +67,35 @@ jobs:
build-linux-x64:
name: linux-x64
- needs: select
- uses: ./.github/workflows/build-linux.yml
- with:
- platform: linux-x64
- gcc-major-version: '10'
- configure-arguments: ${{ github.event.inputs.configure-arguments }}
- make-arguments: ${{ github.event.inputs.make-arguments }}
- # The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
- if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
-
- build-linux-x86:
- name: linux-x86
- needs: select
- uses: ./.github/workflows/build-linux.yml
- with:
- platform: linux-x86
- gcc-major-version: '10'
- gcc-package-suffix: '-multilib'
- apt-architecture: 'i386'
- # Some multilib libraries do not have proper inter-dependencies, so we have to
- # install their dependencies manually.
- apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
- extra-conf-options: '--with-target-bits=32'
- configure-arguments: ${{ github.event.inputs.configure-arguments }}
- make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.linux-x86 == 'true'
-
- build-linux-x64-hs-nopch:
- name: linux-x64-hs-nopch
- needs: select
+ needs: prerequisites
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
- make-target: 'hotspot'
- debug-levels: '[ "debug" ]'
gcc-major-version: '10'
- extra-conf-options: '--disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.linux-x64-variants == 'true'
-
- build-linux-x64-hs-zero:
- name: linux-x64-hs-zero
- needs: select
+ extra-conf-options: --with-default-make-target="product-bundles test-bundles" --with-jvm-features=shenandoahgc
+ make-target: CONF_NAME=linux-x64
+ runs-on: '"ubuntu-20.04"'
+ if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x64 != 'false'
+
+ build-linux-aarch64:
+ name: linux-aarch64
+ needs: prerequisites
uses: ./.github/workflows/build-linux.yml
with:
- platform: linux-x64
- make-target: 'hotspot'
- debug-levels: '[ "debug" ]'
+ platform: linux-aarch64
gcc-major-version: '10'
- extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.linux-x64-variants == 'true'
-
- build-linux-x64-hs-minimal:
- name: linux-x64-hs-minimal
- needs: select
- uses: ./.github/workflows/build-linux.yml
- with:
- platform: linux-x64
- make-target: 'hotspot'
- debug-levels: '[ "debug" ]'
- gcc-major-version: '10'
- extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
- configure-arguments: ${{ github.event.inputs.configure-arguments }}
- make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.linux-x64-variants == 'true'
-
- build-linux-x64-hs-optimized:
- name: linux-x64-hs-optimized
- needs: select
- uses: ./.github/workflows/build-linux.yml
- with:
- platform: linux-x64
- make-target: 'hotspot'
- # Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
- debug-levels: '[ "debug" ]'
- gcc-major-version: '10'
- extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
- configure-arguments: ${{ github.event.inputs.configure-arguments }}
- make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.linux-x64-variants == 'true'
-
- build-linux-cross-compile:
- name: linux-cross-compile
- needs:
- - select
- - build-linux-x64
- uses: ./.github/workflows/build-cross-compile.yml
- with:
- gcc-major-version: '10'
- configure-arguments: ${{ github.event.inputs.configure-arguments }}
- make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.linux-cross-compile == 'true'
-
- build-macos-x64:
- name: macos-x64
- needs: select
- uses: ./.github/workflows/build-macos.yml
- with:
- platform: macos-x64
- xcode-toolset-version: '11.7'
- configure-arguments: ${{ github.event.inputs.configure-arguments }}
- make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.macos-x64 == 'true'
-
- build-macos-aarch64:
- name: macos-aarch64
- needs: select
- uses: ./.github/workflows/build-macos.yml
- with:
- platform: macos-aarch64
- xcode-toolset-version: '12.4'
- extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
- configure-arguments: ${{ github.event.inputs.configure-arguments }}
- make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.macos-aarch64 == 'true'
+ extra-conf-options: --with-default-make-target="product-bundles test-bundles" --with-jvm-features=shenandoahgc
+ make-target: CONF_NAME=linux-aarch64
+ runs-on: '["self-hosted", "ARM64"]'
+ if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_aarch64 != 'false'
build-windows-x64:
name: windows-x64
- needs: select
+ needs: prerequisites
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x64
@@ -252,21 +103,22 @@ jobs:
msvc-toolset-architecture: 'x86.x64'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.windows-x64 == 'true'
-
- build-windows-aarch64:
- name: windows-aarch64
- needs: select
- uses: ./.github/workflows/build-windows.yml
+ extra-conf-options: --with-default-make-target="product-bundles test-bundles" --with-jvm-features=shenandoahgc
+ make-target: CONF_NAME=windows-x64
+ if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_x64 != 'false'
+
+ build-riscv64:
+ name: riscv64
+ needs: prerequisites
+ uses: ./.github/workflows/build-riscv.yml
with:
- platform: windows-aarch64
- msvc-toolset-version: '14.29'
- msvc-toolset-architecture: 'arm64'
- make-target: 'hotspot'
- extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
+ platform: riscv64
+ debug-levels: '[ "release" ]'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
- if: needs.select.outputs.windows-aarch64 == 'true'
+ make-target: 'images'
+ extra-conf-options: --with-default-make-target="product-bundles test-bundles" --with-jvm-features=shenandoahgc
+ if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_riscv64 != 'false'
###
### Test jobs
@@ -280,27 +132,17 @@ jobs:
with:
platform: linux-x64
bootjdk-platform: linux-x64
- runs-on: ubuntu-22.04
-
- test-linux-x86:
- name: linux-x86
- needs:
- - build-linux-x86
- uses: ./.github/workflows/test.yml
- with:
- platform: linux-x86
- bootjdk-platform: linux-x64
- runs-on: ubuntu-22.04
+ runs-on: '"ubuntu-20.04"'
- test-macos-x64:
- name: macos-x64
+ test-linux-aarch64:
+ name: linux-aarch64
needs:
- - build-macos-x64
+ - build-linux-aarch64
uses: ./.github/workflows/test.yml
with:
- platform: macos-x64
- bootjdk-platform: macos-x64
- runs-on: macos-11
+ platform: linux-aarch64
+ bootjdk-platform: linux-aarch64
+ runs-on: '["self-hosted", "ARM64"]'
test-windows-x64:
name: windows-x64
@@ -310,28 +152,19 @@ jobs:
with:
platform: windows-x64
bootjdk-platform: windows-x64
- runs-on: windows-2019
+ runs-on: '"windows-2019"'
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
- if: always()
+ # if: always()
needs:
- build-linux-x64
- - build-linux-x86
- - build-linux-x64-hs-nopch
- - build-linux-x64-hs-zero
- - build-linux-x64-hs-minimal
- - build-linux-x64-hs-optimized
- - build-linux-cross-compile
- - build-macos-x64
- - build-macos-aarch64
+ - build-linux-aarch64
- build-windows-x64
- - build-windows-aarch64
+ - build-riscv64
- test-linux-x64
- - test-linux-x86
- - test-macos-x64
- test-windows-x64
steps:
diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml
deleted file mode 100644
index 425b468b5ac..00000000000
--- a/.github/workflows/submit.yml
+++ /dev/null
@@ -1,1916 +0,0 @@
-name: Pre-submit tests
-
-on:
- pull_request:
- branches:
- - master
- push:
- branches-ignore:
- - master
- - pr/*
- - dragonwell_extended-*
- - dragonwell_standard-*
- workflow_dispatch:
- inputs:
- platforms:
- description: "Platform(s) to execute on"
- required: true
- #default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows x64, macOS x64"
- # Disable Linux additional for now
- default: "Linux x64, Linux x86, Windows x64, macOS x64"
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-jobs:
- prerequisites:
- name: Prerequisites
- runs-on: "ubuntu-20.04"
- outputs:
- should_run: ${{ steps.check_submit.outputs.should_run }}
- bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
- #platform_linux_additional: ${{ steps.check_platforms.outputs.platform_linux_additional }}
- jdk_version: ${{ steps.check_jdk_versions.outputs.jdk_version }}
- platform_linux_additional: false
- platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
- platform_linux_aarch64: ${{ steps.check_platforms.outputs.platform_linux_aarch64 }}
- platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
- platform_macos_x64: ${{ steps.check_platforms.outputs.platform_macos_x64 }}
- platform_macos_aarch64: ${{ steps.check_platforms.outputs.platform_macos_aarch64 }}
- dependencies: ${{ steps.check_deps.outputs.dependencies }}
-
- steps:
- - name: Check if submit tests should actually run depending on secrets and manual triggering
- id: check_submit
- run: echo "::set-output name=should_run::${{ github.event.inputs.platforms != '' || (!secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/')) }}"
-
- - name: Check which platforms should be included
- id: check_platforms
- run: |
- 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'))) }}"
- echo "::set-output name=platform_linux_aarch64::${{ contains(github.event.inputs.platforms, 'linux aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux aarch64'))) }}"
- 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'))) }}"
- 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'))) }}"
- echo "::set-output name=platform_macos_aarch64::${{ contains(github.event.inputs.platforms, 'macos aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos aarch64'))) }}"
- if: steps.check_submit.outputs.should_run != 'false'
-
- - name: Determine unique bundle identifier
- id: check_bundle_id
- run: echo "::set-output name=bundle_id::${GITHUB_ACTOR}_${GITHUB_SHA:0:8}"
- if: steps.check_submit.outputs.should_run != 'false'
-
- - name: Checkout the source
- uses: actions/checkout@v3
- 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 ::set-output name=dependencies::`cat make/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,\\}$/\\}/'`"
- 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 full JDK versions
- id: check_jdk_versions
- shell: bash
- run: |
- FEATURE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_FEATURE }}
- INTERIM=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_INTERIM }}
- UPDATE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_UPDATE }}
- PATCH=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_PATCH }}
- if [ "x${PATCH}" != "x0" ]; then
- V=${FEATURE}.${INTERIM}.${UPDATE}.${PATCH}
- elif [ "x${UPDATE}" != "x0" ]; then
- V=${FEATURE}.${INTERIM}.${UPDATE}
- elif [ "x${INTERIM}" != "x0" ]; then
- V={FEATURE}.${INTERIM}
- else
- V=${FEATURE}
- fi
- echo "::set-output name=jdk_version::${V}"
- 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 }} >> $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@v3
- 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@v3
- 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.sh --jdk ${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@v3
- 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"
- needs: prerequisites
- if: needs.prerequisites.outputs.should_run != 'false' && (needs.prerequisites.outputs.platform_linux_x64 != 'false' || needs.prerequisites.outputs.platform_linux_additional == 'true')
-
- strategy:
- fail-fast: false
- matrix:
- flavor:
- - build release
- - build debug
- include:
- - flavor: build debug
- flags: --enable-debug
- artifact: -debug
- artifact-path: fastdebug/
-
- env:
- JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}"
- BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
- BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
- BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
- BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
-
- steps:
- - name: Checkout the source
- uses: actions/checkout@v3
- with:
- path: jdk
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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}"
- wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
- echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
- tar -xf "${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@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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 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-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
- --with-version-build=0
- --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
- --with-jtreg=${HOME}/jtreg
- --with-default-make-target="product-bundles test-bundles"
- --with-zlib=system
- --with-jvm-features=shenandoahgc
- --enable-jtreg-failure-handler
- working-directory: jdk
-
- - name: Build
- run: make CONF_NAME=linux-x64
- working-directory: jdk
-
- - name: Download serverless-adapter source code
- uses: actions/checkout@v3
- with:
- repository: dragonwell-project/serverless-adapter
- ref: main
- path: serverless-adapter
-
- - name: Build serverless-adapter
- run: mvn package
- working-directory: serverless-adapter
-
- - name: Copy serverless-adapter into bundles
- run: |
- mkdir -p tmp
- cd tmp
- cp ../jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz ./
- tar xf jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz
- rm -rf jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz
- mkdir -p jdk-${{ env.JDK_VERSION }}/${{ matrix.artifact-path }}lib/serverless
- cp -f ../serverless-adapter/target/serverless-adapter-0.1.jar jdk-${{ env.JDK_VERSION }}/${{ matrix.artifact-path }}lib/serverless/serverless-adapter.jar
- cp -f ../serverless-adapter/output/libloadclassagent.so jdk-${{ env.JDK_VERSION }}/${{ matrix.artifact-path }}lib/serverless/
- tar zcf jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz *
- cp -f jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz ../jdk/build/linux-x64/bundles/
- cd ..
- rm -rf tmp
-
- - name: Persist test bundles
- uses: actions/upload-artifact@v3
- with:
- name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
- path: |
- jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz
- jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ 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 part 1
- - jdk/tier1 part 2
- - jdk/tier1 part 3
- - langtools/tier1
- - hs/tier1 common
- - hs/tier1 compiler
- - hs/tier1 gc
- - hs/tier1 runtime
- - hs/tier1 serviceability
- - dragonwell/hs feature
- - dragonwell/jdk feature
- include:
- - test: jdk/tier1 part 1
- suites: test/jdk/:tier1_part1
- - test: jdk/tier1 part 2
- suites: test/jdk/:tier1_part2
- - test: jdk/tier1 part 3
- suites: test/jdk/:tier1_part3
- - test: langtools/tier1
- suites: test/langtools/:tier1
- - test: hs/tier1 common
- suites: test/hotspot/jtreg/:tier1_common
- artifact: -debug
- - test: hs/tier1 compiler
- suites: test/hotspot/jtreg/:tier1_compiler
- artifact: -debug
- - test: hs/tier1 gc
- suites: test/hotspot/jtreg/:tier1_gc
- artifact: -debug
- - test: hs/tier1 runtime
- suites: test/hotspot/jtreg/:tier1_runtime
- artifact: -debug
- - test: hs/tier1 serviceability
- suites: test/hotspot/jtreg/:tier1_serviceability
- artifact: -debug
- - test: dragonwell/hs feature
- suites: test/hotspot/jtreg/:dragonwell_hs
- - test: dragonwell/jdk feature
- suites: test/jdk/:dragonwell_jdk
- env:
- JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}"
- BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
- BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
- BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
- BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
-
- steps:
- - name: Checkout the source
- uses: actions/checkout@v3
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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}"
- wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
- echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
- tar -xf "${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@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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@v3
- 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@v3
- 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: Unpack jdk
- run: |
- mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}"
- tar -xf "${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: Unpack tests
- run: |
- mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
- tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
-
- - name: Find root of jdk image dir
- run: |
- imageroot=`find ${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }} -name release -type f`
- echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
-
- - name: Configure bash as default
- run: |
- sudo chsh -s /bin/bash $(whoami)
-
-
- - name: Run tests
- id: run_tests
- run: >
- JDK_IMAGE_DIR=${{ env.imageroot }}
- TEST_IMAGE_DIR=${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}
- BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
- JT_HOME=${HOME}/jtreg
- make run-test-prebuilt
- CONF_NAME=run-test-prebuilt
- LOG_CMDLINES=true
- JTREG_VERBOSE=fail,error,time
- TEST="${{ matrix.suites }}"
- TEST_OPTS_JAVA_OPTIONS=
- JTREG_KEYWORDS="!headful"
- JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash"
-
- - name: Generate test failure summary
- run: |
- #
- test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
- results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
-
- failures=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/newfailures.txt || true)
- errors=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/other_errors.txt || true)
- failure_count=$(echo $failures | wc -w || true)
- error_count=$(echo $errors | wc -w || true)
-
- if [[ "$failures" = "" && "$errors" = "" ]]; then
- # If we have nothing to report, exit this step now
- exit 0
- fi
-
- echo "::error:: Test run reported $failure_count test failure(s) and $error_count error(s). See summary for details."
-
- echo "### :boom: Test failures summary" >> $GITHUB_STEP_SUMMARY
-
- if [[ "$failures" != "" ]]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "These tests reported failure:" >> $GITHUB_STEP_SUMMARY
- for test in $failures; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- echo "* [$test](#user-content-$anchor)"
- done >> $GITHUB_STEP_SUMMARY
- fi
-
- if [[ "$errors" != "" ]]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "These tests reported errors:" >> $GITHUB_STEP_SUMMARY
- for test in $errors; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- echo "* [$test](#user-content-$anchor)"
- done >> $GITHUB_STEP_SUMMARY
- fi
-
- - name: Collect failed test output
- run: |
- #
- # This is a separate step, since if the markdown from a step gets bigger than
- # 1024 kB it is skipped, but then the summary above is still generated
- test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
- results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
- report_dir=build/run-test-prebuilt/test-support/$test_suite_name
-
- failures=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/newfailures.txt || true)
- errors=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/other_errors.txt || true)
-
- if [[ "$failures" = "" && "$errors" = "" ]]; then
- # If we have nothing to report, exit this step now
- exit 0
- fi
-
- echo "### Test output for failed tests" >> $GITHUB_STEP_SUMMARY
- for test in $failures $errors; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- base_path="$(echo "$test" | tr '#' '_')"
- report_file="$report_dir/$base_path.jtr"
- hs_err_files="$report_dir/$base_path/hs_err*.log"
- echo "#### $test"
-
- echo "View test results
"
- echo ""
- echo '```'
- if [[ -f "$report_file" ]]; then
- cat "$report_file"
- else
- echo "Error: Result file $report_file not found"
- fi
- echo '```'
- echo " "
- echo ""
-
- if [[ "$hs_err_files" != "" ]]; then
- echo "View HotSpot error log
"
- echo ""
- for hs_err in $hs_err_files; do
- echo '```'
- echo "$hs_err:"
- echo ""
- cat "$hs_err"
- echo '```'
- done
-
- echo " "
- echo ""
- fi
-
- done >> $GITHUB_STEP_SUMMARY
-
- echo ":arrow_right: To see the entire test log, click the job in the list to the left" >> $GITHUB_STEP_SUMMARY
-
- # This will abort the entire job in GHA, which is what we want
- exit 1
-
- - 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: build/run-test-prebuilt/test-results/
- run: >
- zip -r9
- "$HOME/linux-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip"
- .
- continue-on-error: true
-
- - name: Package test support
- if: always()
- working-directory: build/run-test-prebuilt/test-support/
- run: >
- zip -r9
- "$HOME/linux-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip"
- .
- -i *.jtr
- -i */hs_err*.log
- -i */replay*.log
- continue-on-error: true
-
- - name: Persist test results
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/linux-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip
- continue-on-error: true
-
- - name: Persist test outputs
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/linux-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
- continue-on-error: true
-
- linux_aarch64_build:
- name: Linux aarch64
- runs-on: [self-hosted , ARM64]
- needs: prerequisites
- if: needs.prerequisites.outputs.should_run != 'false' && (needs.prerequisites.outputs.platform_linux_aarch64 != 'false' || needs.prerequisites.outputs.platform_linux_additional == 'true')
-
- strategy:
- fail-fast: false
- matrix:
- flavor:
- - build release
- - build debug
- include:
- - flavor: build debug
- flags: --enable-debug
- artifact: -debug
- env:
- JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}"
- BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
- BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_AARCH64_BOOT_JDK_FILENAME }}"
- BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_AARCH64_BOOT_JDK_URL }}"
- BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_AARCH64_BOOT_JDK_SHA256 }}"
-
- steps:
- - name: Checkout the source
- uses: actions/checkout@v3
- with:
- path: jdk
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- with:
- path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
- key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
-
- - name: Restore jtreg artifact
- id: jtreg_restore
- uses: actions/download-artifact@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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: Configure
- run: >
- bash configure
- --with-conf-name=linux-aarch64
- ${{ matrix.flags }}
- --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
- --with-version-build=0
- --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
- --with-jtreg=${HOME}/jtreg
- --with-default-make-target="product-bundles test-bundles"
- --with-zlib=system
- --with-jvm-features=shenandoahgc
- --enable-jtreg-failure-handler
- working-directory: jdk
-
- - name: Build
- run: make CONF_NAME=linux-aarch64
- working-directory: jdk
-
- - name: Download serverless-adapter source code
- uses: actions/checkout@v3
- with:
- repository: dragonwell-project/serverless-adapter
- ref: main
- path: serverless-adapter
-
- - name: Build serverless-adapter
- run: |
- export JAVA_HOME=../jdk/build/linux-aarch64/images/jdk
- mvn package
- working-directory: serverless-adapter
-
- - name: Copy serverless-adapter into bundles
- run: |
- mkdir -p tmp
- cd tmp
- cp ../jdk/build/linux-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}.tar.gz ./
- tar xf jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}.tar.gz
- rm -rf jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}.tar.gz
- mkdir -p jdk-${{ env.JDK_VERSION }}/${{ matrix.artifact-path }}lib/serverless
- cp -f ../serverless-adapter/target/serverless-adapter-0.1.jar jdk-${{ env.JDK_VERSION }}/${{ matrix.artifact-path }}lib/serverless/serverless-adapter.jar
- cp -f ../serverless-adapter/output/libloadclassagent.so jdk-${{ env.JDK_VERSION }}/${{ matrix.artifact-path }}lib/serverless/
- tar zcf jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}.tar.gz *
- cp -f jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}.tar.gz ../jdk/build/linux-aarch64/bundles/
- cd ..
- rm -rf tmp
-
- - name: Persist test bundles
- uses: actions/upload-artifact@v3
- with:
- name: transient_jdk-linux-aarch64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
- path: |
- jdk/build/linux-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}.tar.gz
- jdk/build/linux-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin-tests${{ matrix.artifact }}.tar.gz
-
- linux_aarch64_test:
- name: Linux aarch64
- runs-on: [self-hosted , ARM64]
- needs:
- - prerequisites
- - linux_aarch64_build
-
- strategy:
- fail-fast: false
- matrix:
- test:
- - jdk/tier1 part 1
- - jdk/tier1 part 2
- - jdk/tier1 part 3
- - langtools/tier1
- - hs/tier1 common
- - hs/tier1 compiler
- - hs/tier1 gc
- - hs/tier1 runtime
- - hs/tier1 serviceability
- - dragonwell/hs feature
- - dragonwell/jdk feature
- include:
- - test: jdk/tier1 part 1
- suites: test/jdk/:tier1_part1
- - test: jdk/tier1 part 2
- suites: test/jdk/:tier1_part2
- - test: jdk/tier1 part 3
- suites: test/jdk/:tier1_part3
- - test: langtools/tier1
- suites: test/langtools/:tier1
- - test: hs/tier1 common
- suites: test/hotspot/jtreg/:tier1_common
- artifact: -debug
- - test: hs/tier1 compiler
- suites: test/hotspot/jtreg/:tier1_compiler
- artifact: -debug
- - test: hs/tier1 gc
- suites: test/hotspot/jtreg/:tier1_gc
- artifact: -debug
- - test: hs/tier1 runtime
- suites: test/hotspot/jtreg/:tier1_runtime
- artifact: -debug
- - test: hs/tier1 serviceability
- suites: test/hotspot/jtreg/:tier1_serviceability
- artifact: -debug
- - test: dragonwell/hs feature
- suites: test/hotspot/jtreg/:dragonwell_hs
- - test: dragonwell/jdk feature
- suites: test/jdk/:dragonwell_jdk
- env:
- JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}"
- BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
- BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_AARCH64_BOOT_JDK_FILENAME }}"
- BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_AARCH64_BOOT_JDK_URL }}"
- BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_AARCH64_BOOT_JDK_SHA256 }}"
-
- steps:
- - name: Checkout the source
- uses: actions/checkout@v3
- with:
- path: jdk
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- with:
- path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
- key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
-
- - name: Restore jtreg artifact
- id: jtreg_restore
- uses: actions/download-artifact@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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@v3
- with:
- name: transient_jdk-linux-aarch64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jdk-linux-aarch64${{ matrix.artifact }}
- continue-on-error: true
-
- - name: Restore build artifacts (retry)
- uses: actions/download-artifact@v3
- with:
- name: transient_jdk-linux-aarch64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jdk-linux-aarch64${{ matrix.artifact }}
- if: steps.build_restore.outcome == 'failure'
-
- - name: Unpack jdk
- run: |
- mkdir -p "${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}"
- tar -xf "${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }}"
-
- - name: Unpack tests
- run: |
- mkdir -p "${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin-tests${{ matrix.artifact }}"
- tar -xf "${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin-tests${{ matrix.artifact }}"
-
- - name: Find root of jdk image dir
- run: |
- imageroot=`find ${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin${{ matrix.artifact }} -name release -type f`
- echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
-
- - name: Configure bash as default
- run: |
- sudo chsh -s /bin/bash $(whoami)
-
-
- - name: Run tests
- id: run_tests
- run: >
- JDK_IMAGE_DIR=${{ env.imageroot }}
- TEST_IMAGE_DIR=${HOME}/jdk-linux-aarch64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-aarch64_bin-tests${{ matrix.artifact }}
- BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
- JT_HOME=${HOME}/jtreg
- make run-test-prebuilt
- CONF_NAME=run-test-prebuilt
- LOG_CMDLINES=true
- JTREG_VERBOSE=fail,error,time
- TEST="${{ matrix.suites }}"
- TEST_OPTS_JAVA_OPTIONS=
- JTREG_KEYWORDS="!headful"
- JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash"
- working-directory: jdk
-
- - name: Generate test failure summary
- run: |
- #
- test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
- results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
-
- failures=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/newfailures.txt || true)
- errors=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/other_errors.txt || true)
- failure_count=$(echo $failures | wc -w || true)
- error_count=$(echo $errors | wc -w || true)
-
- if [[ "$failures" = "" && "$errors" = "" ]]; then
- # If we have nothing to report, exit this step now
- exit 0
- fi
-
- echo "::error:: Test run reported $failure_count test failure(s) and $error_count error(s). See summary for details."
-
- echo "### :boom: Test failures summary" >> $GITHUB_STEP_SUMMARY
-
- if [[ "$failures" != "" ]]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "These tests reported failure:" >> $GITHUB_STEP_SUMMARY
- for test in $failures; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- echo "* [$test](#user-content-$anchor)"
- done >> $GITHUB_STEP_SUMMARY
- fi
-
- if [[ "$errors" != "" ]]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "These tests reported errors:" >> $GITHUB_STEP_SUMMARY
- for test in $errors; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- echo "* [$test](#user-content-$anchor)"
- done >> $GITHUB_STEP_SUMMARY
- fi
- working-directory: jdk
-
- - name: Collect failed test output
- run: |
- #
- # This is a separate step, since if the markdown from a step gets bigger than
- # 1024 kB it is skipped, but then the summary above is still generated
- test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
- results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
- report_dir=build/run-test-prebuilt/test-support/$test_suite_name
-
- failures=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/newfailures.txt || true)
- errors=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/other_errors.txt || true)
-
- if [[ "$failures" = "" && "$errors" = "" ]]; then
- # If we have nothing to report, exit this step now
- exit 0
- fi
-
- echo "### Test output for failed tests" >> $GITHUB_STEP_SUMMARY
- for test in $failures $errors; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- base_path="$(echo "$test" | tr '#' '_')"
- report_file="$report_dir/$base_path.jtr"
- hs_err_files="$report_dir/$base_path/hs_err*.log"
- echo "#### $test"
-
- echo "View test results
"
- echo ""
- echo '```'
- if [[ -f "$report_file" ]]; then
- cat "$report_file"
- else
- echo "Error: Result file $report_file not found"
- fi
- echo '```'
- echo " "
- echo ""
-
- if [[ "$hs_err_files" != "" ]]; then
- echo "View HotSpot error log
"
- echo ""
- for hs_err in $hs_err_files; do
- echo '```'
- echo "$hs_err:"
- echo ""
- cat "$hs_err"
- echo '```'
- done
-
- echo " "
- echo ""
- fi
-
- done >> $GITHUB_STEP_SUMMARY
-
- echo ":arrow_right: To see the entire test log, click the job in the list to the left" >> $GITHUB_STEP_SUMMARY
-
- # This will abort the entire job in GHA, which is what we want
- exit 1
- working-directory: jdk
-
- - 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: build/run-test-prebuilt/test-results/
- run: >
- zip -r9
- "$HOME/linux-aarch64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip"
- .
- continue-on-error: true
-
- - name: Package test support
- if: always()
- working-directory: build/run-test-prebuilt/test-support/
- run: >
- zip -r9
- "$HOME/linux-aarch64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip"
- .
- -i *.jtr
- -i */hs_err*.log
- -i */replay*.log
- continue-on-error: true
-
- - name: Persist test results
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/linux-aarch64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip
- continue-on-error: true
-
- - name: Persist test outputs
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/linux-aarch64${{ matrix.artifact }}_testsupport_${{ 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 aarch64 build only
- include:
- - flavor: hs aarch64 build only
- flags: --enable-debug --disable-precompiled-headers
- debian-arch: arm64
- gnu-arch: aarch64
-
- env:
- JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}"
- BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
- BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
- BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
- BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
-
- steps:
- - name: Checkout the source
- uses: actions/checkout@v3
- with:
- path: jdk
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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}"
- wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
- echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
- tar -xf "${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 build JDK
- id: build_restore
- uses: actions/download-artifact@v3
- with:
- name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jdk-linux-x64
- continue-on-error: true
-
- - name: Restore build JDK (retry)
- uses: actions/download-artifact@v3
- with:
- name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jdk-linux-x64
- if: steps.build_restore.outcome == 'failure'
-
- - name: Unpack build JDK
- run: |
- mkdir -p "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
- tar -xf "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin.tar.gz" -C "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
-
- - name: Find root of build JDK image dir
- run: |
- build_jdk_root=`find ${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin -name release -type f`
- echo "build_jdk_root=`dirname ${build_jdk_root}`" >> $GITHUB_ENV
-
- - name: Update apt
- run: sudo apt-get update
-
- - name: Install native host dependencies
- run: |
- sudo apt-get install gcc-9=9.4.0-1ubuntu1~20.04.1 g++-9=9.4.0-1ubuntu1~20.04.1 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 cross-compilation host dependencies
- run: sudo apt-get install gcc-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=9.4.0-1ubuntu1~20.04.1cross2 g++-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=9.4.0-1ubuntu1~20.04.1cross2
- if: matrix.debian-arch != ''
-
- - name: Cache sysroot
- id: cache-sysroot
- uses: actions/cache@v3
- 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
- --resolve-deps
- buster
- ~/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 }}/
- " >> $GITHUB_ENV
- if: matrix.debian-arch != ''
-
- - name: Configure
- run: >
- bash configure
- --with-conf-name=linux-${{ matrix.gnu-arch }}-hotspot
- ${{ matrix.flags }}
- ${{ env.cross_flags }}
- --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
- --with-version-build=0
- --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
- --with-build-jdk=${{ env.build_jdk_root }}
- --with-default-make-target="hotspot"
- --with-zlib=system
- working-directory: jdk
-
- - name: Build
- run: make CONF_NAME=linux-${{ matrix.gnu-arch }}-hotspot
- working-directory: jdk
-
- 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: "${{ needs.prerequisites.outputs.jdk_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: Restore cygwin installer from cache
- id: cygwin-installer
- uses: actions/cache@v3
- 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@v3
- 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 cygwin=3.3.5-1,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@v3
- with:
- path: jdk
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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
- & tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$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 jtreg artifact
- id: jtreg_restore
- uses: actions/download-artifact@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- if: steps.jtreg_restore.outcome == 'failure'
-
- - name: Ensure a specific version of MSVC is installed
- 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" --quiet
- --add Microsoft.VisualStudio.Component.VC.14.28.x86.x64'
-
- - 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:JT_HOME = cygpath "$HOME/jtreg" ;
- & bash configure
- --with-conf-name=windows-x64
- --with-msvc-toolset-version=14.28
- ${{ matrix.flags }}
- --with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
- --with-version-build=0
- --with-boot-jdk="$env:BOOT_JDK"
- --with-jtreg="$env:JT_HOME"
- --with-default-make-target="product-bundles test-bundles"
- --with-jvm-features=shenandoahgc
- --enable-jtreg-failure-handler
- 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
- working-directory: jdk
-
- - name: Persist test bundles
- uses: actions/upload-artifact@v3
- with:
- name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
- path: |
- jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip
- jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz
- jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz
-
- windows_x64_test:
- name: Windows x64
- runs-on: "windows-2019"
- needs:
- - prerequisites
- - windows_x64_build
-
- strategy:
- fail-fast: false
- matrix:
- test:
- - jdk/tier1 part 1
- - jdk/tier1 part 2
- - jdk/tier1 part 3
- - hs/tier1 common
- include:
- - test: jdk/tier1 part 1
- suites: test/jdk/:tier1_part1
- - test: jdk/tier1 part 2
- suites: test/jdk/:tier1_part2
- - test: jdk/tier1 part 3
- suites: test/jdk/:tier1_part3
- - test: hs/tier1 common
- suites: test/hotspot/jtreg/:tier1_common
- artifact: -debug
-
- env:
- JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_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@v3
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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
- & tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$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@v3
- 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@v3
- 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 cygwin=3.3.5-1,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@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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@v3
- 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@v3
- 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 }}"
- tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}"
-
- - name: Unpack symbols
- run: |
- mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols"
- tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols"
-
- - name: Unpack tests
- run: |
- mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}"
- tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}"
-
- - name: Find root of jdk image dir
- run: echo ("imageroot=" + (Get-ChildItem -Path $HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }} -Filter release -Recurse -ErrorAction SilentlyContinue -Force).DirectoryName) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8
-
- - name: Run tests
- id: run_tests
- 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:JDK_IMAGE_DIR = cygpath "${{ env.imageroot }}" ;
- $env:SYMBOLS_IMAGE_DIR = cygpath "${{ env.imageroot }}" ;
- $env:TEST_IMAGE_DIR = cygpath "$HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}" ;
- $env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
- $env:JT_HOME = cygpath "$HOME/jtreg" ;
- & make run-test-prebuilt
- CONF_NAME=run-test-prebuilt
- LOG_CMDLINES=true
- JTREG_VERBOSE=fail,error,time
- TEST=${{ matrix.suites }}
- TEST_OPTS_JAVA_OPTIONS=
- JTREG_KEYWORDS="!headful"
- JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash"
-
- - name: Check that all tests executed successfully
- if: steps.run_tests.outcome != 'skipped'
- run: >
- if ((Get-ChildItem -Path build\*\test-results\test-summary.txt -Recurse | Select-String -Pattern "TEST SUCCESS" ).Count -eq 0) {
- Get-Content -Path build\*\test-results\*\*\newfailures.txt ;
- Get-Content -Path build\*\test-results\*\*\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: build/run-test-prebuilt/test-results/
- run: >
- $env:Path = "$HOME\cygwin\cygwin64\bin;$env:Path" ;
- zip -r9
- "$HOME/windows-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip"
- .
- continue-on-error: true
-
- - name: Package test support
- if: always()
- working-directory: build/run-test-prebuilt/test-support/
- run: >
- $env:Path = "$HOME\cygwin\cygwin64\bin;$env:Path" ;
- zip -r9
- "$HOME/windows-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip"
- .
- -i *.jtr
- -i */hs_err*.log
- -i */replay*.log
- continue-on-error: true
-
- - name: Persist test results
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/windows-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip
- continue-on-error: true
-
- - name: Persist test outputs
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/windows-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
- continue-on-error: true
-
- macos_x64_build:
- name: macOS x64
- runs-on: "macos-11"
- 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: "${{ needs.prerequisites.outputs.jdk_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@v3
- with:
- path: jdk
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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 -xf "${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@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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
-
- - name: Select Xcode version
- run: sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
-
- - name: Configure
- run: >
- bash configure
- --with-conf-name=macos-x64
- ${{ matrix.flags }}
- --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
- --with-version-build=0
- --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
- --with-jtreg=${HOME}/jtreg
- --with-default-make-target="product-bundles test-bundles"
- --with-zlib=system
- --with-jvm-features=shenandoahgc
- --enable-jtreg-failure-handler
- working-directory: jdk
-
- - name: Build
- run: make CONF_NAME=macos-x64
- working-directory: jdk
-
- - name: Persist test bundles
- uses: actions/upload-artifact@v3
- with:
- name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
- path: |
- jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}.tar.gz
- jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}.tar.gz
-
- macos_aarch64_build:
- name: macOS aarch64
- runs-on: "macos-11"
- needs: prerequisites
- if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_macos_aarch64 != '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: "${{ needs.prerequisites.outputs.jdk_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@v3
- with:
- path: jdk
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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 -xf "${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@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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
-
- - name: Select Xcode version
- run: sudo xcode-select --switch /Applications/Xcode_12.4.app/Contents/Developer
-
- - name: Configure
- run: >
- bash configure
- --with-conf-name=macos-aarch64
- --openjdk-target=aarch64-apple-darwin
- ${{ matrix.flags }}
- --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
- --with-version-build=0
- --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
- --with-jtreg=${HOME}/jtreg
- --with-default-make-target="product-bundles test-bundles"
- --with-zlib=system
- --with-jvm-features=shenandoahgc
- --enable-jtreg-failure-handler
- working-directory: jdk
-
- - name: Build
- run: make CONF_NAME=macos-aarch64
- working-directory: jdk
-
- - name: Persist test bundles
- uses: actions/upload-artifact@v3
- with:
- name: transient_jdk-macos-aarch64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
- path: |
- jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-aarch64_bin${{ matrix.artifact }}.tar.gz
- jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-aarch64_bin-tests${{ matrix.artifact }}.tar.gz
-
-
- macos_x64_test:
- name: macOS x64
- runs-on: "macos-11"
- needs:
- - prerequisites
- - macos_x64_build
-
- strategy:
- fail-fast: false
- matrix:
- test:
- - jdk/tier1 part 1
- - jdk/tier1 part 2
- - jdk/tier1 part 3
- - hs/tier1 common
- include:
- - test: jdk/tier1 part 1
- suites: test/jdk/:tier1_part1
- - test: jdk/tier1 part 2
- suites: test/jdk/:tier1_part2
- - test: jdk/tier1 part 3
- suites: test/jdk/:tier1_part3
- - test: hs/tier1 common
- suites: test/hotspot/jtreg/:tier1_common
- artifact: -debug
-
- env:
- JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_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@v3
-
- - name: Restore boot JDK from cache
- id: bootjdk
- uses: actions/cache@v3
- 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 -xf "${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@v3
- with:
- name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
- path: ~/jtreg/
- continue-on-error: true
-
- - name: Restore jtreg artifact (retry)
- uses: actions/download-artifact@v3
- 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@v3
- 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@v3
- 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_macos-x64_bin${{ matrix.artifact }}"
- tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}"
-
- - name: Unpack tests
- run: |
- mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}"
- tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}"
-
- - name: Install dependencies
- run: brew install make
-
- - name: Select Xcode version
- run: sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
-
- - name: Find root of jdk image dir
- run: |
- imageroot=`find ${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }} -name release -type f`
- echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
-
- - name: Run tests
- id: run_tests
- run: >
- JDK_IMAGE_DIR=${{ env.imageroot }}
- TEST_IMAGE_DIR=${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}
- BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
- JT_HOME=${HOME}/jtreg
- gmake run-test-prebuilt
- CONF_NAME=run-test-prebuilt
- LOG_CMDLINES=true
- JTREG_VERBOSE=fail,error,time
- TEST=${{ matrix.suites }}
- TEST_OPTS_JAVA_OPTIONS=
- JTREG_KEYWORDS="!headful"
- JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash"
-
- - name: Generate test failure summary
- run: |
- #
- test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
- results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
-
- failures=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/newfailures.txt || true)
- errors=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/other_errors.txt || true)
- failure_count=$(echo $failures | wc -w || true)
- error_count=$(echo $errors | wc -w || true)
-
- if [[ "$failures" = "" && "$errors" = "" ]]; then
- # If we have nothing to report, exit this step now
- exit 0
- fi
-
- echo "::error:: Test run reported $failure_count test failure(s) and $error_count error(s). See summary for details."
-
- echo "### :boom: Test failures summary" >> $GITHUB_STEP_SUMMARY
-
- if [[ "$failures" != "" ]]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "These tests reported failure:" >> $GITHUB_STEP_SUMMARY
- for test in $failures; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- echo "* [$test](#user-content-$anchor)"
- done >> $GITHUB_STEP_SUMMARY
- fi
-
- if [[ "$errors" != "" ]]; then
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "These tests reported errors:" >> $GITHUB_STEP_SUMMARY
- for test in $errors; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- echo "* [$test](#user-content-$anchor)"
- done >> $GITHUB_STEP_SUMMARY
- fi
-
- - name: Collect failed test output
- run: |
- #
- # This is a separate step, since if the markdown from a step gets bigger than
- # 1024 kB it is skipped, but then the summary above is still generated
- test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
- results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
- report_dir=build/run-test-prebuilt/test-support/$test_suite_name
-
- failures=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/newfailures.txt || true)
- errors=$(sed -e 's!\(.*\)\.java!\1!' -e '/^#/d' $results_dir/other_errors.txt || true)
-
- if [[ "$failures" = "" && "$errors" = "" ]]; then
- # If we have nothing to report, exit this step now
- exit 0
- fi
-
- echo "### Test output for failed tests" >> $GITHUB_STEP_SUMMARY
- for test in $failures $errors; do
- anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
- base_path="$(echo "$test" | tr '#' '_')"
- report_file="$report_dir/$base_path.jtr"
- hs_err_files="$report_dir/$base_path/hs_err*.log"
- echo "#### $test"
-
- echo "View test results
"
- echo ""
- echo '```'
- if [[ -f "$report_file" ]]; then
- cat "$report_file"
- else
- echo "Error: Result file $report_file not found"
- fi
- echo '```'
- echo " "
- echo ""
-
- if [[ "$hs_err_files" != "" ]]; then
- echo "View HotSpot error log
"
- echo ""
- for hs_err in $hs_err_files; do
- echo '```'
- echo "$hs_err:"
- echo ""
- cat "$hs_err"
- echo '```'
- done
-
- echo " "
- echo ""
- fi
-
- done >> $GITHUB_STEP_SUMMARY
-
- echo ":arrow_right: To see the entire test log, click the job in the list to the left" >> $GITHUB_STEP_SUMMARY
-
- # This will abort the entire job in GHA, which is what we want
- exit 1
-
- - 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: build/run-test-prebuilt/test-results/
- run: >
- zip -r9
- "$HOME/macos-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip"
- .
- continue-on-error: true
-
- - name: Package test support
- if: always()
- working-directory: build/run-test-prebuilt/test-support/
- run: >
- zip -r9
- "$HOME/macos-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip"
- .
- -i *.jtr
- -i */hs_err*.log
- -i */replay*.log
- continue-on-error: true
-
- - name: Persist test results
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/macos-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip
- continue-on-error: true
-
- - name: Persist test outputs
- if: always()
- uses: actions/upload-artifact@v3
- with:
- path: ~/macos-x64${{ matrix.artifact }}_testsupport_${{ 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_aarch64_build
- - linux_aarch64_test
- - windows_x64_test
- - macos_x64_test
- - macos_aarch64_build
-
- steps:
- - name: Determine current artifacts endpoint
- id: actions_runtime
- uses: actions/github-script@v6
- with:
- script: "return { url: process.env['ACTIONS_RUNTIME_URL'], token: process.env['ACTIONS_RUNTIME_TOKEN'] }"
-
- - name: Display current artifacts
- run: >
- curl -s -H 'Accept: application/json;api-version=6.0-preview'
- -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}'
- '${{ fromJson(steps.actions_runtime.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview'
-
- - name: Delete transient artifacts
- run: >
- for url in `
- curl -s -H 'Accept: application/json;api-version=6.0-preview'
- -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}'
- '${{ fromJson(steps.actions_runtime.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview' |
- jq -r -c '.value | map(select(.name|startswith("transient_"))) | .[].url'`; do
- curl -s -H 'Accept: application/json;api-version=6.0-preview'
- -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}'
- -X DELETE "${url}";
- done
-
- - name: Fetch remaining artifacts (test results)
- uses: actions/download-artifact@v3
- with:
- path: test-results
-
- - name: Delete remaining artifacts
- run: >
- for url in `
- curl -s -H 'Accept: application/json;api-version=6.0-preview'
- -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}'
- '${{ fromJson(steps.actions_runtime.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview' |
- jq -r -c '.value | .[].url'`; do
- curl -s -H 'Accept: application/json;api-version=6.0-preview'
- -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}'
- -X DELETE "${url}";
- done
-
- - name: Upload a combined test results artifact
- uses: actions/upload-artifact@v3
- with:
- name: test-results_${{ needs.prerequisites.outputs.bundle_id }}
- path: test-results
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 351eb1f6605..48009e8509d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -46,7 +46,10 @@ env:
jobs:
test:
name: test
- runs-on: ${{ inputs.runs-on }}
+ #runs-on: ${{ inputs.runs-on }}
+ runs-on: ${{fromJson(inputs.runs-on)}}
+ outputs:
+ should_run: ${{ steps.check_if_run.outputs.should_run }}
defaults:
run:
shell: bash
@@ -64,6 +67,8 @@ jobs:
- 'hs/tier1 gc'
- 'hs/tier1 runtime'
- 'hs/tier1 serviceability'
+ - 'dragonwell/hs feature'
+ - 'dragonwell/jdk feature'
include:
- test-name: 'jdk/tier1 part 1'
@@ -98,23 +103,51 @@ jobs:
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
debug-suffix: -debug
+ - test-name: 'dragonwell/hs feature'
+ test-suite: 'test/hotspot/jtreg/:dragonwell_hs'
+
+ - test-name: 'dragonwell/jdk feature'
+ test-suite: 'test/jdk/:dragonwell_jdk'
+
steps:
+ - name: 'Check if the test suite should run'
+ id: check_if_run
+ run: |
+ if [[ "${{ inputs.platform }}" == "windows-x64" ]]; then
+ case "${{ matrix.test-name }}" in
+ "jdk/tier1 part 1"|"jdk/tier1 part 2"|"jdk/tier1 part 3"|"hs/tier1 common")
+ echo "should_run=true" >> $GITHUB_OUTPUT
+ ;;
+ *)
+ echo "should_run=false" >> $GITHUB_OUTPUT
+ ;;
+ esac
+ elif [[ "${{ inputs.platform }}" == "linux-x64" ]] || [[ "${{ inputs.platform }}" == "linux-aarch64" ]]; then
+ echo "should_run=true" >> $GITHUB_OUTPUT
+ else
+ echo "should_run=false" >> $GITHUB_OUTPUT
+ fi
+ shell: bash
+
- name: 'Checkout the JDK source'
uses: actions/checkout@v4
+ if: steps.check_if_run.outputs.should_run != 'false'
- name: 'Get MSYS2'
uses: ./.github/actions/get-msys2
- if: runner.os == 'Windows'
+ if: runner.os == 'Windows' && steps.check_if_run.outputs.should_run != 'false'
- name: 'Get the BootJDK'
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
platform: ${{ inputs.bootjdk-platform }}
+ if: steps.check_if_run.outputs.should_run != 'false'
- name: 'Get JTReg'
id: jtreg
uses: ./.github/actions/get-jtreg
+ if: steps.check_if_run.outputs.should_run != 'false'
- name: 'Get bundles'
id: bundles
@@ -122,6 +155,8 @@ jobs:
with:
platform: ${{ inputs.platform }}
debug-suffix: ${{ matrix.debug-suffix }}
+ continue-on-error: true
+ if: steps.check_if_run.outputs.should_run != 'false'
- name: 'Install dependencies'
run: |
@@ -130,7 +165,7 @@ jobs:
sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
- if: runner.os == 'macOS'
+ if: runner.os == 'macOS' && steps.check_if_run.outputs.should_run != 'false'
- name: 'Set PATH'
id: path
@@ -142,6 +177,7 @@ jobs:
else
echo "value=$PATH" >> $GITHUB_OUTPUT
fi
+ if: steps.check_if_run.outputs.should_run != 'false'
- name: 'Run tests'
id: run-tests
@@ -157,12 +193,13 @@ jobs:
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
env:
PATH: ${{ steps.path.outputs.value }}
+ if: steps.check_if_run.outputs.should_run != 'false'
# This is a separate step, since if the markdown from a step gets bigger than
# 1024 kB it is skipped, but then the short summary above is still generated
- name: 'Generate test report'
run: bash ./.github/scripts/gen-test-results.sh "$GITHUB_STEP_SUMMARY"
- if: always()
+ if: steps.check_if_run.outputs.should_run != 'false'
- name: 'Package test results'
id: package
@@ -188,18 +225,18 @@ jobs:
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
- if: always()
+ if: steps.check_if_run.outputs.should_run != 'false'
- name: 'Upload test results'
uses: actions/upload-artifact@v3
with:
path: results
name: ${{ steps.package.outputs.artifact-name }}
- if: always()
+ if: steps.check_if_run.outputs.should_run != 'false'
# This is the best way I found to abort the job with an error message
- name: 'Notify about test failures'
uses: actions/github-script@v6
with:
script: core.setFailed('${{ steps.run-tests.outputs.error-message }}')
- if: steps.run-tests.outputs.failure == 'true'
+ if: steps.run-tests.outputs.failure == 'true' && steps.check_if_run.outputs.should_run != 'false'
diff --git a/make/conf/test-dependencies b/make/conf/test-dependencies
index ead47aeb750..ce9cc808e4b 100644
--- a/make/conf/test-dependencies
+++ b/make/conf/test-dependencies
@@ -30,18 +30,22 @@ JTREG_VERSION=6.1+3
JTREG_BUILD=1
GTEST_VERSION=1.8.1
+LINUX_X64_BOOT_JDK_EXT=tar.gz
LINUX_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14.1_1.tar.gz
LINUX_X64_BOOT_JDK_SHA256=43fb84f8063ad9bf6b6d694a67b8f64c8827552b920ec5ce794dfe5602edffe7
+LINUX_AARCH64_BOOT_JDK_EXT=tar.gz
LINUX_AARCH64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_linux-aarch64_bin.tar.gz
LINUX_AARCH64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.14.1_1.tar.gz
LINUX_AARCH64_BOOT_JDK_SHA256=79572f5172c6a040591d34632f98a20ed148702bbce2f57649e8ac01c0d2e3db
+WINDOWS_X64_BOOT_JDK_EXT=zip
WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_windows_hotspot_11.0.14.1_1.zip
WINDOWS_X64_BOOT_JDK_SHA256=3e7da701aa92e441418299714f0ed6db10c3bb1e2db625c35a2c2cd9cc619731
+MACOS_X64_BOOT_JDK_EXT=tar.gz
MACOS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_osx-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.14.1_1.tar.gz
MACOS_X64_BOOT_JDK_SHA256=8c69808f5d9d209b195575e979de0e43cdf5d0f1acec1853a569601fe2c1f743