open-standards/.github/workflows/wai-quantum-py-release.yml
Transaction Science 2f081db716
Some checks failed
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 1m4s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 2m52s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 2m25s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 2m11s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 7s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 6s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 4m52s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 6m34s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 9m0s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 12s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 9s
WAI conformance / does this change touch it (pull_request) Successful in 9s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Failing after 3m7s
WAI energy receipts / does this change touch it (pull_request) Successful in 10s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 11s
wai-quantum command line / does this change touch it (pull_request) Successful in 10s
wai-quantum CUDA member / does this change touch it (pull_request) Successful in 8s
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 7s
wai-quantum signal processor / does this change touch it (pull_request) Successful in 7s
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 20s
wai-quantum HIP member / does this change touch it (pull_request) Successful in 25s
wai-quantum Metal member / does this change touch it (pull_request) Successful in 27s
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 18s
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 13s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m34s
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 12s
wai-quantum for Python / does this change touch it (pull_request) Successful in 14s
wai-quantum-qpu / does this change touch it (pull_request) Successful in 16s
wai-quantum service / does this change touch it (pull_request) Successful in 16s
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 18s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 19s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 18s
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 14s
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 10s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 8s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 7s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 12m0s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 7s
wai-web wasm32 / does this change touch it (pull_request) Successful in 9s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m8s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Successful in 27s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Successful in 1m34s
wai-quantum OpenCL member / member · OpenCL GPU (framework-128gb) (pull_request) Successful in 24s
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Successful in 10s
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Successful in 16s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 28s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 29s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 22s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 8m19s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m33s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m7s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 31s
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m46s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 5m0s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m22s
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Successful in 24s
wai-quantum command line / command line · linux (pull_request) Failing after 1m5s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Successful in 3m22s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Successful in 3m42s
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Successful in 30s
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Successful in 36s
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Successful in 22s
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Successful in 42s
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Successful in 38s
wai-quantum for Python / python · linux (pull_request) Successful in 1m48s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Successful in 17s
wai-quantum service / service · linux (pull_request) Successful in 1m21s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 9m9s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Successful in 24s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 10m17s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Successful in 20s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 20s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 15s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 30s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 11s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 5s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 11s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 3m35s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m14s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 12m21s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m24s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 25m15s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 18m45s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 9m9s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 5m55s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 8m32s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 12s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 34s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 1m56s
standards workspaces build + test / macOS energy backends (pull_request) Failing after 1m19s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 1m43s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 36s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Has been cancelled
wai-quantum command line / command line · macos (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Has been cancelled
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Has been cancelled
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum Metal member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
wai-quantum for Python / python · macos (pull_request) Has been cancelled
wai-quantum service / service · macos (pull_request) Has been cancelled
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Has been cancelled
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Has been cancelled
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Has been cancelled
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
wai-quantum-py: release wheels on the command line tag; changelog and README
wai-quantum-py-release.yml builds the abi3 wheels on a wai-quantum-cli-v*
tag and attaches each with its SHA-256 to that forge release, as the
command line archives are (release/publish.sh, over the private network):
macOS arm64 and x86_64 (cross-built on the Apple-silicon runner), Linux
x86_64 and arm64 as manylinux2014 (maturin with zig 0.16.0, so the
runner glibc does not leak into the wheel; checked: the module needs
GLIBC_2.17 at most), and Windows x86_64. Each wheel that runs on its runner
is installed alone on Python 3.9 and runs tests/smoke.py first. Nothing is
published to a package index.

The changelog entry (wai/CHANGELOG.md), the crate README naming
engine::svg and the package, and ci/check.sh waiting on the service it
stops so the shell prints no job notice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:53:48 -04:00

213 lines
9.7 KiB
YAML

name: wai-quantum for Python, release wheels
# On a tag wai-quantum-cli-v<version> (the command line's release), builds the Python
# package's wheels (wai/wai-quantum-py) and attaches them to the same forge release,
# each with its SHA-256. One abi3 wheel per platform serves every Python from 3.9 on:
# macOS arm64 and x86_64 (the x86_64 one cross-built on the Apple-silicon runner);
# Linux x86_64 and arm64, manylinux2014 (glibc 2.17), linked with zig so the
# runner's newer glibc does not leak into the wheel;
# Windows x86_64.
# Each wheel that runs on its runner is installed alone on Python 3.9 in a fresh venv
# and runs tests/smoke.py before it is attached. Nothing is published to a package
# index.
#
# 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 wheel missing: the
# release lists what each build attached.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
tags: ['wai-quantum-cli-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
MATURIN_VERSION: 1.15.0
ZIG_VERSION: 0.16.0
jobs:
version:
name: the tag is the command line'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-quantum-cli-v}"
crate="$(sed -n 's/^version = "\(.*\)"$/\1/p' wai/wai-quantum-cli/Cargo.toml | head -1)"
[ "$v" = "$crate" ] || { echo "::error::the tag says $v, wai-quantum-cli/Cargo.toml says $crate"; exit 1; }
echo "the Python package: $(sed -n 's/^version = "\(.*\)"$/\1/p' wai/wai-quantum-py/Cargo.toml | head -1)"
echo "version=$v" >> "$GITHUB_OUTPUT"
macos:
name: macOS · ${{ matrix.triple }}
needs: version
runs-on: macos
timeout-minutes: 60
strategy:
fail-fast: false
max-parallel: 1
matrix:
triple: [aarch64-apple-darwin, x86_64-apple-darwin]
steps:
- uses: actions/checkout@v5
# launchd's PATH omits cargo and uv on the macOS host runner.
- name: Put cargo and uv on PATH
shell: bash
run: |
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Build, check and hash
shell: bash
run: |
set -euo pipefail
command -v uv >/dev/null 2>&1 || curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
t="${{ matrix.triple }}"
rustup target add "$t"
tools="$RUNNER_TEMP/tools"; dist="$RUNNER_TEMP/dist"; rm -rf "$tools" "$dist"
uv venv -q --python 3.12 "$tools"
uv pip install -q --python "$tools/bin/python" "maturin==$MATURIN_VERSION"
(cd wai/wai-quantum-py && nice -n 10 "$tools/bin/maturin" build --release --locked --target "$t" -o "$dist")
whl="$(ls "$dist"/wai_quantum-*.whl)"
if [ "$t" = "$(rustc -vV | sed -n 's/^host: //p')" ]; then
py="$RUNNER_TEMP/py39"; rm -rf "$py"
uv venv -q --python 3.9 "$py"
uv pip install -q --python "$py/bin/python" --no-deps "$whl"
(cd "$RUNNER_TEMP" && "$py/bin/python" -I "$GITHUB_WORKSPACE/wai/wai-quantum-py/tests/smoke.py")
fi
(cd "$dist" && for f in *.whl; do shasum -a 256 "$f" > "$f.sha256"; done; ls -l)
- name: Attach to the release
shell: bash
env:
FORGE_TOKEN: ${{ github.token }}
run: bash wai/wai-quantum-cli/release/publish.sh "$GITHUB_REF_NAME" "wai-quantum ${{ needs.version.outputs.version }}" "$RUNNER_TEMP"/dist/*
linux:
name: Linux · ${{ matrix.triple }}
needs: version
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- runner: linux
triple: x86_64-unknown-linux-gnu
- runner: linux-arm64
triple: aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v5
- name: Install Rust 1.98.0 and uv
shell: bash
run: |
export PATH="$HOME/.local/bin:$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.98.0
rustup toolchain install 1.98.0 --profile minimal
rustup default 1.98.0
rustup target add "${{ matrix.triple }}"
command -v uv >/dev/null 2>&1 || curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Build (manylinux2014, with zig), check and hash
shell: bash
run: |
set -euo pipefail
t="${{ matrix.triple }}"
tools="$RUNNER_TEMP/tools"; dist="$RUNNER_TEMP/dist"; rm -rf "$tools" "$dist"
uv venv -q --python 3.12 "$tools"
uv pip install -q --python "$tools/bin/python" "maturin==$MATURIN_VERSION" "ziglang==$ZIG_VERSION"
export PATH="$tools/bin:$PATH"
(cd wai/wai-quantum-py && maturin build --release --locked --zig --compatibility manylinux2014 --target "$t" -o "$dist")
whl="$(ls "$dist"/wai_quantum-*.whl)"
case "$whl" in *manylinux2014*) ;; *) echo "::error::not a manylinux2014 wheel: $whl"; exit 1 ;; esac
py="$RUNNER_TEMP/py39"; rm -rf "$py"
uv venv -q --python 3.9 "$py"
uv pip install -q --python "$py/bin/python" --no-deps "$whl"
(cd "$RUNNER_TEMP" && "$py/bin/python" -I "$GITHUB_WORKSPACE/wai/wai-quantum-py/tests/smoke.py")
(cd "$dist" && for f in *.whl; do sha256sum "$f" > "$f.sha256"; done; ls -l)
- name: Attach to the release
shell: bash
env:
FORGE_TOKEN: ${{ github.token }}
run: bash wai/wai-quantum-cli/release/publish.sh "$GITHUB_REF_NAME" "wai-quantum ${{ needs.version.outputs.version }}" "$RUNNER_TEMP"/dist/*
windows:
name: Windows · x86_64-pc-windows-msvc
needs: version
runs-on: windows
timeout-minutes: 60
env:
CI: ""
steps:
- uses: actions/checkout@v5
- name: Build, check and hash
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
Remove-Item Env:CI -ErrorAction SilentlyContinue
if (-not (Get-Command uv -ErrorAction SilentlyContinue)) {
powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/install.ps1 | iex"
$env:Path = "$env:USERPROFILE\.local\bin;$env:Path"
}
$tools = Join-Path $env:RUNNER_TEMP 'tools'
$dist = Join-Path $env:RUNNER_TEMP 'dist'
$py39 = Join-Path $env:RUNNER_TEMP 'py39'
Remove-Item $tools, $dist, $py39 -Recurse -Force -ErrorAction Ignore
uv venv -q --python 3.12 $tools
if ($LASTEXITCODE -ne 0) { throw "no venv for the build tools" }
uv pip install -q --python "$tools\Scripts\python.exe" "maturin==$env:MATURIN_VERSION"
if ($LASTEXITCODE -ne 0) { throw "maturin did not install" }
Push-Location wai\wai-quantum-py
& "$tools\Scripts\maturin.exe" build --release --locked --target x86_64-pc-windows-msvc -o $dist
if ($LASTEXITCODE -ne 0) { throw "the wheel did not build" }
Pop-Location
$whl = (Get-ChildItem $dist -Filter 'wai_quantum-*.whl').FullName
uv venv -q --python 3.9 $py39
uv pip install -q --python "$py39\Scripts\python.exe" --no-deps $whl
if ($LASTEXITCODE -ne 0) { throw "the wheel did not install" }
Push-Location $env:RUNNER_TEMP
& "$py39\Scripts\python.exe" -I (Join-Path $env:GITHUB_WORKSPACE 'wai\wai-quantum-py\tests\smoke.py')
if ($LASTEXITCODE -ne 0) { throw "the smoke checks failed" }
Pop-Location
foreach ($f in Get-ChildItem $dist -Filter '*.whl') {
$h = (Get-FileHash $f.FullName -Algorithm SHA256).Hash.ToLower()
Set-Content -NoNewline -Path "$($f.FullName).sha256" -Value "$h $($f.Name)`n"
}
- 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"
$tag = $env:GITHUB_REF_NAME
$rel = $null
for ($i = 0; $i -lt 6 -and -not $rel; $i++) {
try { $rel = Invoke-RestMethod -Headers $H -Uri "$base/tags/$tag" } catch {
try { Invoke-RestMethod -Headers $H -Method Post -Uri $base -ContentType 'application/json' -Body (@{ tag_name = $tag; name = "wai-quantum ${{ needs.version.outputs.version }}" } | ConvertTo-Json) | Out-Null } catch {}
Start-Sleep -Seconds 3
}
}
if (-not $rel) { throw "no release for $tag" }
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" }
}