Skip to content

Commit 76bcb89

Browse files
authored
Use native Windows runner for trampoline checks (#8469)
As in #8182 and #8468
1 parent 2f6fa08 commit 76bcb89

File tree

1 file changed

+24
-28
lines changed

1 file changed

+24
-28
lines changed

.github/workflows/ci.yml

+24-28
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,10 @@ jobs:
322322
323323
# Separate jobs for the nightly crate
324324
windows-trampoline-check:
325-
# Do not set timeout below 15 minutes as uncached xwin Windows SDK download can take 10+ minutes
326-
timeout-minutes: 20
325+
timeout-minutes: 15
327326
needs: determine_changes
328327
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
329-
runs-on: ubuntu-latest
328+
runs-on: windows-latest-xlarge
330329
name: "check windows trampoline | ${{ matrix.target-arch }}"
331330
strategy:
332331
fail-fast: false
@@ -335,50 +334,47 @@ jobs:
335334
steps:
336335
- uses: actions/checkout@v4
337336

338-
- name: Load xwin cache
339-
uses: actions/cache@v4
340-
with:
341-
path: "${{ github.workspace }}/.xwin"
342-
key: cargo-xwin-${{ matrix.target-arch }}
337+
- name: Create Dev Drive using ReFS
338+
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
343339

344-
- uses: rui314/setup-mold@v1
340+
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
341+
- name: Copy Git Repo to Dev Drive
342+
run: |
343+
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse
345344
346345
- uses: Swatinem/rust-cache@v2
347346
with:
348-
workspaces: ${{ github.workspace }}/crates/uv-trampoline
347+
workspaces: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
349348

350349
- name: "Install Rust toolchain"
351-
working-directory: ${{ github.workspace }}/crates/uv-trampoline
350+
working-directory: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
352351
run: |
353352
rustup target add ${{ matrix.target-arch }}-pc-windows-msvc
354353
rustup component add rust-src --target ${{ matrix.target-arch }}-pc-windows-msvc
355354
356-
- name: "Install cargo-xwin and cargo-bloat"
355+
- name: "Install cargo-bloat"
357356
uses: taiki-e/install-action@v2
358357
with:
359-
tool: cargo-xwin,cargo-bloat
360-
361-
- name: "Install xwin dependencies"
362-
run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
358+
tool: cargo-bloat
363359

364360
- name: "Clippy"
365-
working-directory: ${{ github.workspace }}/crates/uv-trampoline
361+
working-directory: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
366362
if: matrix.target-arch == 'x86_64'
367-
run: cargo xwin clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings
368-
env:
369-
XWIN_ARCH: "x86_64"
370-
XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
363+
run: cargo clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings
371364

372365
- name: "Bloat Check"
373-
working-directory: ${{ github.workspace }}/crates/uv-trampoline
366+
working-directory: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
374367
if: matrix.target-arch == 'x86_64'
375368
run: |
376-
cargo xwin bloat --release --target x86_64-pc-windows-msvc | \
377-
grep -v -i -E 'core::fmt::write|core::fmt::getcount' | \
378-
grep -q -E 'core::fmt|std::panicking|std::backtrace_rs' && exit 1 || exit 0
379-
env:
380-
XWIN_ARCH: "x86_64"
381-
XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
369+
$output = cargo bloat --release --target x86_64-pc-windows-msvc
370+
$filteredOutput = $output | Select-String -Pattern 'core::fmt::write|core::fmt::getcount' -NotMatch
371+
$containsPatterns = $filteredOutput | Select-String -Pattern 'core::fmt|std::panicking|std::backtrace_rs'
372+
373+
if ($containsPatterns) {
374+
Exit 1
375+
} else {
376+
Exit 0
377+
}
382378
383379
# Separate jobs for the nightly crate
384380
windows-trampoline-test:

0 commit comments

Comments
 (0)