Skip to content

Commit db0f0ae

Browse files
authored
fix(ci): adjust xwin timeout and revert xwin jobs being disabled (#8187)
## Summary Reverts #8181 and #8182. The fix is in b849f0f, which extends the run timeout to allow xwin to download the Windows SDK files, which can take 10+ minutes. Closes rust-cross/cargo-xwin#127 ## Test Plan Existing CI should pass. ## Notes xwin jobs will take a long time the first time due to cache re-warming.
1 parent cc9767c commit db0f0ae

File tree

1 file changed

+36
-29
lines changed

1 file changed

+36
-29
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -108,30 +108,37 @@ jobs:
108108
- name: "Clippy"
109109
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
110110

111-
cargo-clippy-windows:
112-
timeout-minutes: 15
111+
cargo-clippy-xwin:
112+
# Do not set timeout below 15 minutes as uncached xwin Windows SDK download can take 10+ minutes
113+
timeout-minutes: 20
113114
needs: determine_changes
114115
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
115-
runs-on:
116-
labels: "windows-latest-xlarge"
116+
runs-on: ubuntu-latest
117117
name: "cargo clippy | windows"
118118
steps:
119119
- uses: actions/checkout@v4
120-
- uses: Swatinem/rust-cache@v2
121-
122-
- name: Create Dev Drive using ReFS
123-
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
124-
125-
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
126-
- name: Copy Git Repo to Dev Drive
127-
run: |
128-
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse
129-
120+
- name: Load xwin cache
121+
uses: actions/cache@v4
122+
with:
123+
path: "${{ github.workspace}}/.xwin"
124+
key: cargo-xwin-x86_64
125+
- name: Load rust cache
126+
uses: Swatinem/rust-cache@v2
127+
with:
128+
save-if: ${{ github.ref == 'refs/heads/main' }}
130129
- name: "Install Rust toolchain"
131-
run: rustup component add clippy
132-
130+
run: rustup target add x86_64-pc-windows-msvc
131+
- name: "Install cargo-xwin"
132+
uses: taiki-e/install-action@v2
133+
with:
134+
tool: cargo-xwin
135+
- name: Install xwin dependencies
136+
run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
133137
- name: "Clippy"
134-
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
138+
run: cargo xwin clippy --target x86_64-pc-windows-msvc --workspace --all-targets --all-features --locked --profile fast-build -- -D warnings
139+
env:
140+
XWIN_ARCH: "x86_64"
141+
XWIN_CACHE_DIR: "${{ github.workspace}}/.xwin"
135142

136143
cargo-dev-generate-all:
137144
timeout-minutes: 10
@@ -318,7 +325,8 @@ jobs:
318325
319326
# Separate jobs for the nightly crate
320327
windows-trampoline-check:
321-
timeout-minutes: 10
328+
# Do not set timeout below 15 minutes as uncached xwin Windows SDK download can take 10+ minutes
329+
timeout-minutes: 20
322330
needs: determine_changes
323331
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
324332
runs-on: ubuntu-latest
@@ -353,17 +361,16 @@ jobs:
353361
with:
354362
tool: cargo-xwin,cargo-bloat
355363

356-
# xwin is currently broken. See https://github.com/rust-cross/cargo-xwin/issues/127
357-
# - name: "Install xwin dependencies"
358-
# run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
359-
#
360-
# - name: "Clippy"
361-
# working-directory: ${{ github.workspace }}/crates/uv-trampoline
362-
# if: matrix.target-arch == 'x86_64'
363-
# run: cargo xwin clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings
364-
# env:
365-
# XWIN_ARCH: "x86_64"
366-
# XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
364+
- name: "Install xwin dependencies"
365+
run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
366+
367+
- name: "Clippy"
368+
working-directory: ${{ github.workspace }}/crates/uv-trampoline
369+
if: matrix.target-arch == 'x86_64'
370+
run: cargo xwin clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings
371+
env:
372+
XWIN_ARCH: "x86_64"
373+
XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
367374

368375
- name: "Bloat Check"
369376
working-directory: ${{ github.workspace }}/crates/uv-trampoline

0 commit comments

Comments
 (0)