@@ -11,6 +11,10 @@ concurrency:
1111 group : ${{ github.workflow }}-${{ github.ref }}-build-python
1212 cancel-in-progress : true
1313
14+ defaults :
15+ run :
16+ shell : bash
17+
1418jobs :
1519 build :
1620 strategy :
5559 - target : aarch64-pc-windows-msvc
5660 runs_on : windows-11-arm
5761 interpreter : 3.11 3.12 3.13
62+ architecture : arm64
5863
5964 name : ${{ matrix._.target }}
6065 runs-on : ${{ matrix._.runs_on }}
@@ -68,59 +73,28 @@ jobs:
6873 # * We update `Expand-Archive` to avoid "" is not a supported archive file format when extracting
6974 # files that don't end in `.zip`
7075 run : |
71- Write-Output "> Update Expand-Archive (Microsoft.PowerShell.Archive)"
72- Install-PackageProvider -Name NuGet -Force
73- Install-Module -Name Microsoft.PowerShell.Archive -Force
74-
75- Write-Output "> Setup bash.exe (git-for-windows/PortableGit)"
76- Invoke-WebRequest "https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/PortableGit-2.47.1-arm64.7z.exe" -OutFile /git.7z.exe
77- /git.7z.exe -o/git -y
78-
79- Write-Output "> Setup Rust"
80- Invoke-WebRequest "https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe" -OutFile /rustup-init.exe
81- /rustup-init.exe --default-host aarch64-pc-windows-msvc -y
82-
83- Write-Output "> Setup VS Build Tools"
84- Invoke-WebRequest "https://aka.ms/vs/17/release/vs_BuildTools.exe" -OutFile /vs_BuildTools.exe
85- Start-Process C:/vs_BuildTools.exe -ArgumentList " `
86- --add Microsoft.VisualStudio.Workload.NativeDesktop `
87- --add Microsoft.VisualStudio.Workload.VCTools `
88- --add Microsoft.VisualStudio.Component.VC.Tools.arm64 `
89- --add Microsoft.VisualStudio.Component.VC.Llvm.Clang `
90- --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset `
91- --includeRecommended --quiet --norestart --wait" -Wait
92-
93- Write-Output "> Setup CMake"
94- Invoke-WebRequest "https://github.com/Kitware/CMake/releases/download/v3.31.2/cmake-3.31.2-windows-arm64.zip" -OutFile /cmake.zip
95- Expand-Archive /cmake.zip -DestinationPath /
96-
97- Write-Output "> Download jq.exe (github.com/jqlang) (needed for tomlq / yq)"
98- Invoke-WebRequest https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-i386.exe -OutFile /jq.exe
99-
100- Write-Output "> Update GITHUB_PATH"
101- [System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/git/bin/")
102- [System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + $Env:USERPROFILE + "/.cargo/bin/")
103- [System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/Llvm/bin/")
104- [System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/cmake-3.31.2-windows-arm64/bin")
105- [System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/")
106- [System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n")
107-
108- Get-Content $Env:GITHUB_PATH | Out-Host
109-
110- # - name: Check build environment (ARM64 Windows)
111- # if: matrix._.target == 'aarch64-pc-windows-msvc'
112- # run: |
113- # set -x
114- # bash --version
115- # rustup show
116- # clang -v
117- # cmake --version
76+ # rustup is not installed in aarch64
77+ if (-not (Get-Command rustup -ErrorAction SilentlyContinue)) {
78+ Invoke-WebRequest -Uri "https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe" -OutFile "rustup-init.exe"
79+ .\rustup-init.exe --default-toolchain stable -y
80+ Remove-Item "rustup-init.exe"
81+ "$env:USERPROFILE/.cargo/bin" | Out-File -FilePath "$env:GITHUB_PATH" -Append
82+ }
83+
84+ - name : Check build environment (ARM64 Windows)
85+ if : matrix._.target == 'aarch64-pc-windows-msvc'
86+ run : |
87+ set -x
88+ bash --version
89+ rustup show
90+ clang -v
91+ cmake --version
11892
11993 - uses : actions/checkout@v4
12094 - uses : actions/setup-python@v5
12195 with :
12296 python-version : ${{ matrix._.target == 'aarch64-pc-windows-msvc' && '3.11' || '3.8' }}
123- architecture : ${{ matrix._.runs_on == 'windows-latest' && 'x64' || null }}
97+ architecture : ${{ matrix._.architecture }}
12498
12599 - name : Build wheels
126100 uses : PyO3/maturin-action@v1
0 commit comments