clean up js packaging / smoke test (#550) #2034
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
| name: CodSpeed | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| benchmarks: | |
| name: Run benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| # no release versioning, see https://github.com/dtolnay/rust-toolchain/issues/180 | |
| - uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| lookup-only: false # zizmor: ignore[cache-poisoning] -- Job does not produce release artifacts and does not have sensitive permissions | |
| cache-on-failure: true | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: '3.14' | |
| - name: Install cargo-codspeed | |
| run: cargo install cargo-codspeed | |
| # The `pool` bench's workers run the `monty` CLI. Build it in RELEASE so | |
| # the workers are optimized (a debug interpreter would make the pool | |
| # numbers meaningless), and point the bench at it via MONTY_TEST_BIN so it | |
| # resolves the binary instead of shelling out to `cargo build` mid-run. | |
| # (CodSpeed instruments only the bench process, so the pool benches | |
| # measure parent-side spawn/checkout/wire cost; the uninstrumented worker | |
| # children are not counted.) | |
| - name: Build the monty worker binary | |
| run: cargo build -p monty-runtime --release | |
| # No `--bench` filter: build and run every monty-bench target (`main` + | |
| # `pool`). CodSpeed runs all benches built into the package. | |
| - name: Build benchmarks | |
| run: cargo codspeed build -p monty-bench | |
| - name: Run benchmarks | |
| uses: CodSpeedHQ/action@d872884a306dd4853acf0f584f4b706cf0cc72a2 # v4.13.0 | |
| with: | |
| mode: simulation | |
| run: cargo codspeed run -p monty-bench | |
| env: | |
| MONTY_TEST_BIN: ${{ github.workspace }}/target/release/monty |