Lookups in WASM #553
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
| name: Test Runner | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check code formatting | |
| run: cargo fmt --all --check | |
| unused_deps: | |
| name: check for unused dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: machete | |
| uses: bnjbvr/cargo-machete@main | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-24.05 | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Build test-runner | |
| run: nix develop --command cargo build --release --bin test-runner | |
| - name: Run tests | |
| run: nix develop --command cargo run --release --bin test-runner -- --output STATUS.md | |
| - name: Commit STATUS.md | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add STATUS.md | |
| git diff --cached --quiet || git commit -m "Update STATUS.md [skip ci]" | |
| git push | |
| - name: Fetch baseline | |
| if: github.event_name == 'pull_request' | |
| id: baseline | |
| run: | | |
| if git show origin/main:STATUS.md > baseline-STATUS.md 2>/dev/null; then | |
| echo "found=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| echo "No baseline found, skipping checks" | |
| fi | |
| - name: Check for regressions | |
| if: github.event_name == 'pull_request' && steps.baseline.outputs.found == 'true' | |
| run: nix develop --command cargo run --release --bin test-runner -- --check-regression baseline-STATUS.md STATUS.md | |
| - name: Comment on constraint/witness growth | |
| if: github.event_name == 'pull_request' && steps.baseline.outputs.found == 'true' && !cancelled() | |
| run: | | |
| COMMENT=$(nix develop --command cargo run --release --bin test-runner -- --check-growth baseline-STATUS.md STATUS.md) | |
| gh pr comment "${{ github.event.pull_request.number }}" --body "$COMMENT" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |