Skip to content

Commit 027c3f5

Browse files
Add Windows aarch64 build and test job to CI
Based on discussion in #10306, this adds building aarch64 exe using x86 runner. See: #10402 (comment) Addresses: #1141 --------- Co-authored-by: Zanie Blue <[email protected]>
1 parent ba42467 commit 027c3f5

File tree

1 file changed

+120
-37
lines changed

1 file changed

+120
-37
lines changed

.github/workflows/ci.yml

+120-37
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,12 @@ jobs:
481481
./target/debug/uvx
482482
retention-days: 1
483483

484-
build-binary-windows:
484+
build-binary-windows-x86_64:
485485
needs: determine_changes
486486
timeout-minutes: 10
487487
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
488488
runs-on: windows-latest
489-
name: "build binary | windows"
489+
name: "build binary | windows x86_64"
490490
steps:
491491
- uses: actions/checkout@v4
492492

@@ -509,12 +509,50 @@ jobs:
509509
- name: "Upload binary"
510510
uses: actions/upload-artifact@v4
511511
with:
512-
name: uv-windows-${{ github.sha }}
512+
name: uv-windows-x86_64-${{ github.sha }}
513513
path: |
514514
${{ env.UV_WORKSPACE }}/target/debug/uv.exe
515515
${{ env.UV_WORKSPACE }}/target/debug/uvx.exe
516516
retention-days: 1
517517

518+
build-binary-windows-aarch64:
519+
needs: determine_changes
520+
timeout-minutes: 25
521+
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
522+
runs-on:
523+
labels: windows-latest
524+
name: "build binary | windows aarch64"
525+
steps:
526+
- uses: actions/checkout@v4
527+
528+
- name: Create Dev Drive using ReFS
529+
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
530+
531+
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
532+
- name: Copy Git Repo to Dev Drive
533+
run: |
534+
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse
535+
536+
- uses: Swatinem/rust-cache@v2
537+
with:
538+
workspaces: ${{ env.UV_WORKSPACE }}
539+
540+
- name: "Install cross target"
541+
run: rustup target add aarch64-pc-windows-msvc
542+
543+
- name: "Build"
544+
working-directory: ${{ env.UV_WORKSPACE }}
545+
run: cargo build --target aarch64-pc-windows-msvc
546+
547+
- name: "Upload binary"
548+
uses: actions/upload-artifact@v4
549+
with:
550+
name: uv-windows-aarch64-${{ github.sha }}
551+
path: |
552+
${{ env.UV_WORKSPACE }}/target/aarch64-pc-windows-msvc/debug/uv.exe
553+
${{ env.UV_WORKSPACE }}/target/aarch64-pc-windows-msvc/debug/uvx.exe
554+
retention-days: 1
555+
518556
cargo-build-msrv:
519557
name: "cargo build (msrv)"
520558
needs: determine_changes
@@ -667,16 +705,36 @@ jobs:
667705
eval "$(./uv generate-shell-completion bash)"
668706
eval "$(./uvx --generate-shell-completion bash)"
669707
670-
smoke-test-windows:
708+
smoke-test-windows-x86_64:
671709
timeout-minutes: 10
672-
needs: build-binary-windows
673-
name: "smoke test | windows"
710+
needs: build-binary-windows-x86_64
711+
name: "smoke test | windows x86_64"
674712
runs-on: windows-latest
675713
steps:
676714
- name: "Download binary"
677715
uses: actions/download-artifact@v4
678716
with:
679-
name: uv-windows-${{ github.sha }}
717+
name: uv-windows-x86_64-${{ github.sha }}
718+
719+
- name: "Smoke test"
720+
working-directory: ${{ env.UV_WORKSPACE }}
721+
run: |
722+
./uv venv -v
723+
./uv pip install ruff -v
724+
./uvx -v ruff --version
725+
(& ./uv generate-shell-completion powershell) | Out-String | Invoke-Expression
726+
(& ./uvx --generate-shell-completion powershell) | Out-String | Invoke-Expression
727+
728+
smoke-test-windows-aarch64:
729+
timeout-minutes: 10
730+
needs: build-binary-windows-aarch64
731+
name: "smoke test | windows aarch64"
732+
runs-on: github-windows-11-aarch64-4
733+
steps:
734+
- name: "Download binary"
735+
uses: actions/download-artifact@v4
736+
with:
737+
name: uv-windows-aarch64-${{ github.sha }}
680738

681739
- name: "Smoke test"
682740
working-directory: ${{ env.UV_WORKSPACE }}
@@ -816,17 +874,17 @@ jobs:
816874
run: |
817875
./uv pip install -v anyio
818876
819-
integration-test-free-threaded-windows:
877+
integration-test-free-threaded-windows-x86_64:
820878
timeout-minutes: 10
821-
needs: build-binary-windows
879+
needs: build-binary-windows-x86_64
822880
name: "integration test | free-threaded on windows"
823881
runs-on: windows-latest
824882

825883
steps:
826884
- name: "Download binary"
827885
uses: actions/download-artifact@v4
828886
with:
829-
name: uv-windows-${{ github.sha }}
887+
name: uv-windows-x86_64-${{ github.sha }}
830888

831889
- name: "Install free-threaded Python via uv"
832890
run: |
@@ -925,17 +983,17 @@ jobs:
925983
run: |
926984
./uv pip install anyio
927985
928-
integration-test-pypy-windows:
986+
integration-test-pypy-windows-x86_64:
929987
timeout-minutes: 10
930-
needs: build-binary-windows
988+
needs: build-binary-windows-x86_64
931989
name: "integration test | pypy on windows"
932990
runs-on: windows-latest
933991

934992
steps:
935993
- name: "Download binary"
936994
uses: actions/download-artifact@v4
937995
with:
938-
name: uv-windows-${{ github.sha }}
996+
name: uv-windows-x86_64-${{ github.sha }}
939997

940998
- name: "Install PyPy"
941999
run: .\uv.exe python install pypy3.9
@@ -982,6 +1040,9 @@ jobs:
9821040
& .venv\Scripts\python.exe --version
9831041
9841042
- name: "Check install"
1043+
env:
1044+
# Avoid debug build stack overflows.
1045+
UV_STACK_SIZE: 3000000 # 3 megabyte, triple the default on windows
9851046
run: |
9861047
.\uv.exe pip install anyio
9871048
@@ -1054,9 +1115,9 @@ jobs:
10541115
run: |
10551116
./uv pip install anyio
10561117
1057-
integration-test-graalpy-windows:
1118+
integration-test-graalpy-windows-x86_64:
10581119
timeout-minutes: 10
1059-
needs: build-binary-windows
1120+
needs: build-binary-windows-x86_64
10601121
name: "integration test | graalpy on windows"
10611122
runs-on: windows-latest
10621123

@@ -1068,7 +1129,7 @@ jobs:
10681129
- name: "Download binary"
10691130
uses: actions/download-artifact@v4
10701131
with:
1071-
name: uv-windows-${{ github.sha }}
1132+
name: uv-windows-x86_64-${{ github.sha }}
10721133

10731134
- name: Graalpy info
10741135
run: Get-Command graalpy
@@ -1111,6 +1172,9 @@ jobs:
11111172
& .venv\Scripts\python.exe --version
11121173
11131174
- name: "Check install"
1175+
env:
1176+
# Avoid debug build stack overflows.
1177+
UV_STACK_SIZE: 3000000 # 3 megabyte, triple the default on windows
11141178
run: |
11151179
.\uv.exe pip install anyio
11161180
@@ -1574,7 +1638,7 @@ jobs:
15741638
system-test-macos-x86_64:
15751639
timeout-minutes: 10
15761640
needs: build-binary-macos-x86_64
1577-
name: "check system | python on macos x86_64"
1641+
name: "check system | python on macos x86-64"
15781642
runs-on: macos-13 # github-macos-13-x86_64-4
15791643
steps:
15801644
- uses: actions/checkout@v4
@@ -1599,8 +1663,8 @@ jobs:
15991663

16001664
system-test-windows-python-310:
16011665
timeout-minutes: 10
1602-
needs: build-binary-windows
1603-
name: "check system | python3.10 on windows"
1666+
needs: build-binary-windows-x86_64
1667+
name: "check system | python3.10 on windows x86-64"
16041668
runs-on: windows-latest
16051669
steps:
16061670
- uses: actions/checkout@v4
@@ -1612,17 +1676,17 @@ jobs:
16121676
- name: "Download binary"
16131677
uses: actions/download-artifact@v4
16141678
with:
1615-
name: uv-windows-${{ github.sha }}
1679+
name: uv-windows-x86_64-${{ github.sha }}
16161680

16171681
- name: "Print Python path"
16181682
run: echo $(which python)
16191683

16201684
- name: "Validate global Python install"
16211685
run: py -3.10 ./scripts/check_system_python.py --uv ./uv.exe
16221686

1623-
system-test-windows-x86-python-310:
1687+
system-test-windows-x86_64-python-310:
16241688
timeout-minutes: 10
1625-
needs: build-binary-windows
1689+
needs: build-binary-windows-x86_64
16261690
name: "check system | python3.10 on windows x86"
16271691
runs-on: windows-latest
16281692
steps:
@@ -1636,18 +1700,18 @@ jobs:
16361700
- name: "Download binary"
16371701
uses: actions/download-artifact@v4
16381702
with:
1639-
name: uv-windows-${{ github.sha }}
1703+
name: uv-windows-x86_64-${{ github.sha }}
16401704

16411705
- name: "Print Python path"
16421706
run: echo $(which python)
16431707

16441708
- name: "Validate global Python install"
16451709
run: python ./scripts/check_system_python.py --uv ./uv.exe
16461710

1647-
system-test-windows-python-313:
1711+
system-test-windows-x86_64-python-313:
16481712
timeout-minutes: 10
1649-
needs: build-binary-windows
1650-
name: "check system | python3.13 on windows"
1713+
needs: build-binary-windows-x86_64
1714+
name: "check system | python3.13 on windows x86-64"
16511715
runs-on: windows-latest
16521716
steps:
16531717
- uses: actions/checkout@v4
@@ -1661,7 +1725,7 @@ jobs:
16611725
- name: "Download binary"
16621726
uses: actions/download-artifact@v4
16631727
with:
1664-
name: uv-windows-${{ github.sha }}
1728+
name: uv-windows-x86_64-${{ github.sha }}
16651729

16661730
- name: "Print Python path"
16671731
run: echo $(which python)
@@ -1671,7 +1735,7 @@ jobs:
16711735

16721736
system-test-choco:
16731737
timeout-minutes: 10
1674-
needs: build-binary-windows
1738+
needs: build-binary-windows-x86_64
16751739
name: "check system | python3.12 via chocolatey"
16761740
runs-on: windows-latest
16771741
steps:
@@ -1683,7 +1747,7 @@ jobs:
16831747
- name: "Download binary"
16841748
uses: actions/download-artifact@v4
16851749
with:
1686-
name: uv-windows-${{ github.sha }}
1750+
name: uv-windows-x86_64-${{ github.sha }}
16871751

16881752
- name: "Print Python path"
16891753
run: echo $(which python3)
@@ -1762,18 +1826,37 @@ jobs:
17621826
system-test-conda:
17631827
timeout-minutes: 10
17641828
needs:
1765-
[build-binary-windows, build-binary-macos-aarch64, build-binary-linux]
1766-
name: check system | conda${{ matrix.python-version }} on ${{ matrix.os }}
1829+
[
1830+
build-binary-windows-x86_64,
1831+
build-binary-macos-aarch64,
1832+
build-binary-linux,
1833+
]
1834+
name: check system | conda${{ matrix.python-version }} on ${{ matrix.os }} {{ matrix.arch }}
17671835
runs-on: ${{ matrix.runner }}
17681836
strategy:
17691837
fail-fast: false
17701838
matrix:
17711839
os: ["linux", "windows", "macos"]
17721840
python-version: ["3.8", "3.11"]
17731841
include:
1774-
- { os: "linux", target: "linux", runner: "ubuntu-latest" }
1775-
- { os: "windows", target: "windows", runner: "windows-latest" }
1776-
- { os: "macos", target: "macos-aarch64", runner: "macos-14" }
1842+
- {
1843+
os: "linux",
1844+
target: "linux",
1845+
runner: "ubuntu-latest",
1846+
arch: "x86-64",
1847+
}
1848+
- {
1849+
os: "windows",
1850+
target: "windows-x86_64",
1851+
runner: "windows-latest",
1852+
arch: "x86-64",
1853+
}
1854+
- {
1855+
os: "macos",
1856+
target: "macos-aarch64",
1857+
runner: "macos-14",
1858+
arch: "aarch64",
1859+
}
17771860
steps:
17781861
- uses: actions/checkout@v4
17791862

@@ -1839,16 +1922,16 @@ jobs:
18391922

18401923
system-test-windows-embedded-python-310:
18411924
timeout-minutes: 10
1842-
needs: build-binary-windows
1843-
name: "check system | embedded python3.10 on windows"
1925+
needs: build-binary-windows-x86_64
1926+
name: "check system | embedded python3.10 on windows x86-64"
18441927
runs-on: windows-latest
18451928
steps:
18461929
- uses: actions/checkout@v4
18471930

18481931
- name: "Download binary"
18491932
uses: actions/download-artifact@v4
18501933
with:
1851-
name: uv-windows-${{ github.sha }}
1934+
name: uv-windows-x86_64-${{ github.sha }}
18521935

18531936
# Download embedded Python.
18541937
- name: "Download embedded Python"

0 commit comments

Comments
 (0)