Skip to content

Commit 41cab83

Browse files
committed
Fix toolchain installation in workflows
1 parent 20d84fd commit 41cab83

File tree

3 files changed

+20
-43
lines changed

3 files changed

+20
-43
lines changed

.github/workflows/clippy.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,11 @@ jobs:
3535
with:
3636
github_token: "${{ secrets.github_token }}"
3737

38-
- name: rust-toolchain
39-
uses: actions-rs/[email protected]
40-
with:
41-
toolchain: nightly
42-
target: x86_64-unknown-linux-gnu
43-
profile: minimal
44-
4538
- name: Checkout
4639
uses: actions/[email protected]
4740

48-
- name: Run cargo update
49-
run: cargo update
41+
- name: Install toolchain
42+
run: rustup show active-toolchain
5043

5144
- name: Cache cargo dir
5245
uses: actions/cache@v2
@@ -99,5 +92,5 @@ jobs:
9992
# Cleanup
10093
- name: Run cargo-cache --autoclean
10194
run: |
102-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
95+
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
10396
cargo cache

.github/workflows/clippy_bors.yml

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
2424
with:
2525
github_token: "${{ secrets.github_token }}"
26+
2627
- name: Checkout
2728
uses: actions/[email protected]
2829
with:
@@ -84,18 +85,11 @@ jobs:
8485
sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386
8586
if: matrix.host == 'i686-unknown-linux-gnu'
8687

87-
- name: rust-toolchain
88-
uses: actions-rs/[email protected]
89-
with:
90-
toolchain: nightly
91-
target: ${{ matrix.host }}
92-
profile: minimal
93-
9488
- name: Checkout
9589
uses: actions/[email protected]
9690

97-
- name: Run cargo update
98-
run: cargo update
91+
- name: Install toolchain
92+
run: rustup show active-toolchain
9993

10094
- name: Cache cargo dir
10195
uses: actions/cache@v2
@@ -153,7 +147,7 @@ jobs:
153147
# Cleanup
154148
- name: Run cargo-cache --autoclean
155149
run: |
156-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
150+
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
157151
cargo cache
158152
159153
integration_build:
@@ -166,18 +160,11 @@ jobs:
166160
with:
167161
github_token: "${{ secrets.github_token }}"
168162

169-
- name: rust-toolchain
170-
uses: actions-rs/[email protected]
171-
with:
172-
toolchain: nightly
173-
target: x86_64-unknown-linux-gnu
174-
profile: minimal
175-
176163
- name: Checkout
177164
uses: actions/[email protected]
178165

179-
- name: Run cargo update
180-
run: cargo update
166+
- name: Install toolchain
167+
run: rustup show active-toolchain
181168

182169
- name: Cache cargo dir
183170
uses: actions/cache@v2
@@ -209,7 +196,7 @@ jobs:
209196
# Cleanup
210197
- name: Run cargo-cache --autoclean
211198
run: |
212-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
199+
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
213200
cargo cache
214201
integration:
215202
needs: integration_build
@@ -244,18 +231,11 @@ jobs:
244231
with:
245232
github_token: "${{ secrets.github_token }}"
246233

247-
- name: rust-toolchain
248-
uses: actions-rs/[email protected]
249-
with:
250-
toolchain: nightly
251-
target: x86_64-unknown-linux-gnu
252-
profile: minimal
253-
254234
- name: Checkout
255235
uses: actions/[email protected]
256236

257-
- name: Run cargo update
258-
run: cargo update
237+
- name: Install toolchain
238+
run: rustup show active-toolchain
259239

260240
- name: Cache cargo dir
261241
uses: actions/cache@v2
@@ -285,7 +265,7 @@ jobs:
285265
# Cleanup
286266
- name: Run cargo-cache --autoclean
287267
run: |
288-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
268+
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
289269
cargo cache
290270
291271
# These jobs doesn't actually test anything, but they're only used to tell

.github/workflows/clippy_dev.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@ jobs:
2222

2323
steps:
2424
# Setup
25+
- name: Checkout
26+
uses: actions/[email protected]
27+
28+
- name: remove toolchain file
29+
run: rm rust-toolchain
30+
2531
- name: rust-toolchain
2632
uses: actions-rs/[email protected]
2733
with:
2834
toolchain: nightly
2935
target: x86_64-unknown-linux-gnu
3036
profile: minimal
3137
components: rustfmt
32-
33-
- name: Checkout
34-
uses: actions/[email protected]
38+
default: true
3539

3640
# Run
3741
- name: Build

0 commit comments

Comments
 (0)