probe: wasm32 byte-reproducibility across machines (#218) #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # THROWAWAY. Issue #218 only. This file must never reach `main`. | |
| # | |
| # The question: does the pinned toolchain produce a byte-identical | |
| # wasm32-unknown-unknown module on an ubuntu runner and on a macOS dev machine? | |
| # The answer decides whether the `rust` job can assert byte identity for the | |
| # committed engine.wasm, or has to fall back to rebuild-and-run-the-tests. | |
| # | |
| # `on: push` restricted to this branch, NOT `workflow_dispatch`: GitHub only | |
| # makes a workflow_dispatch workflow triggerable once the file exists on the | |
| # DEFAULT branch, so dispatching one that lives only here fails with "workflow | |
| # does not have 'workflow_dispatch' trigger". Pushing the branch has no such | |
| # requirement. | |
| name: wasm-repro | |
| on: | |
| push: | |
| branches: [probe/wasm-reproducibility] | |
| permissions: | |
| contents: read | |
| jobs: | |
| hash: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Toolchain | |
| run: | | |
| rustup toolchain install 1.97.1 --profile minimal | |
| rustup target add wasm32-unknown-unknown --toolchain 1.97.1 | |
| rustup run 1.97.1 rustc --version --verbose | |
| - name: Build and hash | |
| working-directory: crates-probe | |
| run: | | |
| rustup run 1.97.1 cargo build --locked --release \ | |
| --target wasm32-unknown-unknown -p fmw-wasm | |
| F=target/wasm32-unknown-unknown/release/fmw_wasm.wasm | |
| echo "PROBE_BYTES=$(wc -c < "$F")" | |
| echo "PROBE_SHA=$(sha256sum "$F" | cut -d' ' -f1)" |