Add detect_changes since parity #65
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.15.2 | |
| - name: Cache vendored grammars | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| vendored/grammars | |
| vendored/tree_sitter | |
| key: grammars-${{ hashFiles('scripts/fetch_grammars.sh') }} | |
| - name: Fetch tree-sitter grammars | |
| run: bash scripts/fetch_grammars.sh | |
| - name: Format check | |
| run: zig fmt --check src/ build.zig | |
| - name: Build | |
| run: zig build | |
| - name: Run tests | |
| run: zig build test | |
| - name: Interop golden snapshot check | |
| run: | | |
| CODEBASE_MEMORY_ZIG_BIN="${{ github.workspace }}/zig-out/bin/cbm" \ | |
| bash scripts/run_interop_alignment.sh --zig-only | |
| - name: CLI parity golden snapshot check | |
| run: | | |
| CODEBASE_MEMORY_ZIG_BIN="${{ github.workspace }}/zig-out/bin/cbm" \ | |
| bash scripts/run_cli_parity.sh --zig-only | |
| - name: Install zlint | |
| run: | | |
| curl -fsSL -o zlint https://github.com/DonIsaac/zlint/releases/download/v0.7.9/zlint-linux-x86_64 | |
| chmod +x zlint | |
| - name: Run zlint | |
| run: find src -name '*.zig' | ./zlint -S |