1
1
on :
2
- push :
3
- branches : [ master ]
4
2
pull_request :
5
- branches : [ master ]
3
+ merge_group :
6
4
7
5
name : Continuous integration
8
6
13
11
RUSTFLAGS : " -D warnings"
14
12
15
13
jobs :
14
+ clippy :
15
+ runs-on : ubuntu-latest
16
+ strategy :
17
+ matrix :
18
+ rust :
19
+ - beta
20
+ name : clippy/${{ matrix.rust }}
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+ - uses : dtolnay/rust-toolchain@master
24
+ with :
25
+ toolchain : ${{ matrix.rust }}
26
+ components : clippy
27
+ - uses : Swatinem/rust-cache@v2
28
+ - run : cargo clippy --features docs
16
29
tests :
17
30
runs-on : ubuntu-latest
18
31
strategy :
@@ -23,57 +36,52 @@ jobs:
23
36
- nightly
24
37
- 1.51.0 # MSRV
25
38
39
+ name : tests/${{ matrix.rust }}
26
40
steps :
27
- - uses : actions/checkout@v2
28
- - uses : actions-rs/ toolchain@v1
41
+ - uses : actions/checkout@v4
42
+ - uses : dtolnay/rust- toolchain@master
29
43
with :
30
- profile : minimal
31
44
toolchain : ${{ matrix.rust }}
32
- override : true
45
+ - uses : Swatinem/rust-cache@v2
33
46
- name : Install openblas
34
47
run : sudo apt-get install libopenblas-dev gfortran
35
48
- run : ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
36
49
37
50
cross_test :
51
+ if : ${{ github.event_name == 'merge_group' }}
38
52
runs-on : ubuntu-latest
39
53
strategy :
40
54
matrix :
41
55
include :
42
56
- rust : stable
43
- target : mips -unknown-linux-gnu
57
+ target : s390x -unknown-linux-gnu
44
58
- rust : stable
45
59
target : i686-unknown-linux-gnu
46
60
61
+ name : cross_test/${{ matrix.target }}/${{ matrix.rust }}
47
62
steps :
48
- - uses : actions/checkout@v2
49
- - uses : actions-rs/ toolchain@v1
63
+ - uses : actions/checkout@v4
64
+ - uses : dtolnay/rust- toolchain@master
50
65
with :
51
- profile : minimal
52
66
toolchain : ${{ matrix.rust }}
53
- target : ${{ matrix.target }}
54
- override : true
55
- - name : Cache cargo plugins
56
- uses : actions/cache@v1
57
- with :
58
- path : ~/.cargo/bin/
59
- key : ${{ runner.os }}-cargo-plugins
67
+ targets : ${{ matrix.target }}
68
+ - uses : Swatinem/rust-cache@v2
60
69
- name : Install cross
61
- run : cargo install cross || true
70
+ run : cargo install cross
62
71
- run : ./scripts/cross-tests.sh "docs" ${{ matrix.rust }} ${{ matrix.target }}
63
72
64
- clippy :
73
+ conclusion :
74
+ needs :
75
+ - clippy
76
+ - tests
77
+ - cross_test
78
+ if : always()
65
79
runs-on : ubuntu-latest
66
- strategy :
67
- matrix :
68
- rust :
69
- - beta
70
80
steps :
71
- - uses : actions/checkout@v2
72
- - uses : actions-rs/toolchain@v1
73
- with :
74
- profile : minimal
75
- toolchain : ${{ matrix.rust }}
76
- override : true
77
- components : clippy
78
- - run : cargo clippy --features docs
79
-
81
+ - name : Result
82
+ run : |
83
+ jq -C <<< "${needs}"
84
+ # Check if all needs were successful or skipped.
85
+ "$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")"
86
+ env :
87
+ needs : ${{ toJson(needs) }}
0 commit comments