Skip to content

Commit 852b1cc

Browse files
committed
ci: split into two jobs (to avoid rebuild on fail)
1 parent b526efd commit 852b1cc

File tree

1 file changed

+52
-5
lines changed

1 file changed

+52
-5
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ env:
99
CARGO_TERM_COLOR: always
1010

1111
jobs:
12-
build_and_test:
13-
name: Rust project
12+
build:
13+
name: Build
1414
runs-on: ubuntu-22.04
1515
strategy:
16-
matrix:
17-
toolchain:
18-
- stable
1916
fail-fast: false
2017

2118
steps:
@@ -57,6 +54,56 @@ jobs:
5754
- name: Build
5855
run: pixi run build
5956

57+
check:
58+
name: Run checks
59+
runs-on: ubuntu-22.04
60+
needs: build
61+
strategy:
62+
fail-fast: false
63+
64+
steps:
65+
- uses: actions/checkout@v3
66+
67+
- name: Install an assembler
68+
run: sudo apt-get install yasm -y
69+
70+
- uses: prefix-dev/[email protected]
71+
with:
72+
pixi-version: v0.44.0
73+
cache: true
74+
75+
- uses: actions/cache@v4
76+
name: Restore cargo registry
77+
with:
78+
path: ~/.cargo/registry
79+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
80+
restore-keys: |
81+
${{ runner.os }}-cargo-registry-
82+
83+
- uses: actions/cache@v4
84+
name: Restore cargo index
85+
with:
86+
path: ~/.cargo/git
87+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
88+
restore-keys: |
89+
${{ runner.os }}-cargo-index-
90+
91+
- uses: actions/cache@v4
92+
name: Restore cargo build outputs
93+
with:
94+
path: target
95+
key: ${{ runner.os }}-cargo-build-target-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
96+
restore-keys: |
97+
${{ runner.os }}-cargo-build-target-${{ matrix.toolchain }}-
98+
99+
- uses: actions/cache@v4
100+
name: Restore cargo bin
101+
with:
102+
path: ~/.cargo/bin
103+
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
104+
restore-keys: |
105+
${{ runner.os }}-cargo-bin-
106+
60107
- name: Install `cargo` tools to do more testing
61108
uses: taiki-e/install-action@v2
62109
with:

0 commit comments

Comments
 (0)