8287906: Rewrite of GitHub Actions (GHA) sanity tests
Reviewed-by: shade, erikj, cstein
This commit is contained in:
parent
c2ccf4ca85
commit
1a6533225d
46
.github/actions/config/action.yml
vendored
Normal file
46
.github/actions/config/action.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Config'
|
||||
description: 'Read JDK Configuration Variables'
|
||||
inputs:
|
||||
var:
|
||||
description: 'The name of the variable to read'
|
||||
required: true
|
||||
outputs:
|
||||
value:
|
||||
description: 'The value of the configuration variable'
|
||||
value: ${{ steps.read-config.outputs.value }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Read configuration variable from repo'
|
||||
id: read-config
|
||||
run: |
|
||||
# Extract value from configuration file
|
||||
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
|
||||
echo "::set-output name=value::$value"
|
||||
shell: bash
|
80
.github/actions/do-build/action.yml
vendored
Normal file
80
.github/actions/do-build/action.yml
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Do build'
|
||||
description: 'Build the JDK using make'
|
||||
inputs:
|
||||
make-target:
|
||||
description: 'Make target(s)'
|
||||
required: true
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Build'
|
||||
id: build
|
||||
run: >
|
||||
make LOG=info ${{ inputs.make-target }}
|
||||
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
|
||||
shell: bash
|
||||
|
||||
- name: 'Check for failure'
|
||||
id: check
|
||||
run: |
|
||||
# Check for failure marker file
|
||||
build_dir="$(ls -d build/*)"
|
||||
if [[ -e $build_dir/build-failure ]]; then
|
||||
# Collect relevant log files
|
||||
mkdir failure-logs
|
||||
cp \
|
||||
$build_dir/spec.gmk \
|
||||
$build_dir/build.log \
|
||||
$build_dir/configure.log \
|
||||
$build_dir/make-support/failure-summary.log \
|
||||
$build_dir/make-support/failure-logs/* \
|
||||
failure-logs/ 2> /dev/null || true
|
||||
echo '::set-output name=failure::true'
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload build logs'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: failure-logs
|
||||
if: steps.check.outputs.failure == 'true'
|
||||
|
||||
# This is the best way I found to abort the job with an error message
|
||||
- name: 'Notify about build failures'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setFailed('Build failed. See summary for details.')
|
||||
if: steps.check.outputs.failure == 'true'
|
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Get BootJDK'
|
||||
description: 'Download the BootJDK from cache or source location'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform'
|
||||
required: true
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed BootJDK'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Determine platform prefix'
|
||||
id: platform-prefix
|
||||
run: |
|
||||
# Convert platform name to upper case
|
||||
platform_prefix="$(echo ${{ inputs.platform }} | tr [a-z-] [A-Z_])"
|
||||
echo "::set-output name=value::$platform_prefix"
|
||||
shell: bash
|
||||
|
||||
- name: 'Get URL configuration'
|
||||
id: url
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_URL
|
||||
|
||||
- name: 'Get SHA256 configuration'
|
||||
id: sha256
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_SHA256
|
||||
|
||||
- name: 'Get file extension configuration'
|
||||
id: ext
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_EXT
|
||||
|
||||
- name: 'Check cache for BootJDK'
|
||||
id: get-cached-bootjdk
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: bootjdk/jdk
|
||||
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
|
||||
|
||||
# macOS is missing sha256sum
|
||||
- name: 'Install sha256sum'
|
||||
run: |
|
||||
# Run Homebrew installation
|
||||
brew install coreutils
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true' && runner.os == 'macOS'
|
||||
|
||||
- name: 'Download BootJDK'
|
||||
run: |
|
||||
# Download BootJDK and verify checksum
|
||||
mkdir -p bootjdk/jdk
|
||||
mkdir -p bootjdk/unpacked
|
||||
wget --progress=dot:mega -O bootjdk/jdk.${{ steps.ext.outputs.value }} '${{ steps.url.outputs.value }}'
|
||||
echo '${{ steps.sha256.outputs.value }} bootjdk/jdk.${{ steps.ext.outputs.value }}' | sha256sum -c >/dev/null -
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Unpack BootJDK'
|
||||
run: |
|
||||
# Unpack the BootJDK and move files to a common location
|
||||
if [[ '${{ steps.ext.outputs.value }}' == 'tar.gz' ]]; then
|
||||
tar -xf bootjdk/jdk.${{ steps.ext.outputs.value }} -C bootjdk/unpacked
|
||||
else
|
||||
unzip -q bootjdk/jdk.${{ steps.ext.outputs.value }} -d bootjdk/unpacked
|
||||
fi
|
||||
jdk_root="$(dirname $(find bootjdk/unpacked -name bin -type d))"
|
||||
mv "$jdk_root"/* bootjdk/jdk/
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Export path to where BootJDK is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the path
|
||||
echo '::set-output name=path::bootjdk/jdk'
|
||||
shell: bash
|
109
.github/actions/get-bundles/action.yml
vendored
Normal file
109
.github/actions/get-bundles/action.yml
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Get bundles'
|
||||
description: 'Download resulting JDK bundles'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
outputs:
|
||||
jdk-path:
|
||||
description: 'Path to the installed JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.jdk }}
|
||||
symbols-path:
|
||||
description: 'Path to the installed symbols bundle'
|
||||
value: ${{ steps.path-name.outputs.symbols }}
|
||||
tests-path:
|
||||
description: 'Path to the installed tests bundle'
|
||||
value: ${{ steps.path-name.outputs.tests }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Download bundles artifact'
|
||||
id: download-bundles
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
|
||||
- name: 'Download bundles artifact (retry)'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
if: steps.download-bundles.outcome == 'failure'
|
||||
|
||||
- name: 'Unpack bundles'
|
||||
run: |
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
|
||||
echo 'Unpacking jdk bundle...'
|
||||
mkdir -p bundles/jdk
|
||||
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip -d bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking jdk bundle...'
|
||||
mkdir -p bundles/jdk
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking symbols bundle...'
|
||||
mkdir -p bundles/symbols
|
||||
tar -xf bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/symbols
|
||||
fi
|
||||
|
||||
if [[ -e bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking tests bundle...'
|
||||
mkdir -p bundles/tests
|
||||
tar -xf bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/tests
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Export paths to where bundles are installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the paths
|
||||
|
||||
jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/jdk -name bin -type d))"
|
||||
symbols_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/symbols -name bin -type d))"
|
||||
tests_dir="$GITHUB_WORKSPACE/bundles/tests"
|
||||
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
jdk_dir="$(cygpath $jdk_dir)"
|
||||
symbols_dir="$(cygpath $symbols_dir)"
|
||||
tests_dir="$(cygpath $tests_dir)"
|
||||
fi
|
||||
|
||||
echo "::set-output name=jdk::$jdk_dir"
|
||||
echo "::set-output name=symbols::$symbols_dir"
|
||||
echo "::set-output name=tests::$tests_dir"
|
||||
shell: bash
|
54
.github/actions/get-gtest/action.yml
vendored
Normal file
54
.github/actions/get-gtest/action.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Get GTest'
|
||||
description: 'Download GTest source'
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed GTest'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Get GTest version configuration'
|
||||
id: version
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: GTEST_VERSION
|
||||
|
||||
- name: 'Checkout GTest source'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: google/googletest
|
||||
ref: 'release-${{ steps.version.outputs.value }}'
|
||||
path: gtest
|
||||
|
||||
- name: 'Export path to where GTest is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the path
|
||||
echo '::set-output name=path::gtest'
|
||||
shell: bash
|
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Get JTReg'
|
||||
description: 'Download JTReg from cache or source location'
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed JTReg'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Get JTReg version configuration'
|
||||
id: version
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: JTREG_VERSION
|
||||
|
||||
- name: 'Check cache for JTReg'
|
||||
id: get-cached-jtreg
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: jtreg/installed
|
||||
key: jtreg-${{ steps.version.outputs.value }}
|
||||
|
||||
- name: 'Checkout the JTReg source'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openjdk/jtreg
|
||||
ref: jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/src
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_11_X64"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
shell: bash
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Export path to where JTReg is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the path
|
||||
echo '::set-output name=path::jtreg/installed'
|
||||
shell: bash
|
44
.github/actions/get-msys2/action.yml
vendored
Normal file
44
.github/actions/get-msys2/action.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Get MSYS2'
|
||||
description: 'Download MSYS2 and prepare a Windows host'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
location: msys2
|
||||
|
||||
# We can't run bash until this is completed, so stick with pwsh
|
||||
- name: 'Set MSYS2 path'
|
||||
run: |
|
||||
# Prepend msys2/msys64/usr/bin to the PATH
|
||||
echo "$env:GITHUB_WORKSPACE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
||||
shell: pwsh
|
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Upload bundles'
|
||||
description: 'Upload resulting JDK bundles'
|
||||
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: 'Determine bundle names'
|
||||
id: bundles
|
||||
run: |
|
||||
# Rename bundles to consistent names
|
||||
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
|
||||
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
|
||||
mkdir bundles
|
||||
|
||||
if [[ "$jdk_bundle_zip" != "" ]]; then
|
||||
mv "$jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip"
|
||||
fi
|
||||
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$symbols_bundle" != "" ]]; then
|
||||
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$tests_bundle" != "" ]]; then
|
||||
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
|
||||
echo '::set-output name=bundles-found::true'
|
||||
else
|
||||
echo '::set-output name=bundles-found::false'
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
retention-days: 1
|
||||
if: steps.bundles.outputs.bundles-found == 'true'
|
51
.github/scripts/gen-build-failure-report.sh
vendored
Normal file
51
.github/scripts/gen-build-failure-report.sh
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
BUILD_DIR="$(ls -d build/*)"
|
||||
|
||||
# Send signal to the do-build action that we failed
|
||||
touch "$BUILD_DIR/build-failure"
|
||||
|
||||
(
|
||||
echo '### :boom: Build failure summary'
|
||||
echo ''
|
||||
echo 'The build failed. Here follows the failure summary from the build.'
|
||||
echo '<details><summary><b>View build failure summary</b></summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
if [[ -f "$BUILD_DIR/make-support/failure-summary.log" ]]; then
|
||||
cat "$BUILD_DIR/make-support/failure-summary.log"
|
||||
else
|
||||
echo "Failure summary ($BUILD_DIR/make-support/failure-summary.log) not found"
|
||||
fi
|
||||
echo '```'
|
||||
echo '</details>'
|
||||
echo ''
|
||||
|
||||
echo ''
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left. To download logs, see the `failure-logs` [artifact above](#artifacts).'
|
||||
) >> $GITHUB_STEP_SUMMARY
|
92
.github/scripts/gen-test-results.sh
vendored
Normal file
92
.github/scripts/gen-test-results.sh
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
|
||||
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 -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || 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=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
|
||||
echo "#### <a id="$anchor">$test"
|
||||
|
||||
echo '<details><summary>View test results</summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
if [[ -f "$report_file" ]]; then
|
||||
cat "$report_file"
|
||||
else
|
||||
echo "Error: Result file $report_file not found"
|
||||
fi
|
||||
echo '```'
|
||||
echo '</details>'
|
||||
echo ''
|
||||
|
||||
if [[ "$hs_err_files" != "" ]]; then
|
||||
echo '<details><summary>View HotSpot error log</summary>'
|
||||
echo ''
|
||||
for hs_err in $hs_err_files; do
|
||||
echo '```'
|
||||
echo "$hs_err:"
|
||||
echo ''
|
||||
cat "$hs_err"
|
||||
echo '```'
|
||||
done
|
||||
|
||||
echo '</details>'
|
||||
echo ''
|
||||
fi
|
||||
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
|
||||
# Trim it down if so.
|
||||
summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
|
||||
if [[ $summary_size -gt 1000000 ]]; then
|
||||
# Trim to below 1024 kB, and cut off after the last detail group
|
||||
head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
|
||||
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
|
||||
(
|
||||
echo ''
|
||||
echo ':x: **WARNING: Summary is too large and has been truncated.**'
|
||||
echo ''
|
||||
) >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
|
69
.github/scripts/gen-test-summary.sh
vendored
Normal file
69
.github/scripts/gen-test-summary.sh
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
|
||||
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
|
||||
|
||||
if [[ ! -f build/run-test-prebuilt/make-support/exit-with-error ]]; then
|
||||
# There were no failures, exit now
|
||||
exit
|
||||
fi
|
||||
|
||||
failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
|
||||
failure_count=$(echo $failures | wc -w || true)
|
||||
error_count=$(echo $errors | wc -w || true)
|
||||
|
||||
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||
# We know something went wrong, but not what
|
||||
echo '::set-output name=error-message::Unspecified test suite failure. Please see log for job for details.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo '::set-output name=failure::true'
|
||||
echo "::set-output name=error-message::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
|
154
.github/workflows/build-cross-compile.yml
vendored
Normal file
154
.github/workflows/build-cross-compile.yml
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Build (cross-compile)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
gcc-major-version:
|
||||
required: false
|
||||
type: string
|
||||
default: '10'
|
||||
apt-gcc-version:
|
||||
required: false
|
||||
type: string
|
||||
default: '10.3.0-1ubuntu1~20.04'
|
||||
apt-gcc-cross-suffix:
|
||||
required: false
|
||||
type: string
|
||||
default: 'cross1'
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
name: build
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target-cpu:
|
||||
- aarch64
|
||||
- arm
|
||||
- s390x
|
||||
- ppc64le
|
||||
include:
|
||||
- target-cpu: aarch64
|
||||
debian-arch: arm64
|
||||
gnu-arch: aarch64
|
||||
- target-cpu: arm
|
||||
debian-arch: armhf
|
||||
gnu-arch: arm
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
debian-arch: s390x
|
||||
gnu-arch: s390x
|
||||
- target-cpu: ppc64le
|
||||
debian-arch: ppc64el
|
||||
gnu-arch: powerpc64le
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
# Use linux-x64 JDK bundle as build JDK
|
||||
- name: 'Get build JDK'
|
||||
id: buildjdk
|
||||
uses: ./.github/actions/get-bundles
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Install dependencies using apt-get
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install \
|
||||
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
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: 'Check cache for sysroot'
|
||||
id: get-cached-sysroot
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: sysroot
|
||||
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
|
||||
|
||||
- name: 'Install sysroot dependencies'
|
||||
run: sudo apt-get install debootstrap qemu-user-static
|
||||
if: steps.get-cached-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
|
||||
https://httpredir.debian.org/debian/
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Prepare sysroot'
|
||||
run: |
|
||||
# Prepare sysroot and remove unused files to minimize cache
|
||||
sudo chroot sysroot symlinks -cr .
|
||||
sudo chown ${USER} -R sysroot
|
||||
rm -rf sysroot/{dev,proc,run,sys}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=linux-${{ matrix.target-cpu }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-zlib=system
|
||||
--enable-debug
|
||||
--disable-precompiled-headers
|
||||
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
|
||||
--with-sysroot=sysroot
|
||||
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: 'hotspot'
|
||||
platform: linux-${{ matrix.target-cpu }}
|
132
.github/workflows/build-linux.yml
vendored
Normal file
132
.github/workflows/build-linux.yml
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Build (linux)'
|
||||
|
||||
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: '[ "debug", "release" ]'
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-architecture:
|
||||
required: false
|
||||
type: string
|
||||
apt-extra-packages:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: build
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get GTest'
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Set architecture'
|
||||
id: arch
|
||||
run: |
|
||||
# Set a proper suffix for packages if using a different architecture
|
||||
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||
echo '::set-output name=suffix:::${{ inputs.apt-architecture }}'
|
||||
fi
|
||||
|
||||
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Install dependencies using apt-get
|
||||
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.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} 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 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
114
.github/workflows/build-macos.yml
vendored
Normal file
114
.github/workflows/build-macos.yml
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Build (macos)'
|
||||
|
||||
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: '[ "debug", "release" ]'
|
||||
xcode-toolset-version:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
name: build
|
||||
runs-on: macos-10.15
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: macos-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get GTest'
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Homebrew installation and xcode-select
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.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
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
131
.github/workflows/build-windows.yml
vendored
Normal file
131
.github/workflows/build-windows.yml
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Build (windows)'
|
||||
|
||||
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: '[ "debug", "release" ]'
|
||||
msvc-toolset-version:
|
||||
required: true
|
||||
type: string
|
||||
msvc-toolset-architecture:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
MSYS2_PATH_TYPE: minimal
|
||||
CHERE_INVOKING: 1
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
name: build
|
||||
runs-on: windows-2019
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: windows-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get GTest'
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Visual Studio Installer
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||
modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
|
||||
${{ inputs.extra-conf-options }}
|
||||
env:
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
PATH: ''
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
331
.github/workflows/main.yml
vendored
Normal file
331
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,331 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
|
||||
###
|
||||
### Determine platforms to include
|
||||
###
|
||||
|
||||
select:
|
||||
name: 'Select platforms'
|
||||
runs-on: ubuntu-20.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 [[ '${{ !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
|
||||
echo 'false'
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||
input='${{ github.event.inputs.platforms }}'
|
||||
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
|
||||
else
|
||||
echo 'Internal error in GHA'
|
||||
exit 1
|
||||
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 "::set-output name=linux-x64::$(check_platform linux-x64 linux x64)"
|
||||
echo "::set-output name=linux-x86::$(check_platform linux-x86 linux x86)"
|
||||
echo "::set-output name=linux-x64-variants::$(check_platform linux-x64-variants variants)"
|
||||
echo "::set-output name=linux-cross-compile::$(check_platform linux-cross-compile cross-compile)"
|
||||
echo "::set-output name=macos-x64::$(check_platform macos-x64 macos x64)"
|
||||
echo "::set-output name=macos-aarch64::$(check_platform macos-aarch64 macos aarch64)"
|
||||
echo "::set-output name=windows-x64::$(check_platform windows-x64 windows x64)"
|
||||
echo "::set-output name=windows-aarch64::$(check_platform windows-aarch64 windows aarch64)"
|
||||
|
||||
###
|
||||
### Build jobs
|
||||
###
|
||||
|
||||
build-linux-x64:
|
||||
name: linux-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
# 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
|
||||
apt-gcc-version: '10-multilib'
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
if: needs.select.outputs.linux-x86 == 'true'
|
||||
|
||||
build-linux-x64-hs-nopch:
|
||||
name: linux-x64-hs-nopch
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-zero:
|
||||
name: linux-x64-hs-zero
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
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" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
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" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
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
|
||||
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.3.1'
|
||||
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'
|
||||
if: needs.select.outputs.macos-aarch64 == 'true'
|
||||
|
||||
build-windows-x64:
|
||||
name: windows-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.25'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
if: needs.select.outputs.windows-x64 == 'true'
|
||||
|
||||
build-windows-aarch64:
|
||||
name: windows-aarch64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.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'
|
||||
if: needs.select.outputs.windows-aarch64 == 'true'
|
||||
|
||||
###
|
||||
### Test jobs
|
||||
###
|
||||
|
||||
test-linux-x64:
|
||||
name: linux-x64
|
||||
needs:
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-20.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-20.04
|
||||
|
||||
test-macos-x64:
|
||||
name: macos-x64
|
||||
needs:
|
||||
- build-macos-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
bootjdk-platform: macos-x64
|
||||
runs-on: macos-10.15
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
needs:
|
||||
- build-windows-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
bootjdk-platform: windows-x64
|
||||
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-20.04
|
||||
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-windows-x64
|
||||
- build-windows-aarch64
|
||||
- test-linux-x64
|
||||
- test-linux-x86
|
||||
- test-macos-x64
|
||||
- test-windows-x64
|
||||
|
||||
steps:
|
||||
# Hack to get hold of the api environment variables that are only defined for actions
|
||||
- name: 'Get API configuration'
|
||||
id: api
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||
|
||||
- name: 'Remove bundle artifacts'
|
||||
run: |
|
||||
# Find and remove all bundle artifacts
|
||||
ALL_ARTIFACT_URLS="$(curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
|
||||
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
|
||||
for url in $BUNDLE_ARTIFACT_URLS; do
|
||||
echo "Removing $url"
|
||||
curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
-X DELETE "$url" \
|
||||
|| echo "Failed to remove bundle"
|
||||
done
|
2040
.github/workflows/submit.yml
vendored
2040
.github/workflows/submit.yml
vendored
File diff suppressed because it is too large
Load Diff
205
.github/workflows/test.yml
vendored
Normal file
205
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,205 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. 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
|
||||
# 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.
|
||||
#
|
||||
# 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: 'Run tests'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
bootjdk-platform:
|
||||
required: true
|
||||
type: string
|
||||
runs-on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
MSYS2_PATH_TYPE: minimal
|
||||
CHERE_INVOKING: 1
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: test
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test-name:
|
||||
- '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'
|
||||
|
||||
include:
|
||||
- test-name: 'jdk/tier1 part 1'
|
||||
test-suite: 'test/jdk/:tier1_part1'
|
||||
|
||||
- test-name: 'jdk/tier1 part 2'
|
||||
test-suite: 'test/jdk/:tier1_part2'
|
||||
|
||||
- test-name: 'jdk/tier1 part 3'
|
||||
test-suite: 'test/jdk/:tier1_part3'
|
||||
|
||||
- test-name: 'langtools/tier1'
|
||||
test-suite: 'test/langtools/:tier1'
|
||||
|
||||
- test-name: 'hs/tier1 common'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 runtime'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 serviceability'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: ${{ inputs.bootjdk-platform }}
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get bundles'
|
||||
id: bundles
|
||||
uses: ./.github/actions/get-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: ${{ matrix.debug-suffix }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: |
|
||||
# On macOS we need to install some dependencies for testing
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_11.3.1.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'
|
||||
|
||||
- name: 'Set PATH'
|
||||
id: path
|
||||
run: |
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
echo "::set-output name=value::"
|
||||
else
|
||||
echo "::set-output name=value::$PATH"
|
||||
fi
|
||||
|
||||
- name: 'Run tests'
|
||||
id: run-tests
|
||||
run: >
|
||||
make test-prebuilt
|
||||
TEST='${{ matrix.test-suite }}'
|
||||
BOOT_JDK=${{ steps.bootjdk.outputs.path }}
|
||||
JT_HOME=${{ steps.jtreg.outputs.path }}
|
||||
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
|
||||
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
|
||||
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY"
|
||||
env:
|
||||
PATH: ${{ steps.path.outputs.value }}
|
||||
|
||||
# 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()
|
||||
|
||||
- name: 'Package test results'
|
||||
id: package
|
||||
run: |
|
||||
# Package test-results and relevant parts of test-support
|
||||
mkdir results
|
||||
|
||||
if [[ -d build/run-test-prebuilt/test-results ]]; then
|
||||
cd build/run-test-prebuilt/test-results/
|
||||
zip -r -9 "$GITHUB_WORKSPACE/results/test-results.zip" .
|
||||
cd $GITHUB_WORKSPACE
|
||||
else
|
||||
echo '::warning ::Missing test-results directory'
|
||||
fi
|
||||
|
||||
if [[ -d build/run-test-prebuilt/test-support ]]; then
|
||||
cd build/run-test-prebuilt/test-support/
|
||||
zip -r -9 "$GITHUB_WORKSPACE/results/test-support.zip" . -i *.jtr -i */hs_err*.log -i */replay*.log
|
||||
cd $GITHUB_WORKSPACE
|
||||
else
|
||||
echo '::warning ::Missing test-support directory'
|
||||
fi
|
||||
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||
echo "::set-output name=artifact-name::$artifact_name"
|
||||
if: always()
|
||||
|
||||
- name: 'Upload test results'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: results
|
||||
name: ${{ steps.package.outputs.artifact-name }}
|
||||
if: always()
|
||||
|
||||
# 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'
|
@ -23,21 +23,19 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Versions and download locations for dependencies used by pre-submit testing.
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
BOOT_JDK_VERSION=18
|
||||
JTREG_VERSION=6.1
|
||||
JTREG_BUILD=1
|
||||
GTEST_VERSION=1.8.1
|
||||
JTREG_VERSION=6.1+2
|
||||
|
||||
LINUX_X64_BOOT_JDK_FILENAME=openjdk-18_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=0f60aef7b8504983d6e374fe94d09a7bedcf05ec559e812d801a33bd4ebd23d0
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-18_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=a5b91d4c12752d44aa75df70ae3e2311287b3e60c288b07dade106376c688277
|
||||
|
||||
MACOS_X64_BOOT_JDK_FILENAME=openjdk-18_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=527b61b4265caf45cdcbacfcf8fbcd0b4b280bede1eff32a5b252d855ff0534b
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=a5b91d4c12752d44aa75df70ae3e2311287b3e60c288b07dade106376c688277
|
Loading…
x
Reference in New Issue
Block a user