From 0ba7a58f1ec55460e3822faa57d18318737dd1c2 Mon Sep 17 00:00:00 2001 From: Melvin Wang Date: Mon, 30 Mar 2026 19:43:38 -0700 Subject: [PATCH 1/2] 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. --- .github/workflows/build.yaml | 2 +- .github/workflows/code-formatting-check.yaml | 16 +++++++++++++++- .github/workflows/lint.yaml | 16 +++++++++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 75adf50..601c12d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -102,7 +102,7 @@ jobs: # Steps to use cargo-make to build and package drivers - name: Install Cargo Make - uses: taiki-e/install-action@v2 + uses: ./.github/actions/install-cargo-tool with: tool: cargo-make diff --git a/.github/workflows/code-formatting-check.yaml b/.github/workflows/code-formatting-check.yaml index 9578105..ecd962b 100644 --- a/.github/workflows/code-formatting-check.yaml +++ b/.github/workflows/code-formatting-check.yaml @@ -36,11 +36,25 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - name: Checkout windows-drivers-rs actions + uses: actions/checkout@v4 + with: + repository: microsoft/windows-drivers-rs + ref: main + path: _temp/windows-drivers-rs + sparse-checkout: | + .github/actions + sparse-checkout-cone-mode: false + + - name: Copy actions to workspace + shell: pwsh + run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/ + - name: Install Rust Toolchain (Stable) uses: dtolnay/rust-toolchain@stable - name: Install taplo-cli - uses: taiki-e/install-action@v2 + uses: ./.github/actions/install-cargo-tool with: tool: taplo-cli diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a3bacda..a8d6f21 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -112,11 +112,25 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - name: Checkout windows-drivers-rs actions + uses: actions/checkout@v4 + with: + repository: microsoft/windows-drivers-rs + ref: main + path: _temp/windows-drivers-rs + sparse-checkout: | + .github/actions + sparse-checkout-cone-mode: false + + - name: Copy actions to workspace + shell: pwsh + run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/ + - name: Install Rust Toolchain uses: dtolnay/rust-toolchain@stable - name: Install Cargo Machete - uses: taiki-e/install-action@v2 + uses: ./.github/actions/install-cargo-tool with: tool: cargo-machete From d4387fc55b31b68e4cc3a704d9b887cb310a02a7 Mon Sep 17 00:00:00 2001 From: Melvin Wang Date: Tue, 31 Mar 2026 13:58:53 -0700 Subject: [PATCH 2/2] ci: use pinned taplo-cli revision matching windows-drivers-rs The install-cargo-tool action assumes crate name == binary name, which breaks for taplo-cli (binary is taplo, not taplo-cli). Switch to cache-cargo-install-action with the same pinned revision (b673b44d) used by windows-drivers-rs, pending a taplo release with field-level keys matching support. --- .github/workflows/code-formatting-check.yaml | 26 ++++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/code-formatting-check.yaml b/.github/workflows/code-formatting-check.yaml index ecd962b..0860f17 100644 --- a/.github/workflows/code-formatting-check.yaml +++ b/.github/workflows/code-formatting-check.yaml @@ -36,27 +36,21 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Checkout windows-drivers-rs actions - uses: actions/checkout@v4 - with: - repository: microsoft/windows-drivers-rs - ref: main - path: _temp/windows-drivers-rs - sparse-checkout: | - .github/actions - sparse-checkout-cone-mode: false - - - name: Copy actions to workspace - shell: pwsh - run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/ - - name: Install Rust Toolchain (Stable) uses: dtolnay/rust-toolchain@stable - - name: Install taplo-cli - uses: ./.github/actions/install-cargo-tool + # Using cache-cargo-install-action to cache the compiled binary. + # Once taplo ships a release with field-level `keys` matching, this can + # be simplified back to install-action with a normal version pin. + - name: Install taplo-cli from pinned revision b673b44d + uses: taiki-e/cache-cargo-install-action@v3 with: tool: taplo-cli + git: https://github.com/tamasfe/taplo + rev: b673b44d + locked: true + env: + RUSTFLAGS: "" - run: taplo fmt --check --diff name: Check TOML files formatting