Skip to content

Commit

Permalink
Merge pull request #10 from JasonFengJ9/mergetmp
Browse files Browse the repository at this point in the history
(valhalla) Merging openj9-openjdk-jdk/openj9 into openj9-staging
  • Loading branch information
hangshao0 authored Apr 30, 2024
2 parents 0a4e312 + 85b1e8f commit 4aba442
Show file tree
Hide file tree
Showing 8,853 changed files with 529,054 additions and 533,587 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .github/actions/do-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ runs:
shell: bash

- name: 'Upload build logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
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
uses: actions/github-script@v7
with:
script: core.setFailed('Build failed. See summary for details.')
if: steps.check.outputs.failure == 'true'
2 changes: 1 addition & 1 deletion .github/actions/get-bootjdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ runs:

- name: 'Check cache for BootJDK'
id: get-cached-bootjdk
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: bootjdk/jdk
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/get-bundles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ runs:
steps:
- name: 'Download bundles artifact'
id: download-bundles
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
path: bundles
continue-on-error: true

- name: 'Download bundles artifact (retry)'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
path: bundles
Expand Down
12 changes: 9 additions & 3 deletions .github/actions/get-jtreg/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2023, 2024, 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
Expand Down Expand Up @@ -41,7 +41,7 @@ runs:

- name: 'Check cache for JTReg'
id: get-cached-jtreg
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: jtreg/installed
key: jtreg-${{ steps.version.outputs.value }}
Expand All @@ -56,8 +56,14 @@ runs:

- name: 'Build JTReg'
run: |
# If runner architecture is x64 set JAVA_HOME_17_X64 otherwise set to JAVA_HOME_17_arm64
if [[ '${{ runner.arch }}' == 'X64' ]]; then
JDK="$JAVA_HOME_17_X64"
else
JDK="$JAVA_HOME_17_arm64"
fi
# Build JTReg and move files to the proper locations
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
bash make/build.sh --jdk "$JDK"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
Expand Down
5 changes: 2 additions & 3 deletions .github/actions/get-msys2/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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
Expand Down Expand Up @@ -30,8 +30,7 @@ runs:
using: composite
steps:
- name: 'Install MSYS2'
# use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff
uses: msys2/[email protected]
with:
install: 'autoconf tar unzip zip make'
path-type: minimal
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-bundles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ runs:
shell: bash

- name: 'Upload bundles artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
path: bundles
Expand Down
18 changes: 16 additions & 2 deletions .github/scripts/gen-test-results.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, 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
Expand Down Expand Up @@ -44,8 +44,8 @@ for test in $failures $errors; do
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)
replay_files=$(ls $report_dir/$base_path/replay*.log 2> /dev/null || true)
echo "#### <a id="$anchor">$test"

echo '<details><summary>View test results</summary>'
echo ''
echo '```'
Expand Down Expand Up @@ -73,6 +73,20 @@ for test in $failures $errors; do
echo ''
fi

if [[ "$replay_files" != "" ]]; then
echo '<details><summary>View HotSpot replay file</summary>'
echo ''
for replay in $replay_files; do
echo '```'
echo "$replay:"
echo ''
cat "$replay"
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
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/gen-test-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ error_count=$(echo $errors | wc -w || true)

if [[ "$failures" = "" && "$errors" = "" ]]; then
# We know something went wrong, but not what
echo 'failure=true' >> $GITHUB_OUTPUT
echo 'error-message=Unspecified test suite failure. Please see log for job for details.' >> $GITHUB_OUTPUT
exit 0
fi
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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
Expand Down Expand Up @@ -61,27 +61,32 @@ jobs:
debian-arch: arm64
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
tolerate-sysroot-errors: false
- target-cpu: arm
gnu-arch: arm
debian-arch: armhf
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
tolerate-sysroot-errors: false
gnu-abi: eabihf
- target-cpu: s390x
gnu-arch: s390x
debian-arch: s390x
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
tolerate-sysroot-errors: false
- target-cpu: ppc64le
gnu-arch: powerpc64le
debian-arch: ppc64el
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
tolerate-sysroot-errors: false
- target-cpu: riscv64
gnu-arch: riscv64
debian-arch: riscv64
debian-repository: https://httpredir.debian.org/debian/
debian-version: sid
tolerate-sysroot-errors: true

steps:
- name: 'Checkout the JDK source'
Expand All @@ -93,13 +98,6 @@ jobs:
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

- name: 'Get GTest'
id: gtest
uses: ./.github/actions/get-gtest
Expand All @@ -120,7 +118,7 @@ jobs:
- name: 'Check cache for sysroot'
id: get-cached-sysroot
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: sysroot
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
Expand All @@ -130,6 +128,7 @@ jobs:
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'

- name: 'Create sysroot'
id: create-sysroot
run: >
sudo debootstrap
--arch=${{ matrix.debian-arch }}
Expand All @@ -140,6 +139,7 @@ jobs:
${{ matrix.debian-version }}
sysroot
${{ matrix.debian-repository }}
continue-on-error: ${{ matrix.tolerate-sysroot-errors }}
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'

- name: 'Prepare sysroot'
Expand All @@ -151,7 +151,12 @@ jobs:
rm -rf sysroot/usr/{sbin,bin,share}
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
rm -rf sysroot/usr/libexec/gcc
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
if: steps.create-sysroot.outcome == 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'

- name: 'Remove broken sysroot'
run: |
sudo rm -rf sysroot/
if: steps.create-sysroot.outcome != 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'

- name: 'Configure'
run: >
Expand All @@ -165,18 +170,19 @@ jobs:
--disable-precompiled-headers
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
--with-sysroot=sysroot
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
--with-jmod-compress=zip-1
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'

- name: 'Build'
id: build
uses: ./.github/actions/do-build
with:
make-target: 'hotspot ${{ inputs.make-arguments }}'
platform: linux-${{ matrix.target-cpu }}
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
11 changes: 7 additions & 4 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, 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
Expand Down Expand Up @@ -31,6 +31,9 @@ on:
platform:
required: true
type: string
runs-on:
required: true
type: string
extra-conf-options:
required: false
type: string
Expand All @@ -55,7 +58,7 @@ on:
jobs:
build-macos:
name: build
runs-on: macos-13
runs-on: ${{ inputs.runs-on }}

strategy:
fail-fast: false
Expand All @@ -74,7 +77,7 @@ jobs:
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
platform: macos-x64
platform: ${{ inputs.platform }}

- name: 'Get JTReg'
id: jtreg
Expand All @@ -87,7 +90,7 @@ jobs:
- name: 'Install toolchain and dependencies'
run: |
# Run Homebrew installation and xcode-select
brew install make
brew install autoconf 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
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, 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
Expand Down Expand Up @@ -30,6 +30,7 @@ on:
branches-ignore:
- master
- pr/*
- jdk*
workflow_dispatch:
inputs:
platforms:
Expand Down Expand Up @@ -132,8 +133,7 @@ jobs:
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'
if: needs.select.outputs.linux-x64 == 'true'

build-linux-x86:
name: linux-x86
Expand Down Expand Up @@ -213,7 +213,6 @@ jobs:
name: linux-cross-compile
needs:
- select
- build-linux-x64
uses: ./.github/workflows/build-cross-compile.yml
with:
gcc-major-version: '10'
Expand All @@ -227,6 +226,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
runs-on: 'macos-13'
xcode-toolset-version: '14.3.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand All @@ -238,8 +238,8 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '14.3.1'
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'
Expand Down Expand Up @@ -320,6 +320,16 @@ jobs:
bootjdk-platform: macos-x64
runs-on: macos-13

test-macos-aarch64:
name: macos-aarch64
needs:
- build-macos-aarch64
uses: ./.github/workflows/test.yml
with:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14

test-windows-x64:
name: windows-x64
needs:
Expand Down Expand Up @@ -356,7 +366,7 @@ jobs:
# 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
uses: actions/github-script@v7
with:
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'

Expand Down
Loading

0 comments on commit 4aba442

Please sign in to comment.