ci: per-OS shells (pwsh on Windows, bash on unix) #48
2 changed files with 73 additions and 17 deletions
15
.github/workflows/wai-byte-equality.yml
vendored
15
.github/workflows/wai-byte-equality.yml
vendored
|
|
@ -49,9 +49,12 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Bootstrap rustup: the docker runner image ships no Rust, and
|
||||
# dtolnay/rust-toolchain cannot help — it calls `rustup`, which is absent.
|
||||
- name: Install Rust 1.97.1
|
||||
# unix: bootstrap rustup (docker image ships no Rust; macOS host has it but
|
||||
# launchd's PATH omits ~/.cargo/bin). Windows is a host executor with rustup
|
||||
# already present, and must use pwsh — its `bash` is the WSL stub.
|
||||
- name: Install Rust 1.97.1 (unix)
|
||||
if: matrix.os != 'windows'
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
command -v rustup >/dev/null 2>&1 || \
|
||||
|
|
@ -59,6 +62,12 @@ jobs:
|
|||
rustup toolchain install 1.97.1 --profile minimal
|
||||
rustup default 1.97.1
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
- name: Install Rust 1.97.1 (Windows)
|
||||
if: matrix.os == 'windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
rustup toolchain install 1.97.1 --profile minimal
|
||||
rustup default 1.97.1
|
||||
|
||||
- name: Decode fixtures, assert golden bytes
|
||||
working-directory: wai/byte-exact-conformance
|
||||
|
|
|
|||
75
.github/workflows/wai-conformance.yml
vendored
75
.github/workflows/wai-conformance.yml
vendored
|
|
@ -26,9 +26,10 @@ on:
|
|||
- 'wai/byte-exact-conformance/**'
|
||||
- '.github/workflows/wai-conformance.yml'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
# No global `shell:` default. The Windows runner is a host executor whose
|
||||
# `bash` is the WSL stub (a different OS), so shell-specific steps below pick
|
||||
# their shell per-OS: bash on unix, pwsh on Windows. Bare `cargo …` steps take
|
||||
# each runner's native default, which runs cargo identically either way.
|
||||
|
||||
jobs:
|
||||
cargo-classes:
|
||||
|
|
@ -45,11 +46,14 @@ jobs:
|
|||
os: [linux, linux-arm64, macos, windows]
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
# Bootstraps rustup on the minimal docker image (linux / linux-arm64 /
|
||||
# windows runners ship no Rust at all) and also covers the macOS `host`
|
||||
# runner, whose launchd PATH omits ~/.cargo/bin. dtolnay/rust-toolchain
|
||||
# is NOT usable here: it calls `rustup`, which the docker image lacks.
|
||||
- name: Install Rust 1.97.1
|
||||
|
||||
# unix: the docker runners (linux / linux-arm64) ship no Rust, so rustup
|
||||
# is bootstrapped; the macOS `host` runner has it but launchd's PATH omits
|
||||
# ~/.cargo/bin. dtolnay/rust-toolchain is unusable — it calls a `rustup`
|
||||
# the docker image lacks.
|
||||
- name: Install Rust 1.97.1 (unix)
|
||||
if: matrix.os != 'windows'
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
command -v rustup >/dev/null 2>&1 || \
|
||||
|
|
@ -57,6 +61,16 @@ jobs:
|
|||
rustup toolchain install 1.97.1 --profile minimal
|
||||
rustup default 1.97.1
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
# Windows: a host executor with rustup already installed. Only ensure the
|
||||
# pinned toolchain is present + default. pwsh, never bash (that is WSL here).
|
||||
- name: Install Rust 1.97.1 (Windows)
|
||||
if: matrix.os == 'windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
rustup toolchain install 1.97.1 --profile minimal
|
||||
rustup default 1.97.1
|
||||
|
||||
- name: Build the cargo classes (pure Rust, no C codec chain)
|
||||
working-directory: wai/wai-rs
|
||||
# neural_int joins the pure-Rust set: the integer-synthesis decoder is
|
||||
|
|
@ -69,7 +83,13 @@ jobs:
|
|||
- name: Carriage conformance — every registered capability round-trips byte-exact
|
||||
working-directory: wai/wai-rs
|
||||
run: cargo test --no-default-features --test carriage
|
||||
- name: Every cargo-class corpus reproduces its frozen hashes
|
||||
|
||||
# The corpus-verify loop is genuinely shell-specific (a helper that groups
|
||||
# log output and propagates the first non-zero exit), so it ships once per
|
||||
# shell family. The command it runs is identical; only the wrapper differs.
|
||||
- name: Every cargo-class corpus reproduces its frozen hashes (unix)
|
||||
if: matrix.os != 'windows'
|
||||
shell: bash
|
||||
working-directory: wai/wai-rs
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
|
@ -84,6 +104,27 @@ jobs:
|
|||
v score wai_score_vectors ../score-conformance
|
||||
v int-synth wai_int_synth_vectors ../neural-conformance
|
||||
v film wai_film_vectors ../film-conformance
|
||||
- name: Every cargo-class corpus reproduces its frozen hashes (Windows)
|
||||
if: matrix.os == 'windows'
|
||||
shell: pwsh
|
||||
working-directory: wai/wai-rs
|
||||
run: |
|
||||
$F = "world,audio_scene,haptic,splat4d,score,provenance,neural_int,film"
|
||||
function v($grp, $bin, $path) {
|
||||
Write-Output "::group::$grp"
|
||||
cargo run -q --no-default-features --features $F --bin $bin -- verify $path
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
Write-Output "::endgroup::"
|
||||
}
|
||||
v worlds wai_world_vectors ../world-conformance
|
||||
v spatial-audio wai_audio_vectors ../audio-conformance
|
||||
v haptics wai_haptic_vectors ../haptic-conformance
|
||||
v state-feeds wai_feed_vectors ../feed-conformance
|
||||
v avatars wai_avatar_vectors ../avatar-conformance
|
||||
v volumetric wai_splat4d_vectors ../volumetric-conformance
|
||||
v score wai_score_vectors ../score-conformance
|
||||
v int-synth wai_int_synth_vectors ../neural-conformance
|
||||
v film wai_film_vectors ../film-conformance
|
||||
|
||||
byte-exact:
|
||||
name: cross-arch byte-equality · ${{ matrix.os }}
|
||||
|
|
@ -99,11 +140,10 @@ jobs:
|
|||
os: [linux, linux-arm64, macos, windows]
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
# Bootstraps rustup on the minimal docker image (linux / linux-arm64 /
|
||||
# windows runners ship no Rust at all) and also covers the macOS `host`
|
||||
# runner, whose launchd PATH omits ~/.cargo/bin. dtolnay/rust-toolchain
|
||||
# is NOT usable here: it calls `rustup`, which the docker image lacks.
|
||||
- name: Install Rust 1.97.1
|
||||
|
||||
- name: Install Rust 1.97.1 (unix)
|
||||
if: matrix.os != 'windows'
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
command -v rustup >/dev/null 2>&1 || \
|
||||
|
|
@ -111,6 +151,13 @@ jobs:
|
|||
rustup toolchain install 1.97.1 --profile minimal
|
||||
rustup default 1.97.1
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
- name: Install Rust 1.97.1 (Windows)
|
||||
if: matrix.os == 'windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
rustup toolchain install 1.97.1 --profile minimal
|
||||
rustup default 1.97.1
|
||||
|
||||
- name: Integer rANS + int_synth + JPEG-AI mANS goldens (one machine → every machine)
|
||||
working-directory: wai/byte-exact-conformance
|
||||
run: cargo test --release
|
||||
|
|
|
|||
Loading…
Reference in a new issue