Unified spawning #71
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: Cargo Build & Test | |
| on: | |
| merge_group: | |
| pull_request: | |
| env: | |
| # Only include the debug info necessary for backtraces (file names and line numbers). Any extra | |
| # debug info provided by `debuginfo=1` or `debuginfo=2` require an interactive debugger like | |
| # `lldb` or `gdb`. | |
| RUSTFLAGS: -C debuginfo=line-tables-only | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build & run tests | |
| run: cargo run -p ci -- compile | |
| env: | |
| RUSTFLAGS: ${{ env.RUSTFLAGS }} -D warnings | |
| lints: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Lints | |
| run: cargo run -p ci -- lints | |
| docs: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build and check doc | |
| run: cargo run -p ci -- doc | |
| typos: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check for typos | |
| uses: crate-ci/typos@v1.28.4 | |
| - name: Typos info | |
| if: failure() | |
| run: | | |
| echo 'To fix typos, please run `typos -w`' | |
| echo 'To check for a diff, run `typos`' | |
| echo 'You can find typos here: https://crates.io/crates/typos' |