Skip to content

Commit 9d333dc

Browse files
gaojiaqi7jyao1
authored andcommitted
ci: replace actions-rs/toolchain with dtolnay/rust-toolchain
`self-update` of rustup forced by `actions-rs/toolchain` causes failure on Windows. As action-rs/toolchain is not maintained, switch to dtolnay/rust-toolchain. Signed-off-by: Jiaqi Gao <[email protected]>
1 parent 48aef42 commit 9d333dc

8 files changed

+23
-79
lines changed

.github/workflows/devtools.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,14 @@ jobs:
4242
submodules: recursive
4343

4444
- name: Install stable toolchain
45-
uses: actions-rs/toolchain@v1
45+
uses: dtolnay/rust-toolchain@master
4646
with:
47-
profile: ${{ env.TOOLCHAIN_PROFILE }}
4847
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
49-
override: true
5048

5149
- name: Install nightly toolchain
52-
uses: actions-rs/toolchain@v1
50+
uses: dtolnay/rust-toolchain@master
5351
with:
54-
profile: ${{ env.TOOLCHAIN_PROFILE }}
5552
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
56-
override: true
5753

5854
- name: Preparation work
5955
run: make preparation

.github/workflows/format.yml

+4-13
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ jobs:
2828
uses: ilammy/setup-nasm@v1
2929

3030
- name: Install toolchain with clippy available
31-
uses: actions-rs/toolchain@v1
31+
uses: dtolnay/rust-toolchain@master
3232
with:
33-
profile: minimal
3433
toolchain: nightly-2023-12-31
35-
override: true
3634
components: clippy
3735

3836
- name: Add target
@@ -65,23 +63,16 @@ jobs:
6563
submodules: recursive
6664

6765
- name: Install toolchain with rustfmt available
68-
uses: actions-rs/toolchain@v1
66+
uses: dtolnay/rust-toolchain@master
6967
with:
70-
profile: minimal
7168
toolchain: nightly-2023-12-31
72-
override: true
7369
components: rustfmt
7470

7571
- name: Preparation Work
7672
run: make preparation
7773

7874
- name: Run cargo check
79-
uses: actions-rs/cargo@v1
80-
with:
81-
command: check
75+
run: cargo check
8276

8377
- name: Run cargo fmt
84-
uses: actions-rs/cargo@v1
85-
with:
86-
command: fmt
87-
args: --all -- --check
78+
run: cargo fmt --all -- --check

.github/workflows/fuzz.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,22 @@ jobs:
3131
- uses: actions/checkout@v4
3232
with:
3333
submodules: recursive
34-
- uses: actions-rs/toolchain@v1
34+
- uses: dtolnay/rust-toolchain@stable
3535
with:
36-
profile: minimal
37-
override: true
3836
components: rust-src, llvm-tools-preview
3937

4038
- name: Run cargo install cargo-xbuild
41-
uses: actions-rs/cargo@v1
42-
with:
43-
command: install
44-
args: cargo-xbuild
39+
run: cargo install cargo-xbuild
4540

4641
- name: install NASM
4742
uses: ilammy/setup-nasm@v1
4843

4944
- name: Install AFL (Linux)
50-
uses: actions-rs/cargo@v1
51-
with:
52-
command: install
53-
args: cargo-afl
45+
run: cargo install cargo-afl
5446
if: runner.os == 'Linux'
5547

5648
- name: Install Cargo-Fuzz (Linux)
57-
uses: actions-rs/cargo@v1
58-
with:
59-
command: install
60-
args: cargo-fuzz
49+
run: cargo install cargo-fuzz
6150
if: runner.os == 'Linux'
6251

6352
- name: Preparation work

.github/workflows/integration-tdx.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ jobs:
3737
run: bash sh_script/update_toolchain.sh ${{ env.RUST_TOOLCHAIN }}
3838

3939
- name: Run cargo install cargo-xbuild
40-
uses: actions-rs/cargo@v1
41-
with:
42-
command: install
43-
args: cargo-xbuild
40+
run: cargo install cargo-xbuild
4441

4542
- name: Preparation Work
4643
run: bash sh_script/preparation.sh

.github/workflows/integration.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,13 @@ jobs:
4242
submodules: recursive
4343

4444
- name: Install toolchain
45-
uses: actions-rs/toolchain@v1
45+
uses: dtolnay/rust-toolchain@master
4646
with:
47-
profile: ${{ env.TOOLCHAIN_PROFILE }}
4847
toolchain: ${{ env.RUST_TOOLCHAIN }}
49-
override: true
5048
components: rust-src, llvm-tools-preview
5149

5250
- name: Run cargo install cargo-xbuild
53-
uses: actions-rs/cargo@v1
54-
with:
55-
command: install
56-
args: cargo-xbuild
51+
run: cargo install cargo-xbuild
5752

5853
# install QEMU
5954
- name: Install QEMU (Linux)

.github/workflows/library.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,14 @@ jobs:
3838
uses: ilammy/setup-nasm@v1
3939

4040
- name: Install stable toolchain
41-
uses: actions-rs/toolchain@v1
41+
uses: dtolnay/rust-toolchain@master
4242
with:
43-
profile: ${{ env.TOOLCHAIN_PROFILE }}
4443
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
45-
override: true
4644

4745
- name: Install nightly toolchain
48-
uses: actions-rs/toolchain@v1
46+
uses: dtolnay/rust-toolchain@master
4947
with:
50-
profile: ${{ env.TOOLCHAIN_PROFILE }}
5148
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
52-
override: true
5349

5450
- name: Checkout sources
5551
uses: actions/checkout@v4
@@ -87,18 +83,14 @@ jobs:
8783
uses: ilammy/setup-nasm@v1
8884

8985
- name: Install stable toolchain
90-
uses: actions-rs/toolchain@v1
86+
uses: dtolnay/rust-toolchain@master
9187
with:
92-
profile: ${{ env.TOOLCHAIN_PROFILE }}
9388
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
94-
override: true
9589

9690
- name: Install nightly toolchain
97-
uses: actions-rs/toolchain@v1
91+
uses: dtolnay/rust-toolchain@master
9892
with:
99-
profile: ${{ env.TOOLCHAIN_PROFILE }}
10093
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
101-
override: true
10294

10395
- name: Checkout sources
10496
uses: actions/checkout@v4

.github/workflows/main.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,13 @@ jobs:
4646
submodules: recursive
4747

4848
- name: Install toolchain
49-
uses: actions-rs/toolchain@v1
49+
uses: dtolnay/rust-toolchain@master
5050
with:
51-
profile: ${{ env.TOOLCHAIN_PROFILE }}
5251
toolchain: ${{ env.RUST_TOOLCHAIN }}
53-
override: true
5452
components: rust-src
5553

5654
- name: Run cargo install cargo-xbuild
57-
uses: actions-rs/cargo@v1
58-
with:
59-
command: install
60-
args: cargo-xbuild
55+
run: cargo install cargo-xbuild
6156

6257
- name: Preparation Work
6358
run: bash sh_script/preparation.sh
@@ -66,16 +61,10 @@ jobs:
6661
run: make test
6762

6863
- name: Build Release TdShim
69-
uses: actions-rs/cargo@v1
70-
with:
71-
command: xbuild
72-
args: -p td-shim --target x86_64-unknown-none --release --features=main,tdx
64+
run: cargo xbuild -p td-shim --target x86_64-unknown-none --release --features=main,tdx
7365

7466
- name: Build Debug TdShim
75-
uses: actions-rs/cargo@v1
76-
with:
77-
command: xbuild
78-
args: -p td-shim --target x86_64-unknown-none --features=main,tdx --no-default-features
67+
run: cargo xbuild -p td-shim --target x86_64-unknown-none --features=main,tdx --no-default-features
7968

8069
- name: Build td-shim-tools
8170
run: |

.github/workflows/release.yaml

+2-7
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,13 @@ jobs:
2828
submodules: recursive
2929

3030
- name: Install toolchain
31-
uses: actions-rs/toolchain@v1
31+
uses: dtolnay/rust-toolchain@master
3232
with:
33-
profile: ${{ env.TOOLCHAIN_PROFILE }}
3433
toolchain: ${{ env.RUST_TOOLCHAIN }}
35-
override: true
3634
components: rust-src
3735

3836
- name: Run cargo install cargo-xbuild
39-
uses: actions-rs/cargo@v1
40-
with:
41-
command: install
42-
args: cargo-xbuild
37+
run: cargo install cargo-xbuild
4338

4439
- name: Preparation Work
4540
run: make preparation

0 commit comments

Comments
 (0)