26
26
override : true
27
27
- run : cargo check
28
28
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
-
56
29
fmt :
57
30
name : Rustfmt
58
31
runs-on : ubuntu-latest
79
52
- run : rustup component add clippy
80
53
- run : cargo clippy -- -D warnings
81
54
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
+
82
86
build-release-candidate :
83
87
name : Build release candidate
84
88
strategy :
@@ -91,10 +95,15 @@ jobs:
91
95
- os : macos-latest
92
96
target : aarch64-apple-darwin
93
97
runs-on : ${{ matrix.os }}
98
+ needs :
99
+ - clippy
100
+ - fmt
101
+ - check
102
+ - test
94
103
if : github.ref == 'refs/heads/main'
95
104
steps :
96
105
- uses : actions/checkout@v3
97
- - uses : actions/cache@v1
106
+ - uses : actions/cache@v3
98
107
with :
99
108
path : ~/.cargo
100
109
key : ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
0 commit comments