Skip to content

Commit

Permalink
Merge pull request #16 from Tencent/dev_17.0.9
Browse files Browse the repository at this point in the history
Merge from KonaJDK 17.0.9
  • Loading branch information
shiyuexw authored Oct 24, 2023
2 parents 90ebd87 + 91fc40a commit 5225601
Show file tree
Hide file tree
Showing 2,593 changed files with 123,542 additions and 39,193 deletions.
7 changes: 4 additions & 3 deletions .github/actions/get-msys2/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ runs:
using: composite
steps:
- name: 'Install MSYS2'
uses: msys2/setup-msys2@v2
# use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff
with:
install: 'autoconf tar unzip zip make'
path-type: minimal
location: msys2
location: ${{ runner.tool_cache }}/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
echo "$env:RUNNER_TOOL_CACHE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
shell: pwsh
66 changes: 44 additions & 22 deletions .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ on:
workflow_call:
inputs:
gcc-major-version:
required: true
type: string
extra-conf-options:
required: false
type: string
default: '10'
apt-gcc-version:
configure-arguments:
required: false
type: string
default: '10.3.0-1ubuntu1~20.04'
apt-gcc-cross-suffix:
make-arguments:
required: false
type: string
default: 'cross1'

jobs:
build-cross-compile:
name: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
fail-fast: false
Expand All @@ -54,20 +54,34 @@ jobs:
- arm
- s390x
- ppc64le
- riscv64
include:
- target-cpu: aarch64
debian-arch: arm64
gnu-arch: aarch64
debian-arch: arm64
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
- target-cpu: arm
debian-arch: armhf
gnu-arch: arm
debian-arch: armhf
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
gnu-abi: eabihf
- target-cpu: s390x
debian-arch: s390x
gnu-arch: s390x
debian-arch: s390x
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
- target-cpu: ppc64le
debian-arch: ppc64el
gnu-arch: powerpc64le
debian-arch: ppc64el
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
- target-cpu: riscv64
gnu-arch: riscv64
debian-arch: riscv64
debian-repository: https://httpredir.debian.org/debian/
debian-version: sid

steps:
- name: 'Checkout the JDK source'
Expand All @@ -93,10 +107,10 @@ jobs:
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 }} \
gcc-${{ inputs.gcc-major-version }} \
g++-${{ inputs.gcc-major-version }} \
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}} \
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}} \
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 }}
Expand All @@ -113,22 +127,26 @@ jobs:

- name: 'Create sysroot'
run: >
sudo qemu-debootstrap
sudo 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
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
--resolve-deps
buster
--variant=minbase
${{ matrix.debian-version }}
sysroot
https://httpredir.debian.org/debian/
${{ matrix.debian-repository }}
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}
rm -rf sysroot/{dev,proc,run,sys,var}
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'

- name: 'Configure'
Expand All @@ -143,12 +161,16 @@ jobs:
--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
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)
- name: 'Build'
id: build
uses: ./.github/actions/do-build
with:
make-target: 'hotspot'
make-target: 'hotspot ${{ inputs.make-arguments }}'
platform: linux-${{ matrix.target-cpu }}
25 changes: 19 additions & 6 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,30 @@ on:
required: false
type: string
default: '[ "debug", "release" ]'
apt-gcc-version:
gcc-major-version:
required: true
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: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
fail-fast: false
Expand Down Expand Up @@ -101,8 +111,8 @@ jobs:
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
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 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'
run: >
Expand All @@ -115,13 +125,16 @@ jobs:
--with-gtest=${{ steps.gtest.outputs.path }}
--enable-jtreg-failure-handler
--with-zlib=system
${{ inputs.extra-conf-options }}
${{ 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 }}'
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ on:
xcode-toolset-version:
required: true
type: string
configure-arguments:
required: false
type: string
make-arguments:
required: false
type: string

jobs:
build-macos:
Expand Down Expand Up @@ -97,13 +103,16 @@ jobs:
--with-gtest=${{ steps.gtest.outputs.path }}
--enable-jtreg-failure-handler
--with-zlib=system
${{ inputs.extra-conf-options }}
${{ 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 }}'
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ on:
msvc-toolset-architecture:
required: true
type: string
configure-arguments:
required: false
type: string
make-arguments:
required: false
type: string

env:
# These are needed to make the MSYS2 bash work properly
Expand Down Expand Up @@ -124,17 +130,21 @@ jobs:
--with-gtest=${{ steps.gtest.outputs.path }}
--enable-jtreg-failure-handler
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
${{ inputs.extra-conf-options }}
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
env:
# We need a minimal PATH on Windows
# Set PATH to "", so just GITHUB_PATH is included
PATH: ''
shell: env /usr/bin/bash --login -eo pipefail {0}

- name: 'Build'
id: build
uses: ./.github/actions/do-build
with:
make-target: '${{ inputs.make-target }}'
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

Expand Down
Loading

0 comments on commit 5225601

Please sign in to comment.