Skip to content

Commit 74c2b89

Browse files
committed
ci: update ci workflow to use rustup instead of actions-rs/toolchain@v1
1 parent 7e70d8a commit 74c2b89

1 file changed

Lines changed: 25 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ jobs:
2929
uses: actions/checkout@v4
3030

3131
- name: Install Rust ${{ matrix.rust }}
32-
uses: dtolnay/rust-toolchain@stable
33-
with:
34-
toolchain: ${{ matrix.rust }}
35-
components: rustfmt, clippy
32+
run: |
33+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ matrix.rust }}
34+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
35+
rustup toolchain install ${{ matrix.rust }} --component rustfmt --component clippy --profile minimal --no-self-update
36+
rustup default ${{ matrix.rust }}
3637
3738
- name: Cache dependencies
3839
uses: actions/cache@v4
@@ -63,10 +64,11 @@ jobs:
6364
uses: actions/checkout@v4
6465

6566
- name: Install Rust
66-
uses: dtolnay/rust-toolchain@stable
67-
with:
68-
toolchain: stable
69-
components: clippy
67+
run: |
68+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
69+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
70+
rustup toolchain install stable --component clippy --profile minimal --no-self-update
71+
rustup default stable
7072
7173
- name: Cache dependencies
7274
uses: actions/cache@v4
@@ -93,10 +95,11 @@ jobs:
9395
uses: actions/checkout@v4
9496

9597
- name: Install Rust
96-
uses: dtolnay/rust-toolchain@stable
97-
with:
98-
toolchain: stable
99-
components: rustfmt
98+
run: |
99+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
100+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
101+
rustup toolchain install stable --component rustfmt --profile minimal --no-self-update
102+
rustup default stable
100103
101104
- name: Check formatting
102105
run: cargo fmt -- --check
@@ -109,9 +112,11 @@ jobs:
109112
uses: actions/checkout@v4
110113

111114
- name: Install Rust
112-
uses: dtolnay/rust-toolchain@stable
113-
with:
114-
toolchain: stable
115+
run: |
116+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
117+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
118+
rustup toolchain install stable --profile minimal --no-self-update
119+
rustup default stable
115120
116121
- name: Cache dependencies
117122
uses: actions/cache@v4
@@ -138,9 +143,11 @@ jobs:
138143
uses: actions/checkout@v4
139144

140145
- name: Install Rust
141-
uses: dtolnay/rust-toolchain@stable
142-
with:
143-
toolchain: stable
146+
run: |
147+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
148+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
149+
rustup toolchain install stable --profile minimal --no-self-update
150+
rustup default stable
144151
145152
- name: Install cargo-audit
146153
run: cargo install cargo-audit

0 commit comments

Comments
 (0)