Skip to content

Commit 292d331

Browse files
Merge pull request #493 from matthiasbeyer/ci-optimization
CI speed optimization
2 parents c9c8c73 + ccb305a commit 292d331

File tree

1 file changed

+15
-71
lines changed

1 file changed

+15
-71
lines changed

.github/workflows/msrv.yml

Lines changed: 15 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -6,130 +6,74 @@ jobs:
66
check:
77
name: Check
88
runs-on: ubuntu-latest
9-
strategy:
10-
matrix:
11-
rust:
12-
- 1.70.0
13-
- stable
14-
- beta
15-
- nightly
16-
179
steps:
1810
- name: Checkout sources
1911
uses: actions/[email protected]
2012

2113
- name: Install toolchain
2214
uses: dtolnay/rust-toolchain@master
2315
with:
24-
toolchain: ${{ matrix.rust }}
16+
toolchain: 1.70.0
2517

26-
- name: Run cargo check
27-
if: matrix.rust != 'nightly'
28-
run: cargo check --all-features
18+
- name: Cache
19+
uses: Swatinem/rust-cache@v2
2920

30-
- name: Run cargo check (nightly)
31-
if: matrix.rust == 'nightly'
32-
continue-on-error: true
33-
run: cargo check --all-features
21+
- name: Run cargo check
22+
run: cargo check --all-features --examples --tests
3423

3524
test:
36-
needs: [check]
3725
name: Test Suite
3826
runs-on: ubuntu-latest
39-
strategy:
40-
matrix:
41-
rust:
42-
- 1.70.0
43-
- stable
44-
- beta
45-
- nightly
4627
steps:
4728
- name: Checkout sources
4829
uses: actions/[email protected]
4930

5031
- name: Install toolchain
5132
uses: dtolnay/rust-toolchain@master
5233
with:
53-
toolchain: ${{ matrix.rust }}
54-
55-
- name: Run cargo test
56-
if: matrix.rust != 'nightly' && matrix.rust != '1.56.1'
57-
run: cargo test --all-features
34+
toolchain: 1.70.0
5835

59-
- name: Run cargo test (nightly)
60-
if: matrix.rust == '1.66.0'
61-
continue-on-error: true
62-
run: cargo test --tests --all-features
36+
- name: Cache
37+
uses: Swatinem/rust-cache@v2
6338

64-
- name: Run cargo test (nightly)
65-
if: matrix.rust == 'nightly'
66-
continue-on-error: true
39+
- name: Run cargo test
6740
run: cargo test --all-features
6841

6942
fmt:
7043
needs: [check]
7144
name: Rustfmt
7245
runs-on: ubuntu-latest
73-
strategy:
74-
matrix:
75-
rust:
76-
- stable
77-
- beta
7846
steps:
7947
- name: Checkout sources
8048
uses: actions/[email protected]
8149

8250
- name: Install toolchain
8351
uses: dtolnay/rust-toolchain@master
8452
with:
85-
toolchain: ${{ matrix.rust }}
53+
toolchain: 1.70.0
8654
components: rustfmt
8755

8856
- name: Run cargo fmt
57+
continue-on-error: ${{ matrix.rust == 'beta' }}
8958
run: cargo fmt --all -- --check
9059

9160
clippy:
9261
needs: [check]
9362
name: Clippy
9463
runs-on: ubuntu-latest
95-
strategy:
96-
matrix:
97-
rust:
98-
- 1.70.0
99-
- 1.73.0
10064
steps:
10165
- name: Checkout sources
10266
uses: actions/[email protected]
10367

10468
- name: Install toolchain
10569
uses: dtolnay/rust-toolchain@master
10670
with:
107-
toolchain: ${{ matrix.rust }}
71+
toolchain: 1.70.0
10872
components: clippy
10973

74+
- name: Cache
75+
uses: Swatinem/rust-cache@v2
76+
11077
- name: Run cargo clippy
11178
run: cargo clippy --all-targets --all-features -- -D warnings
11279

113-
check-examples:
114-
name: Check examples
115-
needs: [check]
116-
runs-on: ubuntu-latest
117-
strategy:
118-
matrix:
119-
rust:
120-
- 1.70.0
121-
- 1.73.0
122-
123-
steps:
124-
- name: Checkout sources
125-
uses: actions/[email protected]
126-
127-
- name: Install toolchain
128-
uses: dtolnay/rust-toolchain@master
129-
with:
130-
toolchain: ${{ matrix.rust }}
131-
components: clippy
132-
133-
- name: Run cargo check
134-
run: cargo check --examples
135-

0 commit comments

Comments
 (0)