Skip to content

Commit

Permalink
Merge branch 'sapmachine17' of https://github.com/SAP/SapMachine into…
Browse files Browse the repository at this point in the history
… filesocket_sapmachine17
  • Loading branch information
schmelter-sap committed Feb 19, 2024
2 parents 060a185 + 48f58eb commit 55e3e59
Show file tree
Hide file tree
Showing 4,412 changed files with 209,593 additions and 73,527 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .github/actions/get-bootjdk/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 @@ -104,6 +104,6 @@ runs:
- name: 'Export path to where BootJDK is installed'
id: path-name
run: |
# Export the path
echo 'path=bootjdk/jdk' >> $GITHUB_OUTPUT
# Export the absolute path
echo "path=`pwd`/bootjdk/jdk" >> $GITHUB_OUTPUT
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/get-gtest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
var: GTEST_VERSION

- name: 'Checkout GTest source'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: google/googletest
ref: 'release-${{ steps.version.outputs.value }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-jtreg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ runs:
key: jtreg-${{ steps.version.outputs.value }}

- name: 'Checkout the JTReg source'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openjdk/jtreg
ref: jtreg-${{ steps.version.outputs.value }}
Expand Down
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
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
73 changes: 50 additions & 23 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,24 +54,38 @@ 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'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
Expand All @@ -86,17 +100,21 @@ jobs:
with:
platform: linux-x64

- name: 'Get GTest'
id: gtest
uses: ./.github/actions/get-gtest

# 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 }} \
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 +131,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 @@ -137,18 +159,23 @@ jobs:
--with-conf-name=linux-${{ matrix.target-cpu }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
--with-gtest=${{ steps.gtest.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
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 }}
27 changes: 20 additions & 7 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 All @@ -68,7 +78,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
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
15 changes: 12 additions & 3 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 All @@ -62,7 +68,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
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
Loading

0 comments on commit 55e3e59

Please sign in to comment.