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

+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Runs a freshly built floci binary through the paths a native image can get wrong while the JVM
# build stays green: startup, every product tree's command wiring, a Jackson read, and the
# parameter-error path. No emulator or Docker daemon is needed.
#
# .github/scripts/smoke.sh <binary> [expected-version]
set -euo pipefail
bin="$1"
expected="${2:-}"
"$bin" version
if [ -n "$expected" ]; then
reported=$("$bin" version -o json | tr -d ' \r\n')
case "$reported" in
*"\"cli\":\"$expected\""*) ;;
*) echo "::error::$bin reports $reported, expected cli version $expected"; exit 1 ;;
esac
fi
for tree in aws gcp az oci; do
"$bin" "$tree" --help > /dev/null
done
"$bin" config profile list -o json > /dev/null
# An unknown profile is a usage error: exit 2, not a crash.
set +e
"$bin" start --profile floci-smoke-no-such-profile > /dev/null 2>&1
code=$?
set -e
if [ "$code" -ne 2 ]; then
echo "::error::'start --profile <missing>' exited $code, expected 2"
exit 1
fi
echo "smoke test passed: $bin"