Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 33 additions & 4 deletions .github/actions/get-msys2/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,49 @@

name: 'Get MSYS2'
description: 'Download MSYS2 and prepare a Windows host'
inputs:
architecture:
description: 'Architecture'
required: true

runs:
using: composite
steps:
- name: 'Install MSYS2'
id: msys2
- name: 'Install MSYS2 on x86.x64'
id: msys2-x64
uses: msys2/setup-msys2@v2.31.0
with:
install: 'autoconf tar unzip zip make'
path-type: minimal
release: false
if: ${{ inputs.architecture == 'x86.x64' }}

- name: 'Install MSYS2 on ARM64'
id: msys2-arm64
uses: msys2/setup-msys2@v2.31.0
with:
install: 'autoconf tar unzip zip make'
path-type: minimal
release: true
location: ${{ runner.tool_cache }}/msys2
if: ${{ inputs.architecture == 'ARM64' }}

# We can't run bash until this is completed, so stick with pwsh
- name: 'Set MSYS2 path'
- name: 'Set MSYS2 path for x64'
run: |
echo "${{ steps.msys2.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
echo "${{ steps.msys2-x64.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
shell: pwsh
if: ${{ inputs.architecture == 'x86.x64' }}

- name: 'Set MSYS2 path for ARM64'
run: |
echo "${{ steps.msys2-arm64.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
shell: pwsh
if: ${{ inputs.architecture == 'ARM64' }}

# Remove the default config.site file provided by MSYS2 to ensure config.guess accurately detects the host system.
- name: 'Remove default config.site'
run: |
echo "Removing default config.site"
rm -f /etc/config.site
shell: env /usr/bin/bash --login -eo pipefail {0}
7 changes: 0 additions & 7 deletions .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,11 @@ jobs:
fail-fast: false
matrix:
target-cpu:
- aarch64
- arm
- s390x
- ppc64le
- riscv64
include:
- target-cpu: aarch64
gnu-arch: aarch64
debian-arch: arm64
debian-repository: https://httpredir.debian.org/debian/
debian-version: trixie
tolerate-sysroot-errors: false
- target-cpu: arm
gnu-arch: arm
debian-arch: armhf
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ concurrency:
jobs:
# Build job
build:
environment:
name: github-pages
runs-on: ubuntu-latest
steps:
- name: Checkout repo from GitHub Tools SAP
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ on:
platform:
required: true
type: string
runs-on:
required: false
type: string
default: 'ubuntu-24.04'
bootjdk-platform:
required: false
type: string
default: 'linux-x64'
extra-conf-options:
required: false
type: string
Expand Down Expand Up @@ -75,7 +83,7 @@ on:
jobs:
build-linux:
name: build
runs-on: ubuntu-24.04
runs-on: ${{ inputs.runs-on }}

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

- name: 'Get JTReg'
id: jtreg
Expand Down
43 changes: 34 additions & 9 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ on:
msvc-toolset-version:
required: true
type: string
msvc-toolset-architecture:
architecture:
required: true
type: string
configure-arguments:
Expand Down Expand Up @@ -90,12 +90,14 @@ jobs:

- name: 'Get MSYS2'
uses: ./.github/actions/get-msys2
with:
architecture: ${{ inputs.architecture }}

- name: 'Get the BootJDK'
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
platform: windows-x64
platform: ${{ inputs.platform }}

- name: 'Get JTReg'
id: jtreg
Expand All @@ -105,26 +107,49 @@ jobs:
id: gtest
uses: ./.github/actions/get-gtest

- name: 'Check toolchain installed'
id: toolchain-check
- name: 'Check toolchain installed for x64'
id: toolchain-check-x64
run: |
set +e
'/c/Program Files/Microsoft Visual Studio/2022/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
if [ $? -eq 0 ]; then
echo "Toolchain is already installed"
echo "Toolchain is already installed for x64"
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
else
echo "Toolchain is not yet installed"
echo "Toolchain is not yet installed for x64"
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
fi
if: ${{ inputs.architecture == 'x86.x64' }}

- name: 'Check toolchain installed for ARM64'
id: toolchain-check-arm64
run: |
set +e
"/c/Program Files/Microsoft Visual Studio/2022/Enterprise/vc/auxiliary/build/vcvarsarm64.bat" -vcvars_ver=${{ inputs.msvc-toolset-version }}
if [ $? -eq 0 ]; then
echo "Toolchain is already installed for ARM64"
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
else
echo "Toolchain is not yet installed for ARM64"
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
fi
if: ${{ inputs.architecture == 'ARM64' }}

- name: 'Install toolchain and dependencies for x64'
run: |
# Run Visual Studio Installer
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
modify --quiet --installPath 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise' \
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.x86.x64
if: ${{ (inputs.architecture == 'x86.x64') && (steps.toolchain-check-x64.outputs.toolchain-installed != 'true') }}

- name: 'Install toolchain and dependencies'
- name: 'Install toolchain and dependencies for ARM64'
run: |
# Run Visual Studio Installer
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
modify --quiet --installPath 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise' \
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.ARM64
if: ${{ ( inputs.architecture == 'ARM64') && (steps.toolchain-check-arm64.outputs.toolchain-installed != 'true') }}

# SapMachine 2025-06-11: reduce number of cds/jsa archives
- name: 'Configure'
Expand Down
62 changes: 52 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2026, 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 @@ -42,7 +42,7 @@ on:
platforms:
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
required: true
default: 'linux-x64, linux-x64-variants, linux-cross-compile, alpine-linux-x64, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
default: 'linux-x64, linux-x64-variants, linux-aarch64, linux-cross-compile, alpine-linux-x64, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
configure-arguments:
description: 'Additional configure arguments'
required: false
Expand Down Expand Up @@ -74,6 +74,7 @@ jobs:
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
linux-aarch64: ${{ steps.include.outputs.linux-aarch64 }}
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
alpine-linux-x64: ${{ steps.include.outputs.alpine-linux-x64 }}
macos-x64: ${{ steps.include.outputs.macos-x64 }}
Expand Down Expand Up @@ -114,13 +115,13 @@ jobs:
input='${{ github.event.inputs.platforms }}'
# SapMachine 2022-06-24: Also handle 'pull_request' event.
elif [[ $GITHUB_EVENT_NAME == push ]] || [[ $GITHUB_EVENT_NAME == pull_request ]]; then
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
if [[ 'startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
echo 'false'
return
else
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
input=''
fi
fi

Expand Down Expand Up @@ -199,6 +200,7 @@ jobs:

echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
echo "linux-aarch64=$(check_platform linux-aarch64 linux aarch64)" >> $GITHUB_OUTPUT
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
echo "alpine-linux-x64=$(check_platform alpine-linux-x64 alpine-linux x64)" >> $GITHUB_OUTPUT
# SapMachine 2026-05-14: Disabling GHA for platforms that are not delivered
Expand Down Expand Up @@ -226,6 +228,20 @@ jobs:
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-x64 == 'true'

build-linux-aarch64:
name: linux-aarch64
needs: prepare
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-aarch64
runs-on: 'ubuntu-24.04-arm'
bootjdk-platform: linux-aarch64
gcc-major-version: '14'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-aarch64 == 'true'

build-linux-x64-hs-nopch:
name: linux-x64-hs-nopch
needs: prepare
Expand Down Expand Up @@ -320,7 +336,7 @@ jobs:
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
# This bundle is not used by testing jobs, but downstreams use it to check that
# dependent projects, e.g. libgraal, builds fine.
# dependent projects build fine.
bundle-suffix: "-static-libs"
if: needs.prepare.outputs.linux-x64-variants == 'true'

Expand Down Expand Up @@ -379,8 +395,8 @@ jobs:
with:
platform: windows-x64
runs-on: windows-2022
architecture: 'x86.x64'
msvc-toolset-version: '14.44'
msvc-toolset-architecture: 'x86.x64'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
Expand All @@ -392,11 +408,9 @@ jobs:
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-aarch64
runs-on: windows-2022
runs-on: windows-11-arm
architecture: 'ARM64'
msvc-toolset-version: '14.44'
msvc-toolset-architecture: 'arm64'
make-target: 'hotspot'
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
Expand Down Expand Up @@ -450,6 +464,19 @@ jobs:
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
static-suffix: "-static"

test-linux-aarch64:
name: linux-aarch64
needs:
- prepare
- build-linux-aarch64
uses: ./.github/workflows/test.yml
with:
platform: linux-aarch64
bootjdk-platform: linux-aarch64
runs-on: ubuntu-24.04-arm
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
debug-suffix: -debug

test-macos-aarch64:
name: macos-aarch64
needs:
Expand All @@ -473,6 +500,21 @@ jobs:
with:
platform: windows-x64
bootjdk-platform: windows-x64
architecture: 'x86.x64'
runs-on: windows-2022
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
debug-suffix: -debug

test-windows-aarch64:
name: windows-aarch64
needs:
- prepare
- build-windows-aarch64
uses: ./.github/workflows/test.yml
with:
platform: windows-aarch64
bootjdk-platform: windows-aarch64
architecture: 'ARM64'
runs-on: windows-11-arm
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
debug-suffix: -debug
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ on:
runs-on:
required: true
type: string
architecture:
required: false
type: string
xcode-toolset-version:
required: false
type: string
Expand Down Expand Up @@ -132,6 +135,8 @@ jobs:

- name: 'Get MSYS2'
uses: ./.github/actions/get-msys2
with:
architecture: ${{ inputs.architecture }}
if: runner.os == 'Windows'

- name: 'Get the BootJDK'
Expand Down
Loading