Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
383e170
ci(FLOW-010 P1): build the quick-tier tree-reader set once, shards ru…
noahgift Oct 20, 2026
48d0839
ci(FLOW-010 P1): address w5032 round (4 blockers + bind)
noahgift Oct 20, 2026
1793df0
ci(FLOW-010 P1): w5404 round — extract to the build path, smoke, rust…
noahgift Oct 20, 2026
e17b89b
ci(FLOW-010 P1): w5404 round 3 — smoke n>0, validated toolchain hash,…
noahgift Oct 20, 2026
4019aae
fix(ci): archive bind check dispatches --hash-toolchain; wiring check…
noahgift Oct 20, 2026
4497779
test(ci): archive wiring is a serde-saphyr test with 16 mutant fixtur…
noahgift Oct 20, 2026
550c185
test(ci): archive wiring bans if:false/continue-on-error, set +e, gua…
noahgift Oct 20, 2026
d2d1760
test(ci): pin the shard bind step and the archive build step run: sca…
noahgift Oct 20, 2026
6cdb741
ci(archive): derive the shard count from the matrix pins, not a liter…
noahgift Oct 20, 2026
9467dd7
Merge remote-tracking branch 'origin/main' into ci/nextest-archive
noahgift Oct 20, 2026
b674583
merge origin/main into ci/nextest-archive: archive yardstick uses the…
noahgift Oct 21, 2026
5dca38e
fix(ci): the archive job is a fourth fat_teardown.sh step — tell the …
noahgift Oct 21, 2026
a7dc8ee
fix(wiring): look the archive job up under jobs, not the whole doc; d…
noahgift Oct 21, 2026
904829c
fix(wiring): exact jobs lookups (no recursive find_key); nested decoy…
noahgift Oct 21, 2026
9a07c84
fix(wiring): pin the ci.yml archive job's --sections to exactly works…
noahgift Oct 21, 2026
176896c
fix(wiring): pin the full normalized fat_driver command; --sect abbre…
noahgift Oct 21, 2026
93b3819
fix(ci-guards): 4 teardown steps and W1/W2=2 now that workspace-test-…
noahgift Oct 21, 2026
3ee1868
ci(archive): derive the sccache host dir from HOME so the path ratche…
noahgift Oct 21, 2026
bf7060c
test(ci): re-bless archive_build_step fixture for the HOME-derived sc…
noahgift Oct 21, 2026
baff7ca
Merge remote-tracking branch 'origin/main' into a3-5812-upd
noahgift Oct 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ jobs:
- name: The fat wait is cancel-aware and the teardown still runs on cancel
run: |
setsid --wait bash scripts/check_ci_wait_cancel.sh --self-test
setsid --wait bash scripts/check_ci_wait_cancel.sh
# 4 teardowns: x86-main, determinism, ARM64 determinism, workspace-test-archive
CI_TEARDOWN_STEPS=4 setsid --wait bash scripts/check_ci_wait_cancel.sh

x86-main:
needs: [mg-reuse]
Expand Down Expand Up @@ -439,7 +440,47 @@ jobs:
# The workspace tests, one shard per job (nextest hash partition N/12 plus the
# explicit runner's round-robin N/12), in parallel on the X64 clean-room pool.
# The section body is ci/sections.yml `workspace-test-shard`, unchanged.
# FLOW-010 P1 (amendment 3 item 7): build the quick-tier tree-reader set ONCE
# and hand the nextest archive to the shards. It is a `needs` of every shard, so a
# red or skipped archive job skips the shards and `workspace-test` goes red: part of
# the gate, no second path. In a non-quick tier it uploads only a bind.json saying so.
workspace-test-archive:
runs-on: ${{ github.event_name == 'merge_group' && fromJSON('["self-hosted","Linux","X64","mq"]') || fromJSON('["self-hosted","Linux","X64","clean-room"]') }}
timeout-minutes: 90
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FAT_VARS_JSON: ${{ toJSON(vars) }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: archive_list_equal case table must still turn RED
run: setsid --wait bash scripts/ci/archive_list_equal.sh --self-test
- name: archive_bind_check case table must still turn RED
run: setsid --wait bash scripts/ci/archive_bind_check.sh --self-test
- name: Sections
id: run
run: >-
python3 scripts/ci/fat_driver.py run
--sections 'workspace-test-archive'
--results "$RUNNER_TEMP/fat/results.json"
- name: Remove this job's section containers (runs on cancel too)
if: always()
run: if [ -f scripts/ci/fat_teardown.sh ]; then bash scripts/ci/fat_teardown.sh "$GITHUB_RUN_ID" "$RUNNER_TEMP"; fi
- uses: actions/upload-artifact@v7
if: success()
with:
name: ws-archive
path: ${{ runner.temp }}/fat/artifacts/ws-archive/
if-no-files-found: error
overwrite: true
compression-level: 0
- name: Free this job's own cargo target dir
if: always()
run: if [ -f scripts/ci/free_own_target_dir.sh ]; then bash scripts/ci/free_own_target_dir.sh "${{ github.event.pull_request.number || github.ref_name }}-arc" "$GITHUB_RUN_ID"; fi

workspace-test-shard:
needs: [workspace-test-archive]
# same lanes as x86-main: clean-room for pull_request/push, mq for a merge_group entry
runs-on: ${{ github.event_name == 'merge_group' && fromJSON('["self-hosted","Linux","X64","mq"]') || fromJSON('["self-hosted","Linux","X64","clean-room"]') }}
timeout-minutes: 180
Expand Down
432 changes: 423 additions & 9 deletions ci/sections.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
set -euo pipefail
out="$GITHUB_WORKSPACE/ws-archive-out"
mkdir -p "$out"
if [ "$TIER" != quick ]; then
jq -n --arg t "$TIER" --arg s "$GITHUB_SHA" '{tier:$t,sha:$s}' > "$out/bind.json"
printf 'FLOW-010 P1: tier is %s, nothing archived\n' "$TIER"
exit 0
fi
read -ra targets <<< "$TARGETS"
EXPR="$(bash scripts/ci_test_tier.sh --filterset "$TARGETS")"
BUILD_FLAGS="$(printf '%s\n' "${targets[@]}" | grep -vE '^aprender-(gpu|cuda-edge|compute):' | tr '\n' ' ' | bash scripts/ci_test_tier.sh --build-flags)"
tree="$(printf '%s\n' "${targets[@]}" | cut -d: -f1 | sort -u | grep -vxE 'aprender-(gpu|cuda-edge|compute)' | sed 's/^/-p /' | tr '\n' ' ')"
printf 'archive build flags: %s\n' "$BUILD_FLAGS"
SHARDS="$(awk -v ev="$GITHUB_EVENT_NAME" '/^matrix-pins:/{p=1;next} p&&/^ workspace-test-shard:/{k="pr";next} p&&/^ workspace-test-shard-merge_group:/{k="mg";next} p&&/^ [a-z]/{k=""} k&&/^ - \{shard:/{c[k]++} END{print (ev=="merge_group"&&c["mg"]?c["mg"]:c["pr"])+0}' ci/sections.yml)"
[ "$SHARDS" -gt 0 ] || { echo "no workspace-test-shard pins in ci/sections.yml"; exit 1; }
SCCACHE_HOST_DIR="${HOME}/data/sccache"
dock() {
docker run --rm -e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0=/workspace -e CI -e GITHUB_ACTIONS -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_EVENT_NAME -e GITHUB_WORKFLOW -v "${GITHUB_WORKSPACE}:/workspace" -v "/mnt/nvme-raid0/cargo-ci/registry/${PR_OR_REF}:/usr/local/cargo/registry" -v "/mnt/nvme-raid0/targets/aprender-ci/${PR_OR_REF}/run-${GITHUB_RUN_ID}:/workspace/target" -v "${SCCACHE_HOST_DIR}:/sccache" -w /workspace -e CARGO_TARGET_DIR=/workspace/target -e RUSTC_WRAPPER=/usr/local/cargo/bin/sccache -e SCCACHE_DIR=/sccache -e SCCACHE_CACHE_SIZE=50G -e CARGO_INCREMENTAL=0 -e CARGO_BUILD_JOBS=4 -e RAYON_NUM_THREADS=4 -e NEXTEST_TEST_THREADS=4 -e RUST_TEST_THREADS=4 -e CARGO_PROFILE_TEST_DEBUG=0 -e CARGO_PROFILE_DEV_DEBUG=0 -e CARGO_TERM_COLOR=never -e EXPR="$EXPR" -e BUILD_FLAGS="$BUILD_FLAGS" -e TREE="$tree" -e SHARDS="$SHARDS" "$IMAGE" bash -c "set -euo pipefail; $1"
}
t0=$SECONDS
dock 'cargo nextest archive --profile ci $BUILD_FLAGS --archive-file /workspace/ws-archive-out/ws.tar.zst'
t_build=$((SECONDS - t0)); t0=$SECONDS
dock 'cargo nextest list --profile ci $TREE --lib --tests -E "$EXPR" --message-format json > /workspace/ws-archive-out/live.json
for n in $(seq 1 "$SHARDS"); do cargo nextest list --profile ci $TREE --lib --tests -E "$EXPR" --partition "hash:${n}/${SHARDS}" --message-format json > "/workspace/ws-archive-out/tree.${n}.list.json"; done'
dock 'cargo nextest list --profile ci --archive-file /workspace/ws-archive-out/ws.tar.zst --workspace-remap /workspace --extract-to /workspace --extract-overwrite -E "$EXPR" --message-format json > /workspace/ws-archive-out/arc.json'
t_list=$((SECONDS - t0))
bash scripts/ci/archive_list_equal.sh "$out/live.json" "$out/arc.json"
smoke="$GITHUB_WORKSPACE/ws-smoke-target"
rm -rf "${smoke:?}"; mkdir -p "$smoke"
tar --zstd -tf "$out/ws.tar.zst" | grep -E '^target/debug/[^/]+$' | sed 's#^target/#/workspace/target/#' > "$out/bins.txt" || true
docker run --rm -v "${GITHUB_WORKSPACE}:/workspace" -v "${smoke}:/workspace/target" -w /workspace -e BINS="$(tr '\n' ' ' < "$out/bins.txt")" "$IMAGE" bash -c 'set -euo pipefail
cargo nextest list --profile ci --archive-file /workspace/ws-archive-out/ws.tar.zst --workspace-remap /workspace --extract-to /workspace --extract-overwrite --message-format json > /dev/null
n=0; for b in $BINS; do test -x "$b" || { echo "::error::archived binary $b not executable at its build path"; exit 1; }; n=$((n+1)); done
[ "$n" -gt 0 ] || { echo "::error::smoke checked 0 binaries -- the archive lists none under target/debug"; exit 1; }
if [ -x /workspace/target/debug/apr ]; then /workspace/target/debug/apr --version; fi
echo "smoke: $n debug binaries back at /workspace/target/debug"; chown -R 1000:1000 /workspace/target'
rm -rf "${smoke:?}" "${out:?}/bins.txt"
printf 'FLOW-010 P1 timing: archive_build_s=%s list_s=%s archive_mb=%s\n' "$t_build" "$t_list" "$(( $(stat -c %s "$out/ws.tar.zst") / 1048576 ))"
rm -f "${out:?}/live.json" "${out:?}/arc.json"
rustc_vv="$(docker run --rm "$IMAGE" rustc -vV)"
rustc_h="$(bash scripts/ci/archive_bind_check.sh --hash-toolchain "$rustc_vv")"
jq -n --arg b "$t_build" --arg l "$t_list" --arg s "$GITHUB_SHA" --arg e "$EXPR" --arg f "$BUILD_FLAGS" --arg i "$rustc_h" '{tier:"quick",sha:$s,expr:$e,flags:$f,rustc:$i,build_s:($b|tonumber),list_s:($l|tonumber)}' > "$out/bind.json"
ls -l "$out"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set -euo pipefail
read -ra targets <<< "$TARGETS"
printf 'tree-reader targets: %s\n' "${#targets[@]}"
pkgs="$(printf '%s\n' "${targets[@]}" | cut -d: -f1 | sort -u | grep -vxE 'aprender-(gpu|cuda-edge|compute)' | sed 's/^/-p /' | tr '\n' ' ')"
printf 'packages built: %s\n' "$(printf '%s' "$pkgs" | grep -o -- '-p ' | wc -l)"
EXPR="$(bash scripts/ci_test_tier.sh --filterset "$TARGETS")"
BUILD_FLAGS="$(printf '%s\n' "${targets[@]}" | grep -vE '^aprender-(gpu|cuda-edge|compute):' | tr '\n' ' ' | bash scripts/ci_test_tier.sh --build-flags)"
printf 'build flags: %s\n' "$BUILD_FLAGS"
printf 'nextest filterset (%s clause(s)):\n' "$(printf '%s' "$EXPR" | tr '|' '\n' | wc -l)"
printf '%s\n' "$EXPR" | tr '|' '\n' | sed 's/^ *//; s/ *$//; s/^/ + /'
arc="$GITHUB_WORKSPACE/ws-archive"
rustc_vv="$(docker run --rm "$IMAGE" rustc -vV)"
bash scripts/ci/archive_bind_check.sh --toolchain "$rustc_vv" "$arc/bind.json" sha="${GITHUB_SHA}" expr="$EXPR" flags="$BUILD_FLAGS"
printf 'FLOW-010 P1: running shard %s from the prebuilt archive (%s MB)\n' "$SHARD" "$(( $(stat -c %s "$arc/ws.tar.zst") / 1048576 ))"
docker run --rm -e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0=/workspace -e CI -e GITHUB_ACTIONS -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_EVENT_NAME -e GITHUB_WORKFLOW -v "${GITHUB_WORKSPACE}:/workspace" -v "/mnt/nvme-raid0/cargo-ci/registry/${PR_OR_REF}:/usr/local/cargo/registry" -v "/mnt/nvme-raid0/targets/aprender-ci/${PR_OR_REF}/run-${GITHUB_RUN_ID}:/workspace/target" -v "${SCCACHE_HOST_DIR}:/sccache" -w /workspace -e CARGO_TARGET_DIR=/workspace/target -e RUSTC_WRAPPER=/usr/local/cargo/bin/sccache -e SCCACHE_DIR=/sccache -e SCCACHE_CACHE_SIZE=50G -e CARGO_INCREMENTAL=0 -e CARGO_BUILD_JOBS=4 -e RAYON_NUM_THREADS=4 -e NEXTEST_TEST_THREADS=4 -e RUST_TEST_THREADS=4 -e CARGO_PROFILE_TEST_DEBUG=0 -e CARGO_PROFILE_DEV_DEBUG=0 -e CARGO_TERM_COLOR=never -e EXPR="$EXPR" -e SHARD -e SHARDS "$IMAGE" bash -c 'set -euo pipefail
cargo nextest run --profile ci --archive-file /workspace/ws-archive/ws.tar.zst --workspace-remap /workspace --extract-to /workspace --extract-overwrite -E "$EXPR" --partition "hash:${SHARD}/${SHARDS}"'
Loading
Loading