Skip to content

Commit 0ba7a58

Browse files
committed
ci: use install-cargo-tool action with cargo install fallback
Replace all remaining taiki-e/install-action@v2 usages with the new install-cargo-tool composite action from windows-drivers-rs (PR #625). This adds automatic cargo install fallback when install-action silently fails on windows-11-arm runners under WoW64 arm64 emulation. For jobs that did not already sparse-checkout shared actions from windows-drivers-rs (machete in lint.yaml, taplo-fmt in code-formatting-check.yaml), add the checkout and copy steps.
1 parent ff8a63e commit 0ba7a58

3 files changed

Lines changed: 31 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102

103103
# Steps to use cargo-make to build and package drivers
104104
- name: Install Cargo Make
105-
uses: taiki-e/install-action@v2
105+
uses: ./.github/actions/install-cargo-tool
106106
with:
107107
tool: cargo-make
108108

.github/workflows/code-formatting-check.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,25 @@ jobs:
3636
- name: Checkout Repository
3737
uses: actions/checkout@v4
3838

39+
- name: Checkout windows-drivers-rs actions
40+
uses: actions/checkout@v4
41+
with:
42+
repository: microsoft/windows-drivers-rs
43+
ref: main
44+
path: _temp/windows-drivers-rs
45+
sparse-checkout: |
46+
.github/actions
47+
sparse-checkout-cone-mode: false
48+
49+
- name: Copy actions to workspace
50+
shell: pwsh
51+
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/
52+
3953
- name: Install Rust Toolchain (Stable)
4054
uses: dtolnay/rust-toolchain@stable
4155

4256
- name: Install taplo-cli
43-
uses: taiki-e/install-action@v2
57+
uses: ./.github/actions/install-cargo-tool
4458
with:
4559
tool: taplo-cli
4660

.github/workflows/lint.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,25 @@ jobs:
112112
- name: Checkout Repository
113113
uses: actions/checkout@v4
114114

115+
- name: Checkout windows-drivers-rs actions
116+
uses: actions/checkout@v4
117+
with:
118+
repository: microsoft/windows-drivers-rs
119+
ref: main
120+
path: _temp/windows-drivers-rs
121+
sparse-checkout: |
122+
.github/actions
123+
sparse-checkout-cone-mode: false
124+
125+
- name: Copy actions to workspace
126+
shell: pwsh
127+
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/
128+
115129
- name: Install Rust Toolchain
116130
uses: dtolnay/rust-toolchain@stable
117131

118132
- name: Install Cargo Machete
119-
uses: taiki-e/install-action@v2
133+
uses: ./.github/actions/install-cargo-tool
120134
with:
121135
tool: cargo-machete
122136

0 commit comments

Comments
 (0)