Skip to content

Commit bea9acf

Browse files
committed
Sequence and warnings.
1 parent 6397a7e commit bea9acf

File tree

1 file changed

+37
-28
lines changed

1 file changed

+37
-28
lines changed

.github/workflows/build.yaml

+37-28
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,6 @@ jobs:
2626
override: true
2727
- run: cargo check
2828

29-
test:
30-
name: Test Suite
31-
strategy:
32-
matrix:
33-
include:
34-
- os: ubuntu-latest
35-
target: x86_64-unknown-linux-gnu
36-
- os: macos-latest
37-
target: x86_64-apple-darwin
38-
runs-on: ${{ matrix.os }}
39-
steps:
40-
- uses: actions/checkout@v3
41-
- uses: actions/cache@v1
42-
with:
43-
path: ~/.cargo
44-
key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
45-
restore-keys: |
46-
${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}
47-
${{ matrix.target }}-cargo
48-
- uses: dtolnay/rust-toolchain@master
49-
with:
50-
profile: minimal
51-
toolchain: stable
52-
override: true
53-
targets: ${{ matrix.target }}
54-
- run: cargo test --target ${{ matrix.target }}
55-
5629
fmt:
5730
name: Rustfmt
5831
runs-on: ubuntu-latest
@@ -79,6 +52,37 @@ jobs:
7952
- run: rustup component add clippy
8053
- run: cargo clippy -- -D warnings
8154

55+
test:
56+
name: Test Suite
57+
strategy:
58+
matrix:
59+
include:
60+
- os: ubuntu-latest
61+
target: x86_64-unknown-linux-gnu
62+
- os: macos-latest
63+
target: x86_64-apple-darwin
64+
runs-on: ${{ matrix.os }}
65+
needs:
66+
- clippy
67+
- fmt
68+
- check
69+
steps:
70+
- uses: actions/checkout@v3
71+
- uses: actions/cache@v3
72+
with:
73+
path: ~/.cargo
74+
key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
75+
restore-keys: |
76+
${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}
77+
${{ matrix.target }}-cargo
78+
- uses: dtolnay/rust-toolchain@master
79+
with:
80+
profile: minimal
81+
toolchain: stable
82+
override: true
83+
targets: ${{ matrix.target }}
84+
- run: cargo test --target ${{ matrix.target }}
85+
8286
build-release-candidate:
8387
name: Build release candidate
8488
strategy:
@@ -91,10 +95,15 @@ jobs:
9195
- os: macos-latest
9296
target: aarch64-apple-darwin
9397
runs-on: ${{ matrix.os }}
98+
needs:
99+
- clippy
100+
- fmt
101+
- check
102+
- test
94103
if: github.ref == 'refs/heads/main'
95104
steps:
96105
- uses: actions/checkout@v3
97-
- uses: actions/cache@v1
106+
- uses: actions/cache@v3
98107
with:
99108
path: ~/.cargo
100109
key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}

0 commit comments

Comments
 (0)