Skip to content

Commit 98d5e3b

Browse files
authored
ci: fix the toolchain actions (#278)
* ci: fix the toolchain actions * ci: fix windows
1 parent 0e21362 commit 98d5e3b

File tree

5 files changed

+60
-20
lines changed

5 files changed

+60
-20
lines changed

.github/workflows/benchmark.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ jobs:
2828
${{ github.job }}-Linux-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }}
2929
${{ github.job }}-Linux-${{ hashFiles('rust-toolchain') }}-
3030
31-
- uses: dtolnay/rust-toolchain@stable
32-
with:
33-
components: clippy
31+
- name: Install Rust
32+
shell: bash
33+
run: |
34+
installer=$(mktemp -d)/install-rustup
35+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
36+
bash $installer --default-toolchain $(cat rust-toolchain) -y
3437
3538
- name: Build pdu
3639
run: |

.github/workflows/clippy.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ jobs:
3535
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }}
3636
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-
3737
38-
- uses: dtolnay/rust-toolchain@stable
39-
with:
40-
components: clippy
38+
- name: Install Rust
39+
shell: bash
40+
run: |
41+
installer=$(mktemp -d)/install-rustup
42+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
43+
bash $installer --default-toolchain $(cat rust-toolchain) --component clippy -y
4144
4245
- name: Use clippy to lint code (dev)
4346
env:

.github/workflows/deploy.yaml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
- uses: dtolnay/rust-toolchain@stable
26-
with:
27-
components: clippy, rustfmt
25+
- name: Install Rust
26+
shell: bash
27+
run: |
28+
installer=$(mktemp -d)/install-rustup
29+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
30+
bash $installer --default-toolchain $(cat rust-toolchain) -y
2831
2932
- name: Test (dev)
3033
env:
@@ -63,7 +66,12 @@ jobs:
6366
steps:
6467
- uses: actions/checkout@v4
6568

66-
- uses: dtolnay/rust-toolchain@stable
69+
- name: Install Rust
70+
shell: bash
71+
run: |
72+
installer=$(mktemp -d)/install-rustup
73+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
74+
bash $installer --default-toolchain $(cat rust-toolchain) -y
6775
6876
- name: Install compilation target
6977
run: rustup target add ${{ matrix.target }}
@@ -95,7 +103,12 @@ jobs:
95103
steps:
96104
- uses: actions/checkout@v4
97105

98-
- uses: dtolnay/rust-toolchain@stable
106+
- name: Install Rust
107+
shell: bash
108+
run: |
109+
installer=$(mktemp -d)/install-rustup
110+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
111+
bash $installer --default-toolchain $(cat rust-toolchain) -y
99112
100113
- name: Install compilation target
101114
run: rustup target add ${{ matrix.target }}
@@ -127,7 +140,12 @@ jobs:
127140
steps:
128141
- uses: actions/checkout@v4
129142

130-
- uses: dtolnay/rust-toolchain@stable
143+
- name: Install Rust
144+
shell: bash
145+
run: |
146+
installer=$(mktemp -d)/install-rustup
147+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
148+
bash $installer --default-toolchain $(cat rust-toolchain) -y
131149
132150
- name: Install compilation target
133151
run: rustup target add ${{ matrix.target }}
@@ -378,7 +396,12 @@ jobs:
378396
steps:
379397
- uses: actions/checkout@v4
380398

381-
- uses: dtolnay/rust-toolchain@stable
399+
- name: Install Rust
400+
shell: bash
401+
run: |
402+
installer=$(mktemp -d)/install-rustup
403+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
404+
bash $installer --default-toolchain $(cat rust-toolchain) -y
382405
383406
- name: Login
384407
run: cargo login ${{ secrets.CRATE_AUTH_TOKEN }}
@@ -423,9 +446,12 @@ jobs:
423446
${{ github.job }}-Linux-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }}
424447
${{ github.job }}-Linux-${{ hashFiles('rust-toolchain') }}-
425448
426-
- uses: dtolnay/rust-toolchain@stable
427-
with:
428-
components: clippy
449+
- name: Install Rust
450+
shell: bash
451+
run: |
452+
installer=$(mktemp -d)/install-rustup
453+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
454+
bash $installer --default-toolchain $(cat rust-toolchain) -y
429455
430456
- name: Build pdu
431457
run: |

.github/workflows/fmt.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- uses: dtolnay/rust-toolchain@stable
17-
with:
18-
components: rustfmt
16+
- name: Install Rust
17+
shell: bash
18+
run: |
19+
installer=$(mktemp -d)/install-rustup
20+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
21+
bash $installer --default-toolchain $(cat rust-toolchain) --component rustfmt -y
1922
2023
- name: Check code formatting
2124
run: cargo fmt -- --check

.github/workflows/test.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ jobs:
3636
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }}
3737
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-
3838
39-
- uses: dtolnay/rust-toolchain@stable
39+
- name: Install Rust
40+
shell: bash
41+
run: |
42+
installer=$(mktemp -d)/install-rustup
43+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $installer
44+
bash $installer --default-toolchain $(cat rust-toolchain) -y
4045
4146
- name: Test (dev)
4247
env:

0 commit comments

Comments
 (0)