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 https://github.com/rust-cross/cargo-xwin/issues/127

## Test Plan

Existing CI should pass.

## Notes

xwin jobs will take a long time the first time due to cache re-warming.
This commit is contained in:
samypr100 2024-10-14 20:14:46 +00:00 committed by GitHub
parent cc9767ca1e
commit db0f0aec09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 36 additions and 29 deletions

View File

@ -108,30 +108,37 @@ jobs:
- name: "Clippy" - name: "Clippy"
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo-clippy-windows: cargo-clippy-xwin:
timeout-minutes: 15 # Do not set timeout below 15 minutes as uncached xwin Windows SDK download can take 10+ minutes
timeout-minutes: 20
needs: determine_changes needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }} if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: runs-on: ubuntu-latest
labels: "windows-latest-xlarge"
name: "cargo clippy | windows" name: "cargo clippy | windows"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2 - name: Load xwin cache
uses: actions/cache@v4
- name: Create Dev Drive using ReFS with:
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1 path: "${{ github.workspace}}/.xwin"
key: cargo-xwin-x86_64
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone... - name: Load rust cache
- name: Copy Git Repo to Dev Drive uses: Swatinem/rust-cache@v2
run: | with:
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Install Rust toolchain" - name: "Install Rust toolchain"
run: rustup component add clippy run: rustup target add x86_64-pc-windows-msvc
- name: "Install cargo-xwin"
uses: taiki-e/install-action@v2
with:
tool: cargo-xwin
- name: Install xwin dependencies
run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
- name: "Clippy" - name: "Clippy"
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings run: cargo xwin clippy --target x86_64-pc-windows-msvc --workspace --all-targets --all-features --locked --profile fast-build -- -D warnings
env:
XWIN_ARCH: "x86_64"
XWIN_CACHE_DIR: "${{ github.workspace}}/.xwin"
cargo-dev-generate-all: cargo-dev-generate-all:
timeout-minutes: 10 timeout-minutes: 10
@ -318,7 +325,8 @@ jobs:
# Separate jobs for the nightly crate # Separate jobs for the nightly crate
windows-trampoline-check: windows-trampoline-check:
timeout-minutes: 10 # Do not set timeout below 15 minutes as uncached xwin Windows SDK download can take 10+ minutes
timeout-minutes: 20
needs: determine_changes needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }} if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -353,17 +361,16 @@ jobs:
with: with:
tool: cargo-xwin,cargo-bloat tool: cargo-xwin,cargo-bloat
# xwin is currently broken. See https://github.com/rust-cross/cargo-xwin/issues/127 - name: "Install xwin dependencies"
# - name: "Install xwin dependencies" run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
# run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
# - name: "Clippy"
# - name: "Clippy" working-directory: ${{ github.workspace }}/crates/uv-trampoline
# working-directory: ${{ github.workspace }}/crates/uv-trampoline if: matrix.target-arch == 'x86_64'
# if: matrix.target-arch == 'x86_64' run: cargo xwin clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings
# run: cargo xwin clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings env:
# env: XWIN_ARCH: "x86_64"
# XWIN_ARCH: "x86_64" XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
# XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
- name: "Bloat Check" - name: "Bloat Check"
working-directory: ${{ github.workspace }}/crates/uv-trampoline working-directory: ${{ github.workspace }}/crates/uv-trampoline