Some checks failed
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 11s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 7s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 6s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 10s
WAI operation catalogue / does this change touch it (pull_request) Successful in 8s
WAI conformance / does this change touch it (pull_request) Successful in 13s
WAI energy receipts / does this change touch it (pull_request) Successful in 6s
wai-quantum command line / does this change touch it (pull_request) Successful in 7s
wai-quantum contract / does this change touch it (pull_request) Successful in 7s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 24s
wai-quantum CUDA member / 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 9s
wai-quantum signal processor / does this change touch it (pull_request) Successful in 6s
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 20s
wai-quantum editors / does this change touch it (pull_request) Successful in 7s
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 6s
wai-quantum other formats / does this change touch it (pull_request) Successful in 7s
wai-quantum resource estimation / does this change touch it (pull_request) Successful in 18s
wai-quantum HIP member / does this change touch it (pull_request) Successful in 8s
wai-quantum OpenQASM reader / does this change touch it (pull_request) Successful in 10s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 10s
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 5s
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 8s
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 8s
wai-quantum Metal member / does this change touch it (pull_request) Successful in 15s
wai-quantum CUDA member / member · CUDA (thor) (pull_request) Successful in 2m8s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m10s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (thor) (pull_request) Successful in 49s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 2m25s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Successful in 54s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 11m44s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 3m54s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Successful in 1m12s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 2m2s
wai-quantum OpenCL member / member · OpenCL GPU (framework-128gb) (pull_request) Successful in 23s
wai-quantum pulse and dynamics / does this change touch it (pull_request) Successful in 5s
wai-quantum for Python / does this change touch it (pull_request) Successful in 5s
wai-quantum error correction and mitigation / does this change touch it (pull_request) Successful in 6s
wai-quantum-qpu / does this change touch it (pull_request) Successful in 5s
wai-quantum extension points / does this change touch it (pull_request) Successful in 5s
wai-quantum service / does this change touch it (pull_request) Successful in 9s
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 9s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 8s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 6m12s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 10s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 6m18s
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 5s
wai-quantum verdicts and repairs / does this change touch it (pull_request) Successful in 6s
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 9s
wai-quantum variational and algorithm library / does this change touch it (pull_request) Successful in 11s
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Successful in 12s
wai-quantum views in agent hosts / does this change touch it (pull_request) Successful in 6s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 7s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 10s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 6s
WAI Studio / does this change touch it (pull_request) Successful in 11s
wai-web wasm32 / does this change touch it (pull_request) Successful in 6s
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Successful in 18s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 10s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 1m33s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 34s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 4m15s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 5m3s
wai-quantum service / service energy · linux packages (pull_request) Successful in 1m50s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 9m0s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 36s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 10m12s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 7m53s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m3s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 1m44s
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m41s
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 3m27s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 1m16s
wai-quantum contract / the policy is linked, and the deprecations page reads (pull_request) Successful in 9s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 3m30s
WAI operation catalogue / the catalogue and every door · linux (pull_request) Successful in 4m37s
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Successful in 1m34s
wai-quantum contract / API compatibility · linux (pull_request) Successful in 4m29s
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Failing after 1m14s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Successful in 13s
wai-quantum command line / command line · linux (pull_request) Successful in 5m10s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Successful in 1m58s
wai-quantum contract / schemas and the committed tool lists · linux (pull_request) Successful in 6m37s
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Successful in 27s
wai-quantum editors / editors · linux (pull_request) Successful in 2m13s
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m43s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Successful in 4m33s
wai-quantum resource estimation / estimation and calibration · linux, release (pull_request) Successful in 2m2s
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 42s
wai-quantum WebGPU member / member · GPU, Vulkan (thor) (pull_request) Successful in 24m43s
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Successful in 23s
wai-quantum other formats / readers, writers and the set · linux (pull_request) Successful in 3m47s
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Successful in 29s
wai-quantum OpenQASM reader / reader and corpus · linux (pull_request) Successful in 2m1s
wai-quantum WebGPU member / member · GPU, Vulkan (jetson-hub) (pull_request) Successful in 22m12s
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Successful in 36s
wai-quantum for JavaScript / javascript · linux (pull_request) Successful in 2m42s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 14m54s
wai-quantum studio and desktop / desktop app · windows (pull_request) Successful in 9m38s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m14s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (pull_request) Successful in 1m38s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 14m45s
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Successful in 42s
wai-quantum for Python / python · linux (pull_request) Successful in 2m37s
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (pull_request) Successful in 59s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Successful in 17s
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (pull_request) Successful in 2m51s
wai-quantum extension points / the registry and the example · linux (pull_request) Successful in 3m10s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Successful in 1m7s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 3m24s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 16m50s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Successful in 21s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 27s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 9s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 9s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 15m53s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m25s
wai-quantum service / service · linux (pull_request) Successful in 5m39s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 18s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (pull_request) Successful in 1m50s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 27s
wai-quantum studio and desktop / desktop app · linux (pull_request) Successful in 5m13s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m3s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (pull_request) Successful in 1m46s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 5m45s
joule-moq-room room service / joule-moq-room, every target (pull_request) Has been cancelled
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · 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 conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (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 editors / editors · 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-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · macos (pull_request) Has been cancelled
wai-quantum for Python / python · macos (pull_request) Has been cancelled
wai-quantum-qpu / credentials in the keychain (macos) (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux-arm64 (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-quantum studio and desktop / desktop app · macos (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 variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Has been cancelled
WAI examples / WAI examples · portable · linux (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-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Has been cancelled
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness (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 Studio / Studio in Chromium and Firefox · macos (pull_request) Has been cancelled
wai-quantum views in agent hosts / views · a scripted host (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Has been cancelled
wai-quantum views in agent hosts / views · the page and its engine (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Has been cancelled
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
WAI Studio / Studio in WebKit · linux (pull_request) Has been cancelled
A service started with a model (WAI_QSVC_MODEL) writes an OpenQASM program for
a task, an exercise in the course's form, with wai-quantum-writer's loop: the
model writes, the engine checks each attempt as it checks a lesson's answer,
and what went wrong goes back for another attempt.
- A write is a job (Work::Write), admitted, kept, reloaded and run again as
one, and sealed with the service's receipt. Its result is the transcript
(wai.quantum.write/1) with the writer's energy inside it, so POST /v1/verify
checks it; its timing is the job's `timing`, outside the signed body. The
request is kept in canonical form, so a rerun hands the model the same text.
- The writer process (`wai-quantum-service writer`) starts with the service
and serves every write over JSON lines on stdin and stdout, so the model
loads once. One that ends is started again for the next write, and the
write it was running fails, saying so. On macOS it runs in the worker's
sandbox, its model read. Its resident memory is held to WAI_QSVC_WRITER_GB
(96), a write to WAI_QSVC_WRITE_SECS (3600), and the engine's checks inside
it plan within one job's memory.
- Writes have a scheduler of their own: one at a time, in the queue's order,
beside the circuit jobs, neither holding the other up. The circuit
scheduler passes over writes and takes a job out of the queue by its id
(it used to pop the front, which also dropped a job queued but not yet
listed). A client holds one queued or running write (J030), and a write
holds none of the jobs' memory budget.
- Each attempt is an `attempt` event on GET /v1/jobs/{id}/events as it lands,
and a running write's job gives its `progress`.
- Refusals: J070 (no model, 503), J071 (a task that does not read), J072
(options out of range). Idempotency-Key works as for a job.
- GET /v1 and quantum_service_info give `write`: the model's name, licence
and digest once it is loaded, or that there is none. The OpenAPI document
has the route and its request. The MCP server has write_circuit, which runs
as a task, and get_quantum_job reads a write with the verdict of the last
program it wrote (its outputSchema, job_or_write; the run tools keep job).
- WAI_QSVC_WRITER_SCRIPT runs a script in the model's place. tests/write.rs
writes a Bell pair's program with one, through a FIFO that holds the writer
at its start: a pass after one repair, the transcript's fields, the receipt
verifying, the two attempt events, one write a client, the order, an
idempotent resend and the refusals; and a service with no model answering
503. jobs.rs holds a write run again after a restart to the same transcript,
and a write's job in each status to its schema.
- smoke.sh writes a Bell pair's program with SMOKE_WRITE=1, and otherwise
checks that a service with no model refuses a write.
- The image builds from the repository's root, since the service now links
the writer and its model runtime; the workflow runs on their paths. The
command line's agent docs and tool snapshot list write_circuit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
244 lines
12 KiB
YAML
244 lines
12 KiB
YAML
name: wai-quantum service
|
|
|
|
# The WAI quantum stack as a public job service (wai/wai-quantum-service): its
|
|
# tests, clippy with warnings as errors, and its smoke checks over HTTP against
|
|
# an instance started here, on Linux and on the macOS runner (the host the
|
|
# service is deployed to). Its tests also hold the command line's snapshot of
|
|
# its MCP tools (wai/wai-quantum-cli/docs/service-mcp.json) to the live list,
|
|
# one (tests/restart.rs) kills the service mid-job and starts it again on its
|
|
# store, and one (tests/write.rs) writes a program for a task with a scripted
|
|
# writer process, sandboxed on the macOS runner as it is in production. Each instance here keeps its job store in the runner's own
|
|
# scratch directory.
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/wai-quantum-service/**'
|
|
# The service writes programs with the writer's loop, its model on the
|
|
# loader below, both path dependencies (src/writer.rs).
|
|
- 'wai/wai-quantum-writer/**'
|
|
- 'jouleclaw/jouleclaw-rs/crates/jouleclaw-loader-gguf/**'
|
|
- 'jouleclaw/jouleclaw-rs/crates/jouleclaw-core/**'
|
|
# The command line's agent docs list this service's tools from a snapshot
|
|
# there, which this service's tests hold to its live list.
|
|
- 'wai/wai-quantum-cli/docs/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-quantum-service.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/wai-quantum-service/**'
|
|
# The service writes programs with the writer's loop, its model on the
|
|
# loader below, both path dependencies (src/writer.rs).
|
|
- 'wai/wai-quantum-writer/**'
|
|
- 'jouleclaw/jouleclaw-rs/crates/jouleclaw-loader-gguf/**'
|
|
- 'jouleclaw/jouleclaw-rs/crates/jouleclaw-core/**'
|
|
# The command line's agent docs list this service's tools from a snapshot
|
|
# there, which this service's tests hold to its live list.
|
|
- 'wai/wai-quantum-cli/docs/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-quantum-service.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-quantum-service.yml \
|
|
"${{ github.event.pull_request.base.sha }}" \
|
|
"${{ github.event.pull_request.head.sha }}")
|
|
echo "this change touches wai-quantum-service: $r"
|
|
echo "run=$r" >> "$GITHUB_OUTPUT"
|
|
|
|
service-linux:
|
|
name: service · linux
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: linux
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install Rust 1.99.1
|
|
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 --component clippy
|
|
rustup default 1.99.1
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- name: Tests and clippy
|
|
shell: bash
|
|
working-directory: wai/wai-quantum-service
|
|
run: |
|
|
set -euo pipefail
|
|
cargo test --locked --release 2>&1 | tee "$RUNNER_TEMP/test.log"
|
|
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/test.log" || { echo "::error::no test ran"; exit 1; }
|
|
cargo clippy --locked --release --all-targets -- -D warnings
|
|
# The engine's parts of the service, each required by name: sets and
|
|
# sweeps and their Merkle paths, a result's provenance, the package
|
|
# counter's reader and probe (on fake trees; a container hides the real
|
|
# one), and a real-valued input bound by the reader.
|
|
- name: The engine's sets, provenance and package energy
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
cargo test --locked --release --features full --lib -- engine::sets:: engine::energy:: merkle:: engine::run::tests::a_result_s_provenance qasm::tests::a_bound_parameter 2>&1 | tee "$RUNNER_TEMP/engine.log"
|
|
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/engine.log" || { echo "::error::the engine's tests did not pass"; exit 1; }
|
|
for t in engine::sets::tests::one_receipt_binds_every_item_and_any_change_breaks_it \
|
|
engine::sets::tests::a_sweep_is_its_grid_each_point_the_program_written_out \
|
|
engine::sets::tests::a_failed_item_is_bound_by_its_error \
|
|
merkle::tests::every_leaf_s_path_leads_to_the_root_and_nothing_else_does \
|
|
engine::run::tests::a_result_s_provenance_names_the_passes_its_certificate_ran \
|
|
engine::energy::tests::the_probe_finds_a_live_counter_s_cadence_and_refuses_a_stalled_one \
|
|
engine::energy::tests::only_top_level_package_zones_are_read_and_a_frozen_one_is_not_live \
|
|
engine::energy::tests::a_package_figure_names_its_scope_and_declares_its_edges \
|
|
qasm::tests::a_bound_parameter_reads_as_the_program_written_with_its_value; do
|
|
grep -q "^test $t \.\.\. ok$" "$RUNNER_TEMP/engine.log" || { echo "::error::$t did not run"; exit 1; }
|
|
done
|
|
- name: The smoke checks over HTTP
|
|
shell: bash
|
|
working-directory: wai/wai-quantum-service
|
|
run: |
|
|
set -euo pipefail
|
|
key="$RUNNER_TEMP/service.key"; rm -f "$key" "$RUNNER_TEMP/service.keys.json"
|
|
store="$RUNNER_TEMP/store"; rm -rf "$store"
|
|
cargo build --locked --release
|
|
WAI_QSVC_KEY="$key" WAI_QSVC_STORE="$store" WAI_QSVC_ADDR=127.0.0.1:18241 WAI_QSVC_BUDGET_GB=8 WAI_QSVC_JOB_GB=4 WAI_QSVC_WORKERS=2 WAI_QSVC_CLIENT_BURST=60 \
|
|
./target/release/wai-quantum-service serve 2> "$RUNNER_TEMP/service.log" &
|
|
pid=$!
|
|
trap 'kill $pid 2>/dev/null || true; cat "$RUNNER_TEMP/service.log"' EXIT
|
|
for _ in $(seq 1 50); do curl -s -o /dev/null http://127.0.0.1:18241/v1/health && break; sleep 0.2; done
|
|
bash smoke.sh http://127.0.0.1:18241
|
|
|
|
service-macos:
|
|
name: service · macos
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: macos
|
|
timeout-minutes: 60
|
|
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: Tests
|
|
shell: bash
|
|
working-directory: wai/wai-quantum-service
|
|
run: |
|
|
set -euo pipefail
|
|
nice -n 10 cargo test --locked --release 2>&1 | tee "$RUNNER_TEMP/test.log"
|
|
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/test.log" || { echo "::error::no test ran"; exit 1; }
|
|
# The single-precision state vector on this host's GPU, against the
|
|
# double-precision one; the GPU is declared, so its absence fails.
|
|
- name: The GPU state vector
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
env:
|
|
WAI_QUANTUM_SV_METAL_EXPECT: "1"
|
|
run: |
|
|
set -euo pipefail
|
|
nice -n 10 cargo test --locked --release --features quantum_sv_metal --lib quantum_sv_metal 2>&1 | tee "$RUNNER_TEMP/gpu.log"
|
|
grep -qE '^test result: ok\. 4 passed; 0 failed' "$RUNNER_TEMP/gpu.log" || { echo "::error::not every GPU test ran and passed"; exit 1; }
|
|
# The cut-rank table on this host's GPU, against the double-precision
|
|
# walk; the GPU is declared, so its absence fails, and each GPU test is
|
|
# checked by name.
|
|
- name: The GPU cut-rank table
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
env:
|
|
WAI_QUANTUM_CUTRANK_METAL_EXPECT: "1"
|
|
run: |
|
|
set -euo pipefail
|
|
nice -n 10 cargo test --locked --release --features quantum_cutrank_metal --lib quantum_cutrank 2>&1 | tee "$RUNNER_TEMP/cutrank-gpu.log"
|
|
for t in the_gpu_table_agrees gpu_samples_follow_the_probabilities; do
|
|
grep -q "^test quantum_cutrank::tests::$t ... ok$" "$RUNNER_TEMP/cutrank-gpu.log" \
|
|
|| { echo "::error::quantum_cutrank::tests::$t did not run and pass"; exit 1; }
|
|
done
|
|
- name: The smoke checks over HTTP
|
|
shell: bash
|
|
working-directory: wai/wai-quantum-service
|
|
run: |
|
|
set -euo pipefail
|
|
key="$RUNNER_TEMP/service.key"; rm -f "$key" "$RUNNER_TEMP/service.keys.json"
|
|
store="$RUNNER_TEMP/store"; rm -rf "$store"
|
|
cargo build --locked --release
|
|
WAI_QSVC_KEY="$key" WAI_QSVC_STORE="$store" WAI_QSVC_ADDR=127.0.0.1:18241 WAI_QSVC_BUDGET_GB=8 WAI_QSVC_JOB_GB=4 WAI_QSVC_WORKERS=2 WAI_QSVC_CLIENT_BURST=60 \
|
|
./target/release/wai-quantum-service serve 2> "$RUNNER_TEMP/service.log" &
|
|
pid=$!
|
|
trap 'kill $pid 2>/dev/null || true; cat "$RUNNER_TEMP/service.log"' EXIT
|
|
for _ in $(seq 1 50); do curl -s -o /dev/null http://127.0.0.1:18241/v1/health && break; sleep 0.2; done
|
|
bash smoke.sh http://127.0.0.1:18241
|
|
|
|
# The processor packages' counters on a Linux host that has them readable
|
|
# (the hardware runner, outside any container): the engine's live test
|
|
# required to take its live branch, and the service's smoke checks with a
|
|
# metered figure required on every job.
|
|
energy-linux:
|
|
name: service energy · linux packages
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: linux-hw
|
|
timeout-minutes: 90
|
|
env:
|
|
CARGO_PROFILE_RELEASE_DEBUG: '0'
|
|
CARGO_BUILD_JOBS: '8'
|
|
steps:
|
|
- name: Fetch the source
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
ref="${{ github.event_name == 'pull_request' && format('refs/pull/{0}/head', github.event.pull_request.number) || github.ref }}"
|
|
want="${{ github.event.pull_request.head.sha || github.sha }}"
|
|
rm -rf src && mkdir src && cd src
|
|
git init -q
|
|
git fetch -q --depth 1 http://100.64.224.0:3400/Transaction-Science/open-standards.git "$ref"
|
|
git checkout -q FETCH_HEAD
|
|
got="$(git rev-parse HEAD)"
|
|
echo "fetched $ref at $got"
|
|
if [ "$got" != "$want" ]; then
|
|
echo "::error::$ref is at $got, not $want: it moved after this run started, and a newer run tests it"
|
|
exit 1
|
|
fi
|
|
- name: The package counter, live
|
|
shell: bash
|
|
working-directory: src/wai/wai-quantum
|
|
env:
|
|
WAI_QUANTUM_PACKAGE_ENERGY_EXPECT: "1"
|
|
run: |
|
|
set -euo pipefail
|
|
log=$(mktemp)
|
|
CARGO_TARGET_DIR="$HOME/hw-target/wai-quantum" nice -n 10 cargo test --locked --release --features quantum_engine,quantum_receipt --lib engine::energy:: -- --nocapture --test-threads=1 2>&1 | tee "$log"
|
|
# With --nocapture the test's line follows its name on the same line.
|
|
grep -q 'package counter: {"joules_micro":' "$log" || { echo "::error::the package counter's live path never ran"; exit 1; }
|
|
- name: The service's smoke checks, every job metered
|
|
shell: bash
|
|
working-directory: src/wai/wai-quantum-service
|
|
run: |
|
|
set -euo pipefail
|
|
export CARGO_TARGET_DIR="$HOME/hw-target/wai-quantum-service"
|
|
nice -n 10 cargo build --locked --release
|
|
t=$(mktemp -d)
|
|
WAI_QSVC_KEY="$t/service.key" WAI_QSVC_STORE="$t/store" WAI_QSVC_ADDR=127.0.0.1:18244 WAI_QSVC_BUDGET_GB=4 WAI_QSVC_JOB_GB=2 WAI_QSVC_WORKERS=1 WAI_QSVC_CLIENT_BURST=60 \
|
|
"$CARGO_TARGET_DIR/release/wai-quantum-service" serve 2> "$t/service.log" &
|
|
pid=$!
|
|
trap 'kill $pid 2>/dev/null || true; cat "$t/service.log"; rm -rf "$t"' EXIT
|
|
for _ in $(seq 1 100); do curl -s -o /dev/null http://127.0.0.1:18244/v1/health && break; sleep 0.2; done
|
|
curl -sS http://127.0.0.1:18244/v1 | python3 -I -c 'import json,sys; e=json.load(sys.stdin)["energy"]; assert e["meter"]=="packages", e; print("meter:", e)'
|
|
SMOKE_EXPECT_ENERGY=1 bash smoke.sh http://127.0.0.1:18244
|