Skip to content

Commit 4ad9185

Browse files
committed
Auto merge of rust-lang#12764 - matklad:rustupaction, r=lnicola
Remove deprecate action https://old.reddit.com/r/rust/comments/vyx4oj/actionsrs_organization_became_unmaintained/ Looking at this holistically, I don't fully understand *why* we need an action here? Seems like we can just use rustup? nowadays github runners come with rustup pre-installed.
2 parents 029184d + b49f2a2 commit 4ad9185

File tree

5 files changed

+16
-66
lines changed

5 files changed

+16
-66
lines changed

.github/workflows/ci.yaml

+6-22
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,10 @@ jobs:
3737
ref: ${{ github.event.pull_request.head.sha }}
3838
fetch-depth: 20
3939

40-
# We need to disable the existing toolchain to avoid updating rust-docs
41-
# which takes a long time. The fastest way to do this is to rename the
42-
# existing folder, as deleting it takes about as much time as not doing
43-
# anything and just updating rust-docs.
44-
- name: Rename existing rust toolchain (Windows)
45-
if: matrix.os == 'windows-latest'
46-
run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
47-
4840
- name: Install Rust toolchain
49-
uses: actions-rs/toolchain@v1
50-
with:
51-
toolchain: stable
52-
profile: minimal
53-
override: true
54-
components: rustfmt, rust-src
41+
run: |
42+
rustup update stable
43+
rustup component add rustfmt rust-src
5544
5645
- name: Cache Dependencies
5746
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
@@ -79,14 +68,9 @@ jobs:
7968
uses: actions/checkout@v3
8069

8170
- name: Install Rust toolchain
82-
uses: actions-rs/toolchain@v1
83-
with:
84-
toolchain: stable
85-
profile: minimal
86-
override: true
87-
88-
- name: Install Rust targets
89-
run: rustup target add ${{ env.targets }} ${{ env.targets_ide }}
71+
run: |
72+
rustup update stable
73+
rustup target add ${{ env.targets }} ${{ env.targets_ide }}
9074
9175
- name: Cache Dependencies
9276
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72

.github/workflows/metrics.yaml

+3-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ jobs:
2020
uses: actions/checkout@v3
2121

2222
- name: Install Rust toolchain
23-
uses: actions-rs/toolchain@v1
24-
with:
25-
toolchain: stable
26-
profile: minimal
27-
override: true
28-
components: rust-src
23+
run: |
24+
rustup update stable
25+
rustup component add rustfmt rust-src
2926
3027
- name: Collect metrics
3128
run: cargo xtask metrics

.github/workflows/publish.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,10 @@ jobs:
2020
fetch-depth: 0
2121

2222
- name: Install Rust toolchain
23-
uses: actions-rs/toolchain@v1
24-
with:
25-
toolchain: stable
26-
profile: minimal
27-
override: true
23+
run: rustup update stable
2824

2925
- name: Install cargo-workspaces
30-
uses: actions-rs/install@v0.1
31-
with:
32-
crate: cargo-workspaces
26+
run: cargo install cargo-workspaces
3327

3428
- name: Release
3529
env:

.github/workflows/release.yaml

+4-24
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,11 @@ jobs:
5555
with:
5656
fetch-depth: ${{ env.FETCH_DEPTH }}
5757

58-
# We need to disable the existing toolchain to avoid updating rust-docs
59-
# which takes a long time. The fastest way to do this is to rename the
60-
# existing folder, as deleting it takes about as much time as not doing
61-
# anything and just updating rust-docs.
62-
- name: Rename existing Rust toolchain
63-
if: matrix.os == 'windows-latest'
64-
run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
65-
6658
- name: Install Rust toolchain
67-
uses: actions-rs/toolchain@v1
68-
with:
69-
toolchain: stable
70-
target: ${{ matrix.target }}
71-
profile: minimal
72-
override: true
73-
74-
- name: Install Rust library source
75-
if: matrix.target == 'x86_64-unknown-linux-gnu'
76-
uses: actions-rs/toolchain@v1
77-
with:
78-
toolchain: stable
79-
target: ${{ matrix.target }}
80-
profile: minimal
81-
override: true
82-
components: rust-src
59+
run: |
60+
rustup update stable
61+
rustup target add ${{ matrix.target }}
62+
rustup component add rust-src
8363
8464
- name: Install Node.js
8565
uses: actions/setup-node@v1

.github/workflows/rustdoc.yaml

+1-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ jobs:
2020
uses: actions/checkout@v3
2121

2222
- name: Install Rust toolchain
23-
uses: actions-rs/toolchain@v1
24-
with:
25-
toolchain: stable
26-
profile: minimal
27-
override: true
28-
components: rustfmt, rust-src
23+
run: rustup update stable
2924

3025
- name: Build Documentation
3126
run: cargo doc --all --no-deps

0 commit comments

Comments
 (0)