fix(release): let Standalone Binaries run by hand, and build darwin-amd64 on an Intel runner (#8955)

This commit is contained in:
Hector Ventura authored and GitHub committed 2026-11-19 07:38:40 -04:00
1 parent 0aa5ecd1de
commit 527c271b1f
1 file changed
+14 -9
+14 -9
View File
@@ -44,6 +44,7 @@ on:
type: string
default: macos-latest
timeout-minutes:
# A manual run passes inputs as strings, so the jobs parse this with fromJSON.
description: Job timeout for every build (0 keeps 60 for darwin-arm64 and 90 for the others)
required: false
type: number
@@ -77,7 +78,7 @@ jobs:
needs: prepare
if: contains(format(',{0},', inputs.platforms), ',darwin-arm64,')
runs-on: ${{ inputs.macos-runner || 'macos-latest' }}
timeout-minutes: ${{ inputs.timeout-minutes || 60 }}
timeout-minutes: ${{ fromJSON(format('{0}', inputs.timeout-minutes || 0)) > 0 && fromJSON(format('{0}', inputs.timeout-minutes || 0)) || 60 }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -110,21 +111,23 @@ jobs:
retention-days: 7
build-binary-darwin-amd64:
name: Build standalone binary (darwin-amd64, Rosetta)
# native-image cannot cross-compile, and Intel macOS runners queue for hours, so an x86_64
# GraalVM runs under Rosetta 2 on the Apple Silicon runner (floci-cli's recipe).
name: Build standalone binary (darwin-amd64)
# native-image cannot cross-compile. On the default Apple Silicon runner an x86_64 GraalVM runs
# under Rosetta 2 (floci-cli's recipe); on an Intel runner (macos-runner: macos-15-intel) the
# same steps run natively, without Rosetta.
# setup-graalvm has no architecture override, so the x86_64 JDK is installed by hand: GraalVM
# Community, like the other binaries, pinned to 25.0.1 (the last release with a macOS x64 build)
# and checked against its published SHA-256 before anything built with it is signed.
needs: prepare
if: contains(format(',{0},', inputs.platforms), ',darwin-amd64,')
runs-on: ${{ inputs.macos-runner || 'macos-latest' }}
timeout-minutes: ${{ inputs.timeout-minutes || 90 }}
timeout-minutes: ${{ fromJSON(format('{0}', inputs.timeout-minutes || 0)) > 0 && fromJSON(format('{0}', inputs.timeout-minutes || 0)) || 90 }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Rosetta 2
if: runner.arch == 'ARM64'
run: sudo softwareupdate --install-rosetta --agree-to-license
- name: Install x86_64 GraalVM
@@ -140,13 +143,14 @@ jobs:
echo "GRAALVM_HOME=$RUNNER_TEMP/graalvm-x64/Contents/Home" >> "$GITHUB_ENV"
echo "$RUNNER_TEMP/graalvm-x64/Contents/Home/bin" >> "$GITHUB_PATH"
- name: Build native executable (x86_64 under Rosetta)
- name: Build native executable (x86_64)
env:
NATIVE_ARGS: ${{ inputs.native-args }}
ARCH_PREFIX: ${{ runner.arch == 'ARM64' && 'arch -x86_64' || '' }}
# NATIVE_ARGS splits on spaces into separate Maven arguments.
run: |
read -ra extra <<< "$NATIVE_ARGS"
arch -x86_64 mvn clean package -Dnative -DskipTests -B ${extra[@]+"${extra[@]}"}
${ARCH_PREFIX} mvn clean package -Dnative -DskipTests -B ${extra[@]+"${extra[@]}"}
- name: Verify the binary is x86_64
run: file target/*-runner | grep -q x86_64
@@ -154,7 +158,8 @@ jobs:
- name: Smoke-test the standalone binary
env:
EXPECTED_VERSION: ${{ needs.prepare.outputs.version }}
run: arch -x86_64 .github/scripts/smoke-binary.sh "$(ls target/*-runner)" "$EXPECTED_VERSION"
ARCH_PREFIX: ${{ runner.arch == 'ARM64' && 'arch -x86_64' || '' }}
run: ${ARCH_PREFIX} .github/scripts/smoke-binary.sh "$(ls target/*-runner)" "$EXPECTED_VERSION"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
@@ -168,7 +173,7 @@ jobs:
needs: prepare
if: contains(format(',{0},', inputs.platforms), ',windows-amd64,')
runs-on: windows-latest
timeout-minutes: ${{ inputs.timeout-minutes || 90 }}
timeout-minutes: ${{ fromJSON(format('{0}', inputs.timeout-minutes || 0)) > 0 && fromJSON(format('{0}', inputs.timeout-minutes || 0)) || 90 }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1