Skip to content

Commit bb73d12

Browse files
committed
use inline script instead of unmaintained actions-rs/toolchain
1 parent ee645a2 commit bb73d12

File tree

2 files changed

+62
-44
lines changed

2 files changed

+62
-44
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ jobs:
2121
fetch-depth: 1
2222

2323
- name: Install toolchain
24-
uses: actions-rs/toolchain@v1
25-
with:
26-
toolchain: 1.75.0
27-
override: true
28-
components: rustfmt, clippy
24+
run: |
25+
rustup install $RUST_TOOLCHAIN_VERSION
26+
rustup default $RUST_TOOLCHAIN_VERSION
27+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
28+
env:
29+
RUST_TOOLCHAIN_VERSION: 1.75.0
2930

3031
- uses: Swatinem/rust-cache@v2
3132
with:
@@ -77,11 +78,13 @@ jobs:
7778
with:
7879
fetch-depth: 1
7980

80-
- name: Install latest beta
81-
uses: actions-rs/toolchain@v1
82-
with:
83-
toolchain: beta
84-
override: true
81+
- name: Install latest beta toolchain
82+
run: |
83+
rustup install $RUST_TOOLCHAIN_VERSION
84+
rustup default $RUST_TOOLCHAIN_VERSION
85+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
86+
env:
87+
RUST_TOOLCHAIN_VERSION: beta
8588

8689
- uses: Swatinem/rust-cache@v2
8790
with:
@@ -90,7 +93,7 @@ jobs:
9093
- name: cargo check
9194
run: cargo check
9295
env:
93-
RUSTFLAGS: -Dwarnings
96+
RUSTFLAGS: -Dwarnings
9497

9598
- name: Run unit tests
9699
run: cargo test --all
@@ -125,11 +128,13 @@ jobs:
125128
with:
126129
fetch-depth: 1
127130

128-
- name: Install latest beta
129-
uses: actions-rs/toolchain@v1
130-
with:
131-
toolchain: beta
132-
override: true
131+
- name: Install latest beta toolchain
132+
run: |
133+
rustup install $RUST_TOOLCHAIN_VERSION
134+
rustup default $RUST_TOOLCHAIN_VERSION
135+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
136+
env:
137+
RUST_TOOLCHAIN_VERSION: beta
133138

134139
- name: Configure environment
135140
run: |
@@ -162,11 +167,13 @@ jobs:
162167
with:
163168
fetch-depth: 1
164169

165-
- name: Install latest beta
166-
uses: actions-rs/toolchain@v1
167-
with:
168-
toolchain: beta
169-
override: true
170+
- name: Install latest beta toolchain
171+
run: |
172+
rustup install $RUST_TOOLCHAIN_VERSION
173+
rustup default $RUST_TOOLCHAIN_VERSION
174+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
175+
env:
176+
RUST_TOOLCHAIN_VERSION: beta
170177

171178
- name: Configure environment
172179
run: |
@@ -196,11 +203,13 @@ jobs:
196203
with:
197204
fetch-depth: 1
198205

199-
- name: Install latest beta
200-
uses: actions-rs/toolchain@v1
201-
with:
202-
toolchain: beta
203-
override: true
206+
- name: Install latest beta toolchain
207+
run: |
208+
rustup install $RUST_TOOLCHAIN_VERSION
209+
rustup default $RUST_TOOLCHAIN_VERSION
210+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
211+
env:
212+
RUST_TOOLCHAIN_VERSION: beta
204213

205214
- name: Configure environment
206215
run: |
@@ -227,11 +236,13 @@ jobs:
227236
with:
228237
fetch-depth: 1
229238

230-
- name: Install latest beta
231-
uses: actions-rs/toolchain@v1
232-
with:
233-
toolchain: beta
234-
override: true
239+
- name: Install latest beta toolchain
240+
run: |
241+
rustup install $RUST_TOOLCHAIN_VERSION
242+
rustup default $RUST_TOOLCHAIN_VERSION
243+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
244+
env:
245+
RUST_TOOLCHAIN_VERSION: beta
235246

236247
# We build a specific version of Valgrind because the one from the Ubuntu 22.04 repositories
237248
# has problems with Rust debuginfo.
@@ -294,10 +305,13 @@ jobs:
294305
- name: Check out repository code
295306
uses: actions/checkout@v2
296307

297-
- name: Install stable
298-
uses: actions-rs/toolchain@v1
299-
with:
300-
toolchain: stable
308+
- name: Install latest toolchain
309+
run: |
310+
rustup install $RUST_TOOLCHAIN_VERSION
311+
rustup default $RUST_TOOLCHAIN_VERSION
312+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
313+
env:
314+
RUST_TOOLCHAIN_VERSION: stable
301315

302316
- uses: Swatinem/rust-cache@v2
303317

@@ -344,10 +358,13 @@ jobs:
344358
- name: Check out repository code
345359
uses: actions/checkout@v2
346360

347-
- name: Install stable
348-
uses: actions-rs/toolchain@v1
349-
with:
350-
toolchain: stable
361+
- name: Install latest stable toolchain
362+
run: |
363+
rustup install $RUST_TOOLCHAIN_VERSION
364+
rustup default $RUST_TOOLCHAIN_VERSION
365+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
366+
env:
367+
RUST_TOOLCHAIN_VERSION: stable
351368

352369
- name: Install nightly
353370
run: rustup install nightly

.github/workflows/nightly.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ jobs:
1919
fetch-depth: 1
2020

2121
- name: Install stable toolchain
22-
uses: actions-rs/toolchain@v1
23-
with:
24-
profile: minimal
25-
toolchain: stable
26-
override: true
22+
run: |
23+
rustup install $RUST_TOOLCHAIN_VERSION --profile minimal
24+
rustup default $RUST_TOOLCHAIN_VERSION
25+
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
26+
env:
27+
RUST_TOOLCHAIN_VERSION: stable
2728

2829
- uses: Swatinem/rust-cache@v1
2930

0 commit comments

Comments
 (0)