All checks were successful
wai-quantum docs, course and locales / does this change touch it (pull_request) Successful in 6s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 9s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 8s
WAI energy receipts / does this change touch it (pull_request) Successful in 10s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 7s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Successful in 37s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 1m13s
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 2m49s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 3m6s
wai-quantum for JavaScript / javascript · linux (pull_request) Successful in 3m7s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 5m7s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 6m33s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 8m31s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 9m6s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 10m53s
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Successful in 12m23s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 1h4m5s
wai/wai-quantum-js/ packs the job service's engine for WebAssembly (wai-web with its quantum_engine feature, the engine of wai-quantum 0.7.0) and its bindings as an ES module with its TypeScript declarations and no dependencies, for a page (init() fetches the .wasm beside the module) or for Node (init is given its bytes). The package keeps its own version line, as the Python package does. - build.sh: wai-web built for wasm32 with paths remapped (as the views build does), wasm-bindgen 0.2.127 (refused if it is not the version wai-web's lock file pins), package.json, README and the licence copied, the build refused if a local path is left in the bindings or the binary, then packed. - test/smoke.mjs, on the package unpacked: a job run with a fresh 32-byte key and its receipt verified with this engine's did:key; a forged result that does not verify; a program linted and drawn; a refused program with its diagnostic code (Q310). - test/install.mjs: the README's Node example, run in an empty app that installed the tarball with npm, the package found by name and its .wasm by the subpath it exports. - ci/check.sh runs them all and holds the tarball to the package's allow-list (the seven files and nothing else). - wai-quantum-js.yml runs ci/check.sh on Linux. wai-quantum-js-release.yml runs it on a wai-quantum-cli-v* tag and attaches the tarball and its SHA-256 to the release. Nothing is published to a registry from CI. On the M3 Ultra: the .wasm is 5,928,153 bytes, the tarball 2.26 MB, and every check passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
81 lines
2.8 KiB
YAML
81 lines
2.8 KiB
YAML
name: wai-quantum for JavaScript
|
|
|
|
# The npm package @transaction-science/wai-quantum (wai/wai-quantum-js): the job
|
|
# service's engine for WebAssembly (wai-web, feature quantum_engine) with its
|
|
# bindings. ci/check.sh builds and packs it; the tarball, unpacked, holds the
|
|
# package's allow-list and nothing else; the smoke test runs against what was
|
|
# unpacked (a job run with a fresh key and its receipt verified, a forged result
|
|
# refused, a program linted and drawn, a refusal with its diagnostic code); and the
|
|
# tarball installed into an empty app runs the README's Node example by name.
|
|
# Nothing is published.
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'wai/wai-quantum-js/**'
|
|
- 'wai/wai-web/**'
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/wai-rs/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-quantum-js.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'wai/wai-quantum-js/**'
|
|
- 'wai/wai-web/**'
|
|
- 'wai/wai-quantum/**'
|
|
- 'wai/wai-rs/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-quantum-js.yml'
|
|
|
|
jobs:
|
|
relevant:
|
|
name: does this change touch it
|
|
runs-on: linux-arm64
|
|
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-js.yml \
|
|
"${{ github.event.pull_request.base.sha }}" \
|
|
"${{ github.event.pull_request.head.sha }}")
|
|
echo "this change touches the npm package: $r"
|
|
echo "run=$r" >> "$GITHUB_OUTPUT"
|
|
|
|
js-linux:
|
|
name: javascript · linux
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: linux
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install Rust 1.98.0 with the wasm32 target
|
|
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.98.0
|
|
rustup toolchain install 1.98.0 --profile minimal
|
|
rustup default 1.98.0
|
|
rustup target add wasm32-unknown-unknown
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
# Pinned to the wasm-bindgen version in wai-web/Cargo.lock; build.sh refuses another.
|
|
- name: wasm-bindgen CLI 0.2.127
|
|
shell: bash
|
|
run: cargo install --locked wasm-bindgen-cli --version 0.2.127
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
- name: Build, pack, unpack, smoke-test and install the package
|
|
shell: bash
|
|
run: bash wai/wai-quantum-js/ci/check.sh "$RUNNER_TEMP/npm"
|