ci: run every release binary before publishing and build linux/amd64 natively in CI

A shared smoke script runs each binary: version (checked against the tag in release.yml), --help for all four product trees, a profile list and the bad-profile exit code. Every release job runs it before uploading, so a binary that cannot start fails the release instead of shipping. CI gains a linux/amd64 native job next to linux/arm64.
This commit is contained in:
Hector Ventura committed 2026-10-09 17:16:47 -05:00
1 parent 0746e1a61c
commit 540310ce3a
3 files changed
+75 -3

No files matched your search

+24 -2
View File
@@ -67,8 +67,30 @@ jobs:
awk -v b="$bytes" -v max="$NATIVE_SIZE_BUDGET_MB" 'BEGIN { exit (b / 1048576 > max) }' \
|| { echo "::error::Native binary is ${mb} MB, over the ${NATIVE_SIZE_BUDGET_MB} MB budget."; exit 1; }
- name: Smoke test — version
run: ./target/floci version
- name: Smoke test
run: .github/scripts/smoke.sh ./target/floci
- name: Smoke test — doctor
run: ./target/floci doctor || true
# The release builds linux/amd64 too; building it here catches an amd64-only native failure in
# review instead of at release time.
native-linux-amd64:
name: Native image (linux/amd64)
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'graalvm-community'
cache: maven
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build native binary
run: mvn clean package -Pnative -DskipTests -B
- name: Smoke test
run: .github/scripts/smoke.sh ./target/floci
+13 -1
View File
@@ -1,7 +1,8 @@
name: Release
# Triggered when a SemVer tag (e.g. 0.1.0) is pushed.
# Builds native binaries for 4 platform targets and creates a GitHub Release.
# Builds native binaries for 5 platform targets, runs each one (.github/scripts/smoke.sh) and
# creates a GitHub Release. A binary that does not start fails its job before anything is published.
on:
push:
@@ -30,6 +31,8 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: mvn clean package -Pnative -DskipTests -B
- run: mv target/floci target/floci-linux-amd64
- name: Smoke test
run: .github/scripts/smoke.sh target/floci-linux-amd64 "$GITHUB_REF_NAME"
- uses: actions/upload-artifact@v4
with:
name: floci-linux-amd64
@@ -49,6 +52,8 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: mvn clean package -Pnative -DskipTests -B
- run: mv target/floci target/floci-linux-arm64
- name: Smoke test
run: .github/scripts/smoke.sh target/floci-linux-arm64 "$GITHUB_REF_NAME"
- uses: actions/upload-artifact@v4
with:
name: floci-linux-arm64
@@ -68,6 +73,8 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: mvn clean package -Pnative -DskipTests -B
- run: mv target/floci target/floci-darwin-arm64
- name: Smoke test
run: .github/scripts/smoke.sh target/floci-darwin-arm64 "$GITHUB_REF_NAME"
- uses: actions/upload-artifact@v4
with:
name: floci-darwin-arm64
@@ -107,6 +114,8 @@ jobs:
run: file target/floci | grep -q x86_64
- run: mv target/floci target/floci-darwin-amd64
- name: Smoke test
run: .github/scripts/smoke.sh target/floci-darwin-amd64 "$GITHUB_REF_NAME"
- uses: actions/upload-artifact@v4
with:
name: floci-darwin-amd64
@@ -126,6 +135,9 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: mvn clean package -Pnative -DskipTests -B
- run: mv target/floci.exe target/floci-windows-amd64.exe
- name: Smoke test
shell: bash
run: .github/scripts/smoke.sh target/floci-windows-amd64.exe "$GITHUB_REF_NAME"
- uses: actions/upload-artifact@v4
with:
name: floci-windows-amd64