ci: prepare Native Shell builds and publishers for 3.3.0

This commit is contained in:
Kevin Yue committed 2026-11-05 22:59:59 +08:00
1 parent 4f8f828a0b
commit d15ebdfe3a
13 files changed
+809 -29

No files matched your search

+14 -3
View File
@@ -1,19 +1,26 @@
#!/usr/bin/env bash
# Emit only host-owned stage names; never forward private command output.
# Never forward private command output; report stages and allowlisted diagnostics.
set -euo pipefail
source_directory=$1
container="gp-private-tests-$$"
trap 'timeout --kill-after=5s 30s docker rm --force "$container" >/dev/null 2>&1 || true' EXIT
private_output=$(mktemp)
script_directory=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
trap 'timeout --kill-after=5s 30s docker rm --force "$container" >/dev/null 2>&1 || true; unlink "$private_output"' EXIT
run_stage() {
local name=$1 limit=$2 status started=$SECONDS
shift 2
echo "$name: started (limit $limit)."
if timeout --kill-after=30s "$limit" "$@" >/dev/null 2>&1; then
if timeout --kill-after=30s "$limit" "$@" >"$private_output" 2>&1; then
echo "$name: passed ($((SECONDS - started))s)."
else
status=$?
if [[ "$name" == 'Compile Rust tests' ]]; then
python3 "$script_directory/private-ci-diagnostics.py" compile "$private_output" || true
elif [[ "$name" == 'Rust tests' ]]; then
python3 "$script_directory/private-ci-diagnostics.py" tests "$private_output" || true
fi
if [[ "$status" == 124 ]]; then
echo "::error::$name: timed out after $((SECONDS - started))s (limit $limit); diagnostics suppressed."
elif [[ "$status" == 137 ]]; then
@@ -30,6 +37,10 @@ run_stage 'Start test container' 5m docker run --detach --rm \
--user vscode \
-e HOME=/home/vscode \
-e CARGO_TARGET_DIR=/tmp/gpgui-test-target \
-e CARGO_BUILD_JOBS=2 \
-e CARGO_INCREMENTAL=0 \
-e CARGO_PROFILE_DEV_DEBUG=0 \
-e CARGO_PROFILE_TEST_DEBUG=0 \
-e COREPACK_INTEGRITY_KEYS=0 \
-e LIBXML2_STATIC=1 \
-v "$source_directory:/source:ro" \