name: wai-quantum signal processor # The signal processor (DSP) as a processor and as a fabric member, under its # user-mode emulator: # # - the processor: the byte-pinned bit-identity digests, the frame fixtures and # the byte-pinning library tests, built for the processor's Linux target (a # tier-3 target: the standard library is built from source); # - the member: the vector unit (128-byte vectors) runs the gate's # arithmetic, and its device tests must find it, agree with the CPU, reproduce # all four pinned certificates (each naming the emulator) and catch three # kernel mutants; # - the same build on x86_64, where the member is absent and says so. # # The emulator is QEMU 11.1.1, built here from its release tarball (SHA-256 # pinned; its signature was checked against the release key when it was pinned). # Releases before 11.0 test a whole predicate register, not its low bit, when a # branch reads a predicate written in the same packet, and the processor # branches on the low bit. Compiled code relies on that (a predicate built from # a general register's 1 and xored with a comparison's 0xff, so 0xfe means # "equal"), and a library test fails under such an emulator though the code is # right. A probe shows which emulator does what before any suite runs on it. # # The cross toolchain (clang, lld and the musl sysroot for the target) is the # open-source release for this processor, SHA-256 pinned. # # RUSTC_BOOTSTRAP: building the standard library for a tier-3 target, and the # vector unit's intrinsics, are unstable; this workflow's builds for this # processor are the only ones that use it. concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: pull_request: paths: - 'wai/wai-quantum/**' - 'rust-toolchain.toml' - '.github/workflows/wai-quantum-dsp.yml' schedule: - cron: '17 4 * * *' jobs: # Does this pull request's own diff touch the paths below? This forge matches a # workflow's `paths:` against the push, so a merge of main into a branch fires the # workflow whatever the pull request changes; every job here waits on this answer. # A push to main, a schedule, or anything the script cannot determine answers # `true` (scripts/pr-touches-paths.py). 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-dsp.yml \ "${{ github.event.pull_request.base.sha }}" \ "${{ github.event.pull_request.head.sha }}") echo "this change touches wai-quantum-dsp: $r" echo "run=$r" >> "$GITHUB_OUTPUT" dsp-emulated: name: processor and member ยท signal processor, emulated needs: relevant if: needs.relevant.outputs.run == 'true' runs-on: linux timeout-minutes: 180 container: image: debian@sha256:913f6706df59a68922d1dd08f78c2476560a8d367897200a6005b00e5f67c2d5 options: --memory=6g --memory-swap=6g env: TOOLCHAIN_VERSION: 22.1.8 TOOLCHAIN_SHA256: bc122fe6473ead9693613a6ab3a177c5583653ff76b937e7578cf7de0273315b # Not QEMU_*: qemu-user reads every QEMU_