|
9 | 9 | CARGO_TERM_COLOR: always |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - build_and_test: |
13 | | - name: Rust project |
| 12 | + build: |
| 13 | + name: Build |
14 | 14 | runs-on: ubuntu-22.04 |
15 | 15 | strategy: |
16 | | - matrix: |
17 | | - toolchain: |
18 | | - - stable |
19 | 16 | fail-fast: false |
20 | 17 |
|
21 | 18 | steps: |
@@ -57,10 +54,59 @@ jobs: |
57 | 54 | - name: Build |
58 | 55 | run: pixi run build |
59 | 56 |
|
60 | | - - name: Install `cargo` tools to do more testing |
61 | | - uses: taiki-e/install-action@v2 |
62 | | - with: |
63 | | - tool: cargo-deny,cargo-machete,cargo-nextest,cargo-rdme |
| 57 | + check: |
| 58 | + name: Run checks |
| 59 | + runs-on: ubuntu-22.04 |
| 60 | + needs: build |
| 61 | + strategy: |
| 62 | + fail-fast: false |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v3 |
| 65 | + |
| 66 | + - name: Install an assembler |
| 67 | + run: sudo apt-get install yasm -y |
| 68 | + |
| 69 | + - uses: prefix-dev/[email protected] |
| 70 | + with: |
| 71 | + pixi-version: v0.44.0 |
| 72 | + cache: true |
| 73 | + |
| 74 | + - uses: actions/cache@v4 |
| 75 | + name: Restore cargo registry |
| 76 | + with: |
| 77 | + path: ~/.cargo/registry |
| 78 | + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
| 79 | + restore-keys: | |
| 80 | + ${{ runner.os }}-cargo-registry- |
| 81 | +
|
| 82 | + - uses: actions/cache@v4 |
| 83 | + name: Restore cargo index |
| 84 | + with: |
| 85 | + path: ~/.cargo/git |
| 86 | + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} |
| 87 | + restore-keys: | |
| 88 | + ${{ runner.os }}-cargo-index- |
| 89 | +
|
| 90 | + - uses: actions/cache@v4 |
| 91 | + name: Restore cargo build outputs |
| 92 | + with: |
| 93 | + path: target |
| 94 | + key: ${{ runner.os }}-cargo-build-target-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} |
| 95 | + restore-keys: | |
| 96 | + ${{ runner.os }}-cargo-build-target-${{ matrix.toolchain }}- |
| 97 | +
|
| 98 | + - uses: actions/cache@v4 |
| 99 | + name: Restore cargo bin |
| 100 | + with: |
| 101 | + path: ~/.cargo/bin |
| 102 | + key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }} |
| 103 | + restore-keys: | |
| 104 | + ${{ runner.os }}-cargo-bin- |
| 105 | +
|
| 106 | + - name: Install `cargo` tools to do more testing |
| 107 | + uses: taiki-e/install-action@v2 |
| 108 | + with: |
| 109 | + tool: cargo-deny,cargo-machete,cargo-nextest,cargo-rdme |
64 | 110 |
|
65 | | - - name: Run checks |
66 | | - run: pixi run check |
| 111 | + - name: Run checks |
| 112 | + run: pixi run check |
0 commit comments