Skip to content

Commit 4d5699c

Browse files
authored
Replace actions-rs (#399)
* ci: Replace actions-rs with dtolnay/rust-toolchain and houseabsolute/actions-rust-cross * ci: Add missing cargo call * ci: Add missing doc call * ci: Add missing cargo call
1 parent e6691a6 commit 4d5699c

File tree

3 files changed

+50
-120
lines changed

3 files changed

+50
-120
lines changed

.github/workflows/daily_tests.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ permissions:
44

55
on:
66
schedule:
7-
- cron: '0 0 * * *' # Midnight of each day
7+
- cron: "0 0 * * *" # Midnight of each day
88

99
jobs:
1010
tests:
1111
name: Test Suite
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
rust:
15+
toolchain:
1616
- stable
1717
- nightly
1818
steps:
@@ -22,13 +22,12 @@ jobs:
2222
persist-credentials: false
2323

2424
- name: Install toolchain
25-
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
25+
uses: dtolnay/rust-toolchain@master
2626
with:
27-
profile: minimal
28-
toolchain: ${{ matrix.rust }}
29-
override: true
27+
toolchain: ${{ matrix.toolchain }}
28+
29+
- name: Run cargo test - debug
30+
run: cargo test --all-features
31+
3032
- name: Run cargo test - release
31-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
32-
with:
33-
command: test
34-
args: --release --all-features
33+
run: cargo test --release --all-features

.github/workflows/lints.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,15 @@ jobs:
1515
persist-credentials: false
1616

1717
- name: Install stable toolchain
18-
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
18+
uses: dtolnay/rust-toolchain@stable
1919
with:
20-
profile: minimal
21-
toolchain: stable
22-
override: true
2320
components: rustfmt, clippy
2421

2522
- name: Run cargo fmt
26-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
27-
with:
28-
command: fmt
29-
args: --all -- --check
23+
run: cargo fmt --all -- --check
3024

3125
- name: Run cargo clippy
32-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
33-
with:
34-
command: clippy
35-
args: -- -D warnings
26+
run: cargo clippy -- -D warnings
3627

3728
- name: Run cargo clippy on tests
38-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
39-
with:
40-
command: clippy
41-
args: --tests -- -D warnings
29+
run: cargo clippy --tests -- -D warnings

.github/workflows/test.yml

Lines changed: 37 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
test:
1818
strategy:
1919
matrix:
20-
rust:
20+
toolchain:
2121
- stable
2222
- beta
2323
- nightly
@@ -35,70 +35,33 @@ jobs:
3535
persist-credentials: false
3636

3737
- name: Install toolchain
38-
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
38+
uses: dtolnay/rust-toolchain@master
3939
with:
40-
profile: minimal
41-
toolchain: ${{ matrix.rust }}
42-
override: true
40+
toolchain: ${{ matrix.toolchain }}
4341

4442
- name: Test debug-mode, default features
45-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
46-
with:
47-
command: test
43+
run: cargo test
4844

4945
- name: Test debug-mode, all features
50-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
51-
with:
52-
command: test
53-
args: --features serde
46+
run: cargo test --all-features
5447

5548
- name: Test debug-mode, no default features
56-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
57-
with:
58-
command: test
59-
args: --no-default-features
49+
run: cargo test --no-default-features
6050

61-
- name: Test debug-mode, alloc feature
62-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
63-
with:
64-
command: test
65-
args: --no-default-features --features alloc --tests
66-
67-
- name: Test debug-mode, experimental feature
68-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
69-
with:
70-
command: test
71-
args: --features experimental
51+
- name: Test debug-mode, no-default + alloc feature
52+
run: cargo test --no-default-features --features alloc --tests
7253

7354
- name: Test release-mode, default features
74-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
75-
with:
76-
command: test
77-
args: --release
55+
run: cargo test --release
7856

7957
- name: Test release-mode, all features
80-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
81-
with:
82-
command: test
83-
args: --release --features serde
58+
run: cargo test --release --all-features
8459

8560
- name: Test release-mode, no default features
86-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
87-
with:
88-
command: test
89-
args: --release --no-default-features
61+
run: cargo test --release --no-default-features
9062

91-
- name: Test release-mode, alloc feature
92-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
93-
with:
94-
command: test
95-
args: --release --no-default-features --features alloc --tests
96-
97-
- name: Test release-mode, experimental feature
98-
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
99-
with:
100-
command: test
101-
args: --release --features experimental
63+
- name: Test release-mode, no-default + alloc feature
64+
run: cargo test --release --no-default-features --features alloc --tests
10265

10366
sanitizers:
10467
name: Tests w. sanitizers
@@ -110,11 +73,10 @@ jobs:
11073
persist-credentials: false
11174

11275
- name: Install toolchain
113-
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
76+
uses: dtolnay/rust-toolchain@master
11477
with:
11578
toolchain: nightly
116-
target: x86_64-unknown-linux-gnu
117-
override: true
79+
targets: x86_64-unknown-linux-gnu
11880

11981
# Release (LeakSanitizer is enabled by default with AddressSanitizer for x86_64 Linux builds)
12082
# https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer
@@ -126,24 +88,19 @@ jobs:
12688
runs-on: ubuntu-latest
12789
strategy:
12890
matrix:
129-
rust:
91+
toolchain:
13092
- stable
13193
- nightly
13294
steps:
13395
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
13496
with:
13597
persist-credentials: false
136-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
137-
with:
138-
profile: minimal
139-
toolchain: ${{ matrix.rust }}
140-
target: thumbv7em-none-eabi
141-
override: true
142-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
98+
99+
- uses: houseabsolute/actions-rust-cross@ad283b2fc65ad1f3a04fb8bf8b2b829aad4a9318
143100
with:
144-
use-cross: true
145101
command: build
146-
args: --release --no-default-features --target thumbv7em-none-eabi
102+
target: thumbv7em-none-eabi
103+
args: "--release --no-default-features"
147104

148105
cross_compilation:
149106
name: Linux/ARM - Release tests
@@ -158,16 +115,12 @@ jobs:
158115
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
159116
with:
160117
persist-credentials: false
161-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
162-
with:
163-
toolchain: stable
164-
target: ${{ matrix.arch }}
165-
override: true
166-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
118+
119+
- uses: houseabsolute/actions-rust-cross@ad283b2fc65ad1f3a04fb8bf8b2b829aad4a9318
167120
with:
168-
use-cross: true
169121
command: test
170-
args: --release --target ${{ matrix.arch }}
122+
target: ${{ matrix.arch }}
123+
args: "--release"
171124

172125
# https://rustwasm.github.io/docs/book/reference/add-wasm-support-to-crate.html#maintaining-ongoing-support-for-webassembly
173126
web_assembly:
@@ -181,15 +134,13 @@ jobs:
181134
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
182135
with:
183136
persist-credentials: false
184-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
137+
138+
- uses: dtolnay/rust-toolchain@master
185139
with:
186140
toolchain: stable
187-
target: ${{ matrix.arch }}
188-
override: true
189-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
190-
with:
191-
command: check
192-
args: --no-default-features --target ${{ matrix.arch }}
141+
targets: ${{ matrix.arch }}
142+
143+
- run: cargo check --no-default-features --target ${{ matrix.arch }}
193144

194145
docs:
195146
name: Build documentation
@@ -198,14 +149,10 @@ jobs:
198149
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
199150
with:
200151
persist-credentials: false
201-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
202-
with:
203-
toolchain: stable
204-
override: true
205-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
206-
with:
207-
command: doc
208-
args: --no-deps --all-features
152+
153+
- uses: dtolnay/rust-toolchain@stable
154+
155+
- run: cargo doc --no-deps --all-features
209156

210157
benches:
211158
name: Build and check benchmarks
@@ -214,11 +161,7 @@ jobs:
214161
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
215162
with:
216163
persist-credentials: false
217-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
218-
with:
219-
toolchain: stable
220-
override: true
221-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
222-
with:
223-
command: test
224-
args: --benches
164+
165+
- uses: dtolnay/rust-toolchain@stable
166+
167+
- run: cargo test --benches

0 commit comments

Comments
 (0)