Every path-gated workflow begins with one small job -- `does this change touch
it`, or `which workspaces this change touches` for the standards build -- that
all of its real jobs declare in `needs`. All 55 of those gate jobs ran on
`linux-arm64`.
That is the one label the fleet cannot spare. Sampled while 267 runs were
queued, every waiting run had the same shape:
[waiting] linux-arm64 does this change touch it
[blocked] linux member · dataflow device, simulated
[blocked] macos member · dataflow device absent
237 runs, each holding a gate in the longest queue, and every real job blocked
behind it. Not only `linux` jobs: `macos`, `linux-hw`, `linux-arm64-hw` and
`macos-m3-ultra` jobs were blocked too. The measured effect was `linux-arm64`
263 deep against `linux` **zero**, with jetson-hub's 20 cores taking no job for
a full hour -- starved not for want of work but because the work could not be
unblocked. A gate waiting on the resource it is rationing is head-of-line
blocking, and it makes every other runner in the fleet idle on its behalf.
The gates move to `linux`. Nothing else changes: the diff is 55 `runs-on` lines
and no others, and every touched file still parses.
Why `linux` and not elsewhere. The gate is not free -- it compares
`BASE...HEAD`, which needs the merge base, so `fetch-depth: 0` is a full clone
rather than a ten-second script. `macos` is served by hosts on a Mac Studio
sitting at load 185; `linux` is a separate 20-core box that was measurably
empty. This moves a serialisation point to the least contended label; it does
not remove it, and the gate is still a single point of failure for its
workflow. The structural fix is an early-exit first step inside each job, which
costs one checkout per leg and is a larger change.
Follow-up, deliberately not bundled: jetson-hub runs at capacity 2 with 15 GB of
RAM, so 55 clones still serialise two at a time. Raising capacity helps gates
and hurts the heavy emulated-architecture jobs that share the label, so it wants
measuring on its own.
Co-Authored-By: Claude Opus 5 <[email protected]>
119 lines
5.2 KiB
YAML
119 lines
5.2 KiB
YAML
name: wai-sink-swift native sink package
|
|
|
|
# The native sink's Swift package (wai/wai-sink-swift, extensions/native-sink.md): on the macOS
|
|
# runner, the host with the platform SDKs and simulators, libwai is built for every slice of the
|
|
# package's binary target (desktop, phone, phone simulator, television, television simulator) and
|
|
# the package's tests run on the desktop, and in fresh phone and television simulators hosted in
|
|
# TestHost (a device runs no tool-hosted test bundle), every step bounded: the corpus
|
|
# live-conformance/native-sink through the Swift wrapper and the C interface; the loopback relay
|
|
# over the reference package's floor, presenting what verifies byte for byte and answering 502
|
|
# for a fragment changed at the origin; and the platform's player end to end, over a presentation
|
|
# made at run time with the platform's own encoder, played through the relay to its end, a changed
|
|
# fragment withheld, and a session nobody can see ended as hidden. The phone and television device
|
|
# slices are built and linked, not run. Nothing listens beyond loopback.
|
|
#
|
|
# Push filters match the push's delta, so every path the jobs read is listed.
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'wai/wai-sink-swift/**'
|
|
- 'wai/wai-rs/**'
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/wai-ops/**'
|
|
- 'wai/live-conformance/native-sink/**'
|
|
- 'wai/pack-conformance/packs/video-base-01/**'
|
|
- 'wai/extensions/native-sink.md'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-sink-swift.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'wai/wai-sink-swift/**'
|
|
- 'wai/wai-rs/**'
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/wai-ops/**'
|
|
- 'wai/live-conformance/native-sink/**'
|
|
- 'wai/pack-conformance/packs/video-base-01/**'
|
|
- 'wai/extensions/native-sink.md'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-sink-swift.yml'
|
|
|
|
jobs:
|
|
relevant:
|
|
name: does this change touch it
|
|
runs-on: linux
|
|
outputs:
|
|
run: ${{ steps.gate.outputs.run }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- id: gate
|
|
run: |
|
|
set -euo pipefail
|
|
r=$(python3 scripts/pr-touches-paths.py .github/workflows/wai-sink-swift.yml \
|
|
"${{ github.event.pull_request.base.sha }}" \
|
|
"${{ github.event.pull_request.head.sha }}")
|
|
echo "this change touches wai-sink-swift: $r"
|
|
echo "run=$r" >> "$GITHUB_OUTPUT"
|
|
|
|
package-macos:
|
|
name: libwai slices, desktop tests, simulator tests · macos
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: macos
|
|
timeout-minutes: 90
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
# launchd's PATH omits cargo on the macOS host runner.
|
|
- name: Put cargo on PATH
|
|
shell: bash
|
|
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- name: The targets the slices need
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
rustup target add aarch64-apple-darwin x86_64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
|
|
rustup component list --toolchain nightly-2026-10-17 --installed | grep -q '^rust-src' \
|
|
|| rustup toolchain install nightly-2026-10-17 --profile minimal --component rust-src
|
|
- name: WaiFFI.xcframework, every slice
|
|
shell: bash
|
|
working-directory: wai/wai-sink-swift
|
|
run: nice -n 10 bash scripts/build-xcframework.sh
|
|
- name: The desktop tests
|
|
shell: bash
|
|
working-directory: wai/wai-sink-swift
|
|
timeout-minutes: 20
|
|
run: |
|
|
set -euo pipefail
|
|
nice -n 10 swift test 2>&1 | tee "$RUNNER_TEMP/swift-test.log"
|
|
grep -qE "Executed [1-9][0-9]* tests, with 0 failures" "$RUNNER_TEMP/swift-test.log" || { echo "::error::the desktop tests did not pass"; exit 1; }
|
|
# Each simulator run creates and boots a fresh simulator, builds the test host for it and runs
|
|
# the tests hosted in it, then shuts the simulator down and deletes it, however the run ends.
|
|
# Every step inside has a hard limit and fails, saying which, when it passes it; the step's
|
|
# own limit is the backstop, so no run holds the runner past it.
|
|
- name: The phone simulator tests, hosted in TestHost
|
|
shell: bash
|
|
working-directory: wai/wai-sink-swift
|
|
timeout-minutes: 30
|
|
run: nice -n 10 bash scripts/test-simulator.sh ios
|
|
- name: The television simulator tests, hosted in TestHost
|
|
shell: bash
|
|
working-directory: wai/wai-sink-swift
|
|
timeout-minutes: 30
|
|
run: nice -n 10 bash scripts/test-simulator.sh tvos
|
|
- name: The phone and television device slices link
|
|
shell: bash
|
|
working-directory: wai/wai-sink-swift
|
|
timeout-minutes: 20
|
|
run: |
|
|
set -euo pipefail
|
|
for d in "generic/platform=iOS" "generic/platform=tvOS"; do
|
|
xcodebuild build -scheme WaiSink -destination "$d" -derivedDataPath .build/xc-device 2>&1 | tee "$RUNNER_TEMP/device.log" | grep -E "error:|\*\* BUILD" || true
|
|
grep -q '\*\* BUILD SUCCEEDED \*\*' "$RUNNER_TEMP/device.log" || { echo "::error::the package does not build for $d"; exit 1; }
|
|
done
|