Skip to content

Commit 5ece21a

Browse files
committed
CI: Sync GitHub Actions workflow definitions with *ring*.
1 parent 5d8cd6b commit 5ece21a

File tree

1 file changed

+34
-67
lines changed

1 file changed

+34
-67
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,21 @@ jobs:
99
runs-on: ubuntu-22.04
1010

1111
steps:
12-
- uses: briansmith/actions-rs-toolchain@v1
13-
with:
14-
toolchain: stable
15-
profile: minimal
16-
components: rustfmt
17-
- uses: briansmith/actions-checkout@v2
12+
- run: rustup --version
13+
14+
- uses: briansmith/actions-checkout@v4
1815
with:
1916
persist-credentials: false
17+
2018
- run: cargo fmt --all -- --check
2119

2220
clippy:
2321
runs-on: ubuntu-22.04
2422

2523
steps:
26-
- uses: briansmith/actions-rs-toolchain@v1
27-
with:
28-
toolchain: stable
29-
profile: minimal
30-
components: clippy
24+
- run: rustup --version
3125

32-
- uses: briansmith/actions-checkout@v2
26+
- uses: briansmith/actions-checkout@v4
3327
with:
3428
persist-credentials: false
3529

@@ -39,22 +33,20 @@ jobs:
3933
runs-on: ubuntu-22.04
4034

4135
steps:
42-
- uses: briansmith/actions-rs-toolchain@v1
43-
with:
44-
toolchain: stable
45-
profile: minimal
36+
- run: rustup --version
4637

47-
- uses: briansmith/actions-cache@v2
38+
- uses: briansmith/actions-cache@v3
4839
with:
4940
path: |
5041
~/.cargo/bin/cargo-audit
5142
~/.cargo/.crates.toml
5243
~/.cargo/.crates2.json
53-
key: ${{ runner.os }}-v2-cargo-audit-0.13.1
44+
key: ${{ runner.os }}-v2-cargo-audit-0.17.4
5445

55-
- run: cargo install cargo-audit --vers "0.13.1"
46+
# With `--locked` `cargo install` complains about using yanked crates.
47+
- run: cargo install cargo-audit --vers "0.17.4"
5648

57-
- uses: briansmith/actions-checkout@v2
49+
- uses: briansmith/actions-checkout@v4
5850
with:
5951
persist-credentials: false
6052

@@ -66,22 +58,19 @@ jobs:
6658
runs-on: ubuntu-22.04
6759

6860
steps:
69-
- uses: briansmith/actions-rs-toolchain@v1
70-
with:
71-
toolchain: stable
72-
profile: minimal
61+
- run: rustup --version
7362

74-
- uses: briansmith/actions-cache@v2
63+
- uses: briansmith/actions-cache@v3
7564
with:
7665
path: |
7766
~/.cargo/bin/cargo-deny
7867
~/.cargo/.crates.toml
7968
~/.cargo/.crates2.json
80-
key: ${{ runner.os }}-v2-cargo-deny-locked-0.8.5
69+
key: ${{ runner.os }}-v2-cargo-deny-locked-0.9.1
8170

82-
- run: cargo install cargo-deny --locked --vers "0.8.5"
71+
- run: cargo install cargo-deny --locked --vers "0.9.1"
8372

84-
- uses: briansmith/actions-checkout@v2
73+
- uses: briansmith/actions-checkout@v4
8574
with:
8675
persist-credentials: false
8776

@@ -98,17 +87,10 @@ jobs:
9887
- beta
9988
- nightly
10089

101-
include:
102-
- target: x86_64-unknown-linux-gnu
103-
10490
steps:
105-
- uses: briansmith/actions-rs-toolchain@v1
106-
with:
107-
override: true
108-
target: ${{ matrix.target }}
109-
toolchain: ${{ matrix.rust_channel }}
91+
- run: rustup --version
11092

111-
- uses: briansmith/actions-checkout@v2
93+
- uses: briansmith/actions-checkout@v4
11294
with:
11395
persist-credentials: false
11496

@@ -119,12 +101,7 @@ jobs:
119101
runs-on: ubuntu-22.04
120102

121103
steps:
122-
- uses: briansmith/actions-rs-toolchain@v1
123-
with:
124-
toolchain: stable
125-
profile: minimal
126-
127-
- uses: briansmith/actions-checkout@v2
104+
- uses: briansmith/actions-checkout@v4
128105
with:
129106
persist-credentials: false
130107

@@ -165,11 +142,6 @@ jobs:
165142

166143
- beta
167144

168-
exclude:
169-
# 1.46.0 doesn't support `-Clink-self-contained`.
170-
- target: x86_64-unknown-linux-musl
171-
rust_channel: 1.46.0
172-
173145
include:
174146
- target: aarch64-pc-windows-msvc
175147
host_os: windows-latest
@@ -192,19 +164,16 @@ jobs:
192164
- if: ${{ contains(matrix.host_os, 'ubuntu') }}
193165
run: sudo apt-get update -y
194166

195-
- uses: briansmith/actions-checkout@v2
167+
- uses: briansmith/actions-checkout@v4
196168
with:
197169
persist-credentials: false
198170

171+
- run: rustup toolchain add --profile=minimal ${{ matrix.rust_channel }}
172+
- run: rustup target add --toolchain=${{ matrix.rust_channel }} ${{ matrix.target }}
173+
199174
- if: ${{ !contains(matrix.host_os, 'windows') }}
200175
run: mk/install-build-tools.sh --target=${{ matrix.target }} ${{ matrix.features }}
201176

202-
- uses: briansmith/actions-rs-toolchain@v1
203-
with:
204-
override: true
205-
target: ${{ matrix.target }}
206-
toolchain: ${{ matrix.rust_channel }}
207-
208177
- if: ${{ matrix.target == 'aarch64-apple-darwin' }}
209178
run: echo "DEVELOPER_DIR=/Applications/Xcode_12.2.app/Contents/Developer" >> $GITHUB_ENV
210179

@@ -215,26 +184,27 @@ jobs:
215184

216185
- if: ${{ !contains(matrix.host_os, 'windows') }}
217186
run: |
218-
mk/cargo.sh test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
187+
mk/cargo.sh +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
219188
220189
- if: ${{ contains(matrix.host_os, 'windows') }}
221190
run: |
222-
cargo test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
191+
cargo +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
223192
224193
# rcgen-based tests require Rust 1.67.
225194
- if: ${{ !contains(matrix.host_os, 'windows') && !contains(matrix.rust_channel, '1.61.0') }}
226195
run: |
227-
mk/cargo.sh test -p rcgen-tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
196+
mk/cargo.sh +${{ matrix.rust_channel }} test -p rcgen-tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
228197
229198
# rcgen-based tests require Rust 1.67, and uses *ring* 0.16 which doesn't build for aarch64-pc-windows-msvc.
230199
- if: ${{ contains(matrix.host_os, 'windows') && !contains(matrix.rust_channel, '1.61.0') && !contains(matrix.target, 'aarch64-pc-windows-msvc') }}
231200
run: |
232-
cargo test -vv -p rcgen-tests --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
201+
cargo +${{ matrix.rust_channel }} test -vv -p rcgen-tests --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
233202
234203
coverage:
235204
runs-on: ${{ matrix.host_os }}
236205

237206
strategy:
207+
fail-fast: false
238208
matrix:
239209
features:
240210
- --all-features
@@ -259,24 +229,21 @@ jobs:
259229
- if: ${{ contains(matrix.host_os, 'ubuntu') }}
260230
run: sudo apt-get update -y
261231

262-
- uses: briansmith/actions-checkout@v2
232+
- uses: briansmith/actions-checkout@v4
263233
with:
264234
persist-credentials: false
265235

236+
- run: rustup toolchain add --profile=minimal ${{ matrix.rust_channel }}
237+
- run: rustup target add --toolchain=${{ matrix.rust_channel }} ${{ matrix.target }}
238+
266239
- if: ${{ !contains(matrix.host_os, 'windows') }}
267240
run: RING_COVERAGE=1 mk/install-build-tools.sh --target=${{ matrix.target }} ${{ matrix.features }}
268241

269-
- uses: briansmith/actions-rs-toolchain@v1
270-
with:
271-
override: true
272-
target: ${{ matrix.target }}
273-
toolchain: ${{ matrix.rust_channel }}
274-
275242
- if: ${{ !contains(matrix.host_os, 'windows') }}
276243
run: |
277244
RING_COVERAGE=1 mk/cargo.sh +${{ matrix.rust_channel }} test --workspace -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
278245
279-
- uses: briansmith/codecov-codecov-action@v1
246+
- uses: briansmith/codecov-codecov-action@v3
280247
with:
281248
directory: ./target/${{ matrix.target }}/debug/coverage/reports
282249
fail_ci_if_error: true

0 commit comments

Comments
 (0)