open-standards/.github/workflows/wai-release.yml
Transaction Science 317ae58c6e
Some checks failed
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 7s
wai-key-proxy / does this change touch it (pull_request) Successful in 6s
wai-ops-gpu integer operators on GPUs / does this change touch it (pull_request) Successful in 7s
wai-quantum docs, course and locales / does this change touch it (pull_request) Successful in 7s
WAI neural sink gates / does this change touch it (pull_request) Successful in 15s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 8s
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Successful in 9s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 2m33s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m39s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 7m53s
wai-quantum WebGPU member / member · GPU, Vulkan (jetson-hub) (pull_request) Successful in 21m16s
wai-quantum WebGPU member / member · GPU, Vulkan (thor) (pull_request) Successful in 24m56s
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (pull_request) Successful in 33s
joule-code conformance gate / joule-moq-relay, every target (pull_request) Successful in 2m56s
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Successful in 5m47s
wai-key-proxy / proxy · linux (pull_request) Successful in 3m31s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Successful in 24s
wai-ops-gpu integer operators on GPUs / builds · no adapter is not a pass (linux) (pull_request) Successful in 3m29s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 6m58s
WAI neural sink gates / the exact JPEG-AI decoder reports its path (pinned inputs, required) (pull_request) Successful in 2m35s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 4m39s
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Successful in 5m52s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m35s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness (pull_request) Successful in 4m23s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 12m44s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 21m29s
wai-ops-gpu integer operators on GPUs / Metal GPU and browser WebGPU (macos) (pull_request) Successful in 11m9s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 2m31s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 1m53s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 6s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 9s
wai-app and Create / wai-app · does this change touch it (pull_request) Successful in 6s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 9s
joule-moq-remote host agent / joule-moq-remote · does this change touch it (pull_request) Successful in 17s
WAI conformance / does this change touch it (pull_request) Successful in 6s
WAI operation catalogue / does this change touch it (pull_request) Successful in 8s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 12s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 13s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 5s
wai-ledger service / does this change touch it (pull_request) Successful in 7s
wai-fleet service / does this change touch it (pull_request) Successful in 9s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 8s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 8s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 9s
WAI energy receipts / does this change touch it (pull_request) Successful in 20s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 9s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 12s
WAI Studio / does this change touch it (pull_request) Successful in 17s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 17s
wai-web wasm32 / does this change touch it (pull_request) Successful in 18s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m23s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (pull_request) Successful in 1m16s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 39s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m8s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 1m19s
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Successful in 4m25s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Successful in 2m53s
wai-fleet service / service · linux (pull_request) Successful in 2m17s
wai-quantum studio and desktop / desktop app · windows (pull_request) Successful in 9m38s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 9m30s
WAI operation catalogue / the catalogue and every door · linux (pull_request) Successful in 6m29s
wai-quantum for JavaScript / javascript · linux (pull_request) Successful in 4m12s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 5m17s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m14s
wai-quantum studio and desktop / desktop app · linux (pull_request) Successful in 6m41s
wai-ledger service / service · linux (pull_request) Successful in 8m36s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 10m24s
wai-pack / wai-pack · linux (pull_request) Successful in 9m1s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 14m56s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 5m29s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 8m50s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 7m8s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 14m1s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 57m29s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Successful in 1m14s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 11m25s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (pull_request) Successful in 10m40s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 28s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m31s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 2m1s
wai-fleet service / service · macos (pull_request) Successful in 59s
wai-ledger service / service · macos (pull_request) Successful in 1m0s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 16m33s
wai-pack / wai-pack · macos (pull_request) Successful in 4m19s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 18m1s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 7m27s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 8m5s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 8m4s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 12m25s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 21m2s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 18m16s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 1m28s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Successful in 1m11s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 4m56s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 34s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 5m47s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 13s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 28s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 1m55s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 5m12s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m44s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 17m4s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 26s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 14s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 18m10s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 7m41s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 3m53s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 12m29s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Failing after 8h46m58s
wai-release: the header states what each archive runs, not the state of a runner
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 04:22:37 -05:00

317 lines
16 KiB
YAML

name: wai command line release
# On a tag wai-v<version> (the version wai/wai-rs/Cargo.toml states), builds the quickstart
# archive (wai/quickstart/build.sh) on each runner and attaches it to the forge release of that
# tag, each archive with its SHA-256. An archive holds bin/ (wai with the feature quickstart,
# wai-relay, wai-room, wai-ingest, wai-remote-host, wai-pack, wai-quantum), share/wai/web/ (the
# room client) and share/wai/studio/ (WAI Studio, which `wai dev` serves at /_wai/), both built
# once, on the macOS host, which has the WebAssembly toolchain and Node:
# macOS aarch64-apple-darwin, and x86_64-apple-darwin on the Intel Mac (macos-x86_64);
# Linux x86_64- and aarch64-unknown-linux-musl, static, so any distribution runs it;
# Windows x86_64-pc-windows-msvc, as a zip.
# The first job checks the tag against the crate's version and the installer's, and that each
# project file schema (wai/schema/) is served at its $id as committed: every project file the
# release writes names its schema there, so a tag does not build until the site serves it.
# Before it is attached, each archive runs the quickstart as a new user runs it, from the
# archive alone on a fresh home directory and a PATH of the system's own directories
# (wai/quickstart/test/clean-machine.sh; on Windows its PowerShell twin, clean-machine.ps1):
# the archive checked against its SHA-256 and unpacked, what it holds checked (every binary,
# each of which runs, the room client and WAI Studio), then wai hello, wai verify,
# wai create my-room --template video-room and wai dev --check in the project, Studio at /_wai/
# among what it checks; and on the Apple-silicon Mac, the project's page joined in two browser
# pages, each decoding the other. A cross-built archive, whose binaries this host cannot run,
# is not run.
# A last job writes the Homebrew formula and the Scoop manifest for the archives attached and
# attaches them too; they go into the tap and the bucket by hand.
#
# Uploads go to the forge directly over the private network (FORGE_API), never through the
# public tunnel. A runner that is down leaves its platform's archive missing: the release lists
# what each build attached.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
tags: ['wai-v*']
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
FORGE_API: http://100.64.224.0:3400/api/v1
FORGE_REPO: Transaction-Science/open-standards
PUBLIC: https://git.transaction.science/Transaction-Science/open-standards
jobs:
version:
name: the tag is the crate's version
runs-on: linux
outputs:
version: ${{ steps.v.outputs.version }}
steps:
- uses: actions/checkout@v5
- id: v
shell: bash
run: |
set -euo pipefail
v="${GITHUB_REF_NAME#wai-v}"
crate="$(sed -n 's/^version = "\(.*\)"$/\1/p' wai/wai-rs/Cargo.toml | head -1)"
[ "$v" = "$crate" ] || { echo "::error::the tag says $v, wai/wai-rs/Cargo.toml says $crate"; exit 1; }
grep -q "WAI_VERSION:-$v}" wai/quickstart/install.sh || { echo "::error::wai/quickstart/install.sh does not install $v"; exit 1; }
# Every project file this release writes names its schema by URL ($schema), which
# editors and agents fetch: each committed schema is served at its $id, as committed,
# before a release writes a file that names it (wai/schema/README.md).
for f in wai/schema/wai-json-*.schema.json; do
python3 - "$f" <<'PY' || exit 1
import json, sys, urllib.request
f = sys.argv[1]
want = json.load(open(f))
url = want["$id"]
try:
with urllib.request.urlopen(urllib.request.Request(url, headers={"User-Agent": "wai-release"}), timeout=30) as r:
got = json.loads(r.read())
except Exception as e:
sys.exit(f"::error::{url} does not serve {f} ({e}): deploy the site with the schema before the release")
if got != want:
sys.exit(f"::error::{url} serves a schema other than {f}: deploy the site with the schema before the release")
print(f"{url} serves {f}")
PY
done
echo "version=$v" >> "$GITHUB_OUTPUT"
# The room client and WAI Studio, once: the same files on every platform.
web:
name: the room client and WAI Studio
needs: version
runs-on: macos
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
# launchd's PATH omits cargo and node on the macOS host runner.
- name: Put cargo and node on PATH
shell: bash
run: |
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
echo "/opt/homebrew/bin" >> "$GITHUB_PATH"
- name: Build and attach them
shell: bash
env:
FORGE_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
rustup target add wasm32-unknown-unknown
command -v wasm-bindgen >/dev/null && wasm-bindgen --version | grep -q ' 0\.2\.127$' || cargo install --locked wasm-bindgen-cli --version 0.2.127
v="${{ needs.version.outputs.version }}"
bash wai/quickstart/build-web.sh "$RUNNER_TEMP/web"
bash wai/quickstart/build-studio.sh "$RUNNER_TEMP/studio"
mkdir -p "$RUNNER_TEMP/dist"
tar -C "$RUNNER_TEMP" -czf "$RUNNER_TEMP/dist/wai-web-$v.tar.gz" web studio
( cd "$RUNNER_TEMP/dist" && shasum -a 256 "wai-web-$v.tar.gz" > "wai-web-$v.tar.gz.sha256" )
bash wai/quickstart/publish.sh "$GITHUB_REF_NAME" "wai $v" "$RUNNER_TEMP"/dist/*
macos:
name: macOS · ${{ matrix.triple }}
needs: [version, web]
# Each archive on a Mac of its own architecture, so its own `wai` runs before it is
# attached (the checks below run when the triple is the host's): x86_64 on the Intel Mac.
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
# `browser`: whether the host has the browser and the automation package the
# quickstart's two-page step drives (the Apple-silicon runner does, as wai-examples.yml
# uses them; the Intel Mac is not set up for it).
include:
- { triple: aarch64-apple-darwin, runner: macos, browser: true }
- { triple: x86_64-apple-darwin, runner: macos-x86_64, browser: false }
steps:
- uses: actions/checkout@v5
- name: Put cargo on PATH
shell: bash
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Build, check and package
shell: bash
run: |
set -euo pipefail
v="${{ needs.version.outputs.version }}"
rustup target add "${{ matrix.triple }}"
curl -fsS -o "$RUNNER_TEMP/web.tar.gz" "${FORGE_API%/api/v1}/$FORGE_REPO/releases/download/$GITHUB_REF_NAME/wai-web-$v.tar.gz"
tar -C "$RUNNER_TEMP" -xzf "$RUNNER_TEMP/web.tar.gz"
nice -n 10 bash wai/quickstart/build.sh "$RUNNER_TEMP/dist" --web "$RUNNER_TEMP/web" --studio "$RUNNER_TEMP/studio" --target "${{ matrix.triple }}" --version "$v"
- name: The quickstart from the archive, as a new user runs it
shell: bash
env:
BROWSER_BIN: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome # allow-name: the macOS runner's browser executable, a file path
run: |
set -euo pipefail
v="${{ needs.version.outputs.version }}"
if [ "${{ matrix.triple }}" != "$(rustc -vV | sed -n 's/^host: //p')" ]; then
echo "cross-built for ${{ matrix.triple }}: this host cannot run it"
exit 0
fi
flag=""
if [ "${{ matrix.browser }}" = true ]; then
test -x "$BROWSER_BIN" || { echo "::error::this runner has no browser at $BROWSER_BIN"; exit 1; }
pw="$RUNNER_TEMP/automation"; mkdir -p "$pw"
cp wai/quickstart/test/package.json wai/quickstart/test/package-lock.json "$pw/"
(cd "$pw" && npm ci --ignore-scripts --no-audit --no-fund > /dev/null)
export PLAYWRIGHT_HOST="$pw/node_modules"
flag=--browser
fi
bash wai/quickstart/test/clean-machine.sh "$RUNNER_TEMP/dist/wai-$v-${{ matrix.triple }}.tar.gz" $flag
- name: Attach to the release
shell: bash
env:
FORGE_TOKEN: ${{ github.token }}
run: bash wai/quickstart/publish.sh "$GITHUB_REF_NAME" "wai ${{ needs.version.outputs.version }}" "$RUNNER_TEMP"/dist/*
linux:
name: Linux · ${{ matrix.triple }}
needs: [version, web]
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- runner: linux
triple: x86_64-unknown-linux-musl
- runner: linux-arm64
triple: aarch64-unknown-linux-musl
steps:
- uses: actions/checkout@v5
- name: Install Rust 1.99.1, the musl target and musl-gcc
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
command -v rustup >/dev/null 2>&1 || \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.99.1
rustup toolchain install 1.99.1 --profile minimal
rustup default 1.99.1
rustup target add "${{ matrix.triple }}"
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo"
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq musl-tools python3 curl
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Build, check and package
shell: bash
run: |
set -euo pipefail
v="${{ needs.version.outputs.version }}"
t="${{ matrix.triple }}"
T="$(echo "$t" | tr 'a-z-' 'A-Z_')"
# Static, as the quantum command line is built (wai-quantum-cli-release.yml).
export "CC_${t//-/_}=musl-gcc" "CARGO_TARGET_${T}_LINKER=musl-gcc"
export RUSTFLAGS="-C target-feature=+crt-static -C relocation-model=static"
curl -fsS -o "$RUNNER_TEMP/web.tar.gz" "${FORGE_API%/api/v1}/$FORGE_REPO/releases/download/$GITHUB_REF_NAME/wai-web-$v.tar.gz"
tar -C "$RUNNER_TEMP" -xzf "$RUNNER_TEMP/web.tar.gz"
bash wai/quickstart/build.sh "$RUNNER_TEMP/dist" --web "$RUNNER_TEMP/web" --studio "$RUNNER_TEMP/studio" --target "$t" --version "$v"
- name: The quickstart from the archive, as a new user runs it
shell: bash
run: bash wai/quickstart/test/clean-machine.sh "$RUNNER_TEMP/dist/wai-${{ needs.version.outputs.version }}-${{ matrix.triple }}.tar.gz"
- name: Attach to the release
shell: bash
env:
FORGE_TOKEN: ${{ github.token }}
run: bash wai/quickstart/publish.sh "$GITHUB_REF_NAME" "wai ${{ needs.version.outputs.version }}" "$RUNNER_TEMP"/dist/*
windows:
name: Windows · x86_64-pc-windows-msvc
needs: [version, web]
runs-on: windows
timeout-minutes: 120
env:
CI: ""
steps:
- uses: actions/checkout@v5
- name: Build, check and package
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
Remove-Item Env:CI -ErrorAction SilentlyContinue
$v = "${{ needs.version.outputs.version }}"
$t = "x86_64-pc-windows-msvc"
$web = Join-Path $env:RUNNER_TEMP 'web.tar.gz'
curl.exe -fsS -o $web "$($env:FORGE_API -replace '/api/v1$','')/$env:FORGE_REPO/releases/download/$env:GITHUB_REF_NAME/wai-web-$v.tar.gz"
tar -xzf $web -C $env:RUNNER_TEMP
$name = "wai-$v-$t"
$stage = Join-Path $env:RUNNER_TEMP $name
$dist = Join-Path $env:RUNNER_TEMP 'dist'
Remove-Item $stage, $dist -Recurse -Force -ErrorAction Ignore
New-Item -ItemType Directory -Force -Path (Join-Path $stage 'bin'), (Join-Path $stage 'share\wai'), $dist | Out-Null
$builds = @(
@{ dir = 'wai\wai-rs'; bin = 'wai'; args = @('--no-default-features', '--features', 'quickstart', '--bin', 'wai') },
@{ dir = 'joule-code\joule-code-rs'; bin = 'wai-relay'; args = @('-p', 'joule-moq-relay', '--bin', 'wai-relay') },
@{ dir = 'joule-code\joule-code-rs\crates\joule-moq-room'; bin = 'wai-room'; args = @('--bin', 'wai-room') },
@{ dir = 'joule-code\joule-code-rs'; bin = 'wai-ingest'; args = @('-p', 'joule-moq-ingest', '--bin', 'wai-ingest') },
@{ dir = 'joule-code\joule-code-rs\crates\joule-moq-remote'; bin = 'wai-remote-host'; args = @('--bin', 'wai-remote-host') },
@{ dir = 'wai\wai-pack'; bin = 'wai-pack'; args = @('--bin', 'wai-pack') },
@{ dir = 'wai\wai-quantum-cli'; bin = 'wai-quantum'; args = @('--bin', 'wai-quantum') }
)
foreach ($b in $builds) {
Push-Location $b.dir
cargo build --locked --release --target $t @($b.args)
if ($LASTEXITCODE -ne 0) { throw "the build of $($b.bin) failed" }
$target = (cargo metadata --format-version 1 --no-deps --locked | ConvertFrom-Json).target_directory
Copy-Item (Join-Path $target "$t\release\$($b.bin).exe") (Join-Path $stage 'bin')
Pop-Location
}
Copy-Item -Recurse (Join-Path $env:RUNNER_TEMP 'web') (Join-Path $stage 'share\wai\web')
Copy-Item -Recurse (Join-Path $env:RUNNER_TEMP 'studio') (Join-Path $stage 'share\wai\studio')
Copy-Item wai\quickstart\README.md, wai\LICENSE $stage
& (Join-Path $stage 'bin\wai.exe') create --list
if ($LASTEXITCODE -ne 0) { throw "the packaged wai does not run" }
& (Join-Path $stage 'bin\wai-quantum.exe') --version
if ($LASTEXITCODE -ne 0) { throw "the packaged wai-quantum does not run" }
Compress-Archive -Path $stage -DestinationPath (Join-Path $dist "$name.zip") -Force
$h = (Get-FileHash (Join-Path $dist "$name.zip") -Algorithm SHA256).Hash.ToLower()
Set-Content -NoNewline -Path (Join-Path $dist "$name.zip.sha256") -Value "$h $name.zip`n"
# Not yet run: the Windows runner is down, so this step has never run on a Windows archive.
# Under PowerShell 7 on a macOS archive the script has run without its contents step and
# its check of WAI Studio, which have not run yet.
- name: The quickstart from the archive, as a new user runs it
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
Remove-Item Env:CI -ErrorAction SilentlyContinue
$name = "wai-${{ needs.version.outputs.version }}-x86_64-pc-windows-msvc"
pwsh -NoProfile -File wai\quickstart\test\clean-machine.ps1 (Join-Path $env:RUNNER_TEMP "dist\$name.zip")
if ($LASTEXITCODE -ne 0) { throw "the quickstart failed from $name.zip" }
- name: Attach to the release
shell: pwsh
env:
FORGE_TOKEN: ${{ github.token }}
run: |
$ErrorActionPreference = 'Stop'
$H = @{ Authorization = "token $env:FORGE_TOKEN" }
$base = "$env:FORGE_API/repos/$env:FORGE_REPO/releases"
$rel = Invoke-RestMethod -Headers $H -Uri "$base/tags/$env:GITHUB_REF_NAME"
foreach ($f in Get-ChildItem (Join-Path $env:RUNNER_TEMP 'dist')) {
foreach ($a in (Invoke-RestMethod -Headers $H -Uri "$base/$($rel.id)/assets" | Where-Object { $_.name -eq $f.Name })) {
Invoke-RestMethod -Headers $H -Method Delete -Uri "$base/$($rel.id)/assets/$($a.id)" | Out-Null
}
curl.exe -fsS -H "Authorization: token $env:FORGE_TOKEN" -X POST "$base/$($rel.id)/assets?name=$($f.Name)" -F "attachment=@$($f.FullName);type=application/octet-stream" -o NUL -w "uploaded $($f.Name): http %{http_code}`n"
if ($LASTEXITCODE -ne 0) { throw "the upload of $($f.Name) failed" }
}
formulae:
name: Homebrew formula and Scoop manifest
needs: [version, macos, linux, windows]
if: always() && needs.version.result == 'success'
runs-on: linux
steps:
- uses: actions/checkout@v5
- name: Write and attach them
shell: bash
env:
FORGE_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
v="${{ needs.version.outputs.version }}"
out="$RUNNER_TEMP/formulae"; mkdir -p "$out"
python3 wai/quickstart/formulae.py "$v" "$GITHUB_REF_NAME" "$FORGE_API" "$FORGE_REPO" "$PUBLIC" "$out"
bash wai/quickstart/publish.sh "$GITHUB_REF_NAME" "wai $v" "$out"/*