Skip to content

Commit 48cc5e1

Browse files
authored
ci: update Windows build pins with Renovate (#3049)
`setup-xwin` pins `cargo-xwin` and the Windows SDK without Renovate coverage, so updates require manual edits. Add Renovate managers for `cargo-xwin` and the SDK release. Update the SDK version and archive SHA-256 together. Derive the download URL and SDK cache key from these pins. Group these updates in one PR and set `automerge: false` to require review. Keep the `Clang 22` requirement explicit.
1 parent 8cf968a commit 48cc5e1

2 files changed

Lines changed: 47 additions & 4 deletions

File tree

‎.github/actions/setup-xwin/action.yml‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,25 @@ runs:
3434
- run: rustup target add x86_64-pc-windows-msvc
3535
shell: bash
3636

37+
- name: Set Windows build versions
38+
id: versions
39+
shell: bash
40+
run: |
41+
{
42+
echo "tools=${EXTRA_TOOLS:+$EXTRA_TOOLS,}cargo-xwin@$CARGO_XWIN_VERSION"
43+
echo "sysroot-version=$SYSROOT_VERSION"
44+
echo "sysroot-sha256=$SYSROOT_SHA256"
45+
} >> "$GITHUB_OUTPUT"
46+
env:
47+
EXTRA_TOOLS: ${{ inputs.tools }}
48+
# Renovate updates these pins. Keep the SDK version and checksum together.
49+
CARGO_XWIN_VERSION: '0.23.1'
50+
SYSROOT_VERSION: '2026-09-15'
51+
SYSROOT_SHA256: 6aeecd2d25bcc90c72af09dc525dfdf7143c374d476dc4296692d42efb27a9b9
52+
3753
- uses: taiki-e/install-action@ab6895351a88b908e96a4697860d4ffea5e57dbe # v2.87.27
3854
with:
39-
tool: ${{ inputs.tools != '' && format('{0},cargo-xwin@0.23.1', inputs.tools) || 'cargo-xwin@0.23.1' }}
55+
tool: ${{ steps.versions.outputs.tools }}
4056

4157
# A packaged sysroot avoids unpacking Microsoft's installer archives
4258
# on every cache miss. Keep the clang-cl compiler driver.
@@ -74,7 +90,7 @@ runs:
7490
~/.cache/cargo-xwin/windows-msvc-sysroot/include
7591
~/.cache/cargo-xwin/windows-msvc-sysroot/lib/x86_64-unknown-windows-msvc
7692
~/.cache/cargo-xwin/xwin
77-
key: cargo-xwin-sysroot-2026-09-15-clang-cl-22-x64-v1
93+
key: cargo-xwin-sysroot-${{ steps.versions.outputs.sysroot-version }}-${{ steps.versions.outputs.sysroot-sha256 }}-clang-cl-22-x64-v1
7894

7995
- name: Download pinned Windows SDK
8096
if: steps.sysroot-cache.outputs.cache-hit != 'true'
@@ -111,5 +127,5 @@ runs:
111127
# cargo-xwin uses this marker to reuse the verified SDK layout.
112128
printf 'x86_64\n' > "$xwin/DONE"
113129
env:
114-
SYSROOT_URL: https://github.com/trcrsired/windows-msvc-sysroot/releases/download/2026-09-15/windows-msvc-sysroot.tar.xz
115-
SYSROOT_SHA256: 6aeecd2d25bcc90c72af09dc525dfdf7143c374d476dc4296692d42efb27a9b9
130+
SYSROOT_URL: https://github.com/trcrsired/windows-msvc-sysroot/releases/download/${{ steps.versions.outputs.sysroot-version }}/windows-msvc-sysroot.tar.xz
131+
SYSROOT_SHA256: ${{ steps.versions.outputs.sysroot-sha256 }}

‎.github/renovate.json‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,36 @@
2020
"depNameTemplate": "voidzero-dev/setup-vp",
2121
"datasourceTemplate": "github-releases",
2222
"versioningTemplate": "semver-coerced"
23+
},
24+
{
25+
"description": "Update the cargo-xwin version used for Windows builds.",
26+
"customType": "regex",
27+
"managerFilePatterns": ["/^\\.github/actions/setup-xwin/action\\.yml$/"],
28+
"matchStrings": ["CARGO_XWIN_VERSION: '(?<currentValue>[^']+)'"],
29+
"depNameTemplate": "cargo-xwin",
30+
"datasourceTemplate": "crate"
31+
},
32+
{
33+
"description": "Update the Windows SDK release and its archive checksum together.",
34+
"customType": "regex",
35+
"managerFilePatterns": ["/^\\.github/actions/setup-xwin/action\\.yml$/"],
36+
"matchStrings": [
37+
"SYSROOT_VERSION: '(?<currentValue>\\d{4}-\\d{2}-\\d{2})'\\s+SYSROOT_SHA256: (?<currentDigest>[a-f0-9]{64})"
38+
],
39+
"depNameTemplate": "trcrsired/windows-msvc-sysroot",
40+
"datasourceTemplate": "github-release-attachments",
41+
"versioningTemplate": "regex:^(?<major>\\d{4})-(?<minor>\\d{2})-(?<patch>\\d{2})$"
2342
}
2443
],
2544
"packageRules": [
45+
{
46+
"description": "Require review for Windows SDK and cargo-xwin updates.",
47+
"matchManagers": ["custom.regex"],
48+
"matchFileNames": [".github/actions/setup-xwin/action.yml"],
49+
"matchPackageNames": ["cargo-xwin", "trcrsired/windows-msvc-sysroot"],
50+
"groupName": "Windows build toolchain",
51+
"automerge": false
52+
},
2653
{
2754
"description": "Ignore toolchain npm packages managed by .github/workflows/upgrade-deps.yml through upgrade-deps.ts and sync-remote. Official Vitest packages share the runner version; the independently versioned @vitest/browser-webdriverio remains enabled.",
2855
"matchManagers": ["npm"],

0 commit comments

Comments
 (0)