Skip to content

Commit 12a35c8

Browse files
authored
Merge pull request GitoxideLabs#2340 from EliahKagan/rustup
Replace `dtolnay/rust-toolchain` with manual `rustup`
2 parents 54f97ac + dec9954 commit 12a35c8

File tree

2 files changed

+43
-22
lines changed

2 files changed

+43
-22
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ jobs:
187187
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
188188
with:
189189
persist-credentials: false
190-
- uses: dtolnay/rust-toolchain@stable
190+
- name: Install Rust
191+
run: |
192+
rustup update stable
193+
rustup default stable
191194
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
192195
with:
193196
save-if: ${{ github.ref == 'refs/heads/main' }}
@@ -211,7 +214,10 @@ jobs:
211214
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
212215
with:
213216
persist-credentials: false
214-
- uses: dtolnay/rust-toolchain@stable
217+
- name: Install Rust
218+
run: |
219+
rustup update stable
220+
rustup default stable
215221
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
216222
with:
217223
save-if: ${{ github.ref == 'refs/heads/main' }}
@@ -239,7 +245,11 @@ jobs:
239245
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
240246
with:
241247
persist-credentials: false
242-
- uses: dtolnay/rust-toolchain@stable
248+
- name: Install Rust
249+
shell: bash
250+
run: |
251+
rustup update stable
252+
rustup default stable
243253
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
244254
with:
245255
save-if: ${{ github.ref == 'refs/heads/main' }}
@@ -297,7 +307,11 @@ jobs:
297307
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
298308
with:
299309
persist-credentials: false
300-
- uses: dtolnay/rust-toolchain@stable
310+
- name: Install Rust
311+
shell: bash
312+
run: |
313+
rustup update stable
314+
rustup default stable
301315
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
302316
with:
303317
save-if: ${{ github.ref == 'refs/heads/main' }}
@@ -408,9 +422,12 @@ jobs:
408422
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
409423
with:
410424
persist-credentials: false
411-
- uses: dtolnay/rust-toolchain@stable
412-
with:
413-
targets: ${{ env.TARGET }}
425+
- name: Install Rust
426+
shell: bash
427+
run: |
428+
rustup update stable
429+
rustup default stable
430+
rustup target add "$TARGET"
414431
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
415432
with:
416433
save-if: ${{ github.ref == 'refs/heads/main' }}
@@ -429,10 +446,11 @@ jobs:
429446
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
430447
with:
431448
persist-credentials: false
432-
- uses: dtolnay/rust-toolchain@master
433-
with:
434-
toolchain: stable
435-
components: clippy,rustfmt
449+
- name: Install Rust
450+
run: |
451+
rustup update stable
452+
rustup default stable
453+
rustup component add clippy rustfmt
436454
- uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3.0.0
437455
- name: Run cargo clippy
438456
run: just clippy -D warnings -A unknown-lints --no-deps

.github/workflows/release.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,12 @@ jobs:
248248
sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools
249249
250250
- name: Install Rust
251-
uses: dtolnay/rust-toolchain@master
252-
with:
253-
toolchain: ${{ matrix.rust }}
254-
targets: ${{ matrix.target }}
251+
env:
252+
RUST: ${{ matrix.rust }}
253+
run: |
254+
rustup update "$RUST"
255+
rustup default "$RUST"
256+
rustup target add "$TARGET"
255257
256258
- name: Use Cross
257259
if: matrix.os == 'ubuntu-latest'
@@ -539,24 +541,25 @@ jobs:
539541

540542
runs-on: ${{ matrix.os }}
541543

544+
env:
545+
RUST: ${{ matrix.rust }}
546+
TARGET: ${{ matrix.target }}
547+
542548
steps:
543549
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
544550
with:
545551
persist-credentials: false
546552
- name: Install Rust
547-
uses: dtolnay/rust-toolchain@master
548-
with:
549-
toolchain: ${{ matrix.rust }}
550-
targets: ${{ matrix.target }}
553+
run: |
554+
rustup update "$RUST"
555+
rustup default "$RUST"
556+
rustup target add "$TARGET"
551557
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
552558
with:
553559
msystem: MINGW${{ startsWith(matrix.target, 'i686-') && '32' || '64' }}
554560
pacboy: cc:p
555561
path-type: inherit
556562
- name: 'Installation from crates.io: gitoxide'
557-
env:
558-
RUST: ${{ matrix.rust }}
559-
TARGET: ${{ matrix.target }}
560563
run: |
561564
cargo +"$RUST" install --target "$TARGET" --no-default-features \
562565
--features max-pure --target-dir install-artifacts --debug --force gitoxide

0 commit comments

Comments
 (0)