Skip to content

Commit bd3469a

Browse files
committed
more
1 parent 649e5cc commit bd3469a

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/build-python-release.reusable.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,62 @@ jobs:
5959
name: ${{ matrix._.target }}
6060
runs-on: ${{ matrix._.runs_on }}
6161
steps:
62+
- name: Setup build environment (ARM64 Windows)
63+
if: matrix._.target == 'aarch64-pc-windows-msvc'
64+
shell:
65+
powershell
66+
# Notes
67+
# * We update `Expand-Archive` to avoid "" is not a supported archive file format when extracting
68+
# files that don't end in `.zip`
69+
run: |
70+
Write-Output "> Update Expand-Archive (Microsoft.PowerShell.Archive)"
71+
Install-PackageProvider -Name NuGet -Force
72+
Install-Module -Name Microsoft.PowerShell.Archive -Force
73+
74+
Write-Output "> Setup bash.exe (git-for-windows/PortableGit)"
75+
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
76+
/git.7z.exe -o/git -y
77+
78+
Write-Output "> Setup Rust"
79+
Invoke-WebRequest "https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe" -OutFile /rustup-init.exe
80+
/rustup-init.exe --default-host aarch64-pc-windows-msvc -y
81+
82+
Write-Output "> Setup VS Build Tools"
83+
Invoke-WebRequest "https://aka.ms/vs/17/release/vs_BuildTools.exe" -OutFile /vs_BuildTools.exe
84+
Start-Process C:/vs_BuildTools.exe -ArgumentList " `
85+
--add Microsoft.VisualStudio.Workload.NativeDesktop `
86+
--add Microsoft.VisualStudio.Workload.VCTools `
87+
--add Microsoft.VisualStudio.Component.VC.Tools.arm64 `
88+
--add Microsoft.VisualStudio.Component.VC.Llvm.Clang `
89+
--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset `
90+
--includeRecommended --quiet --norestart --wait" -Wait
91+
92+
Write-Output "> Setup CMake"
93+
Invoke-WebRequest "https://github.com/Kitware/CMake/releases/download/v3.31.2/cmake-3.31.2-windows-arm64.zip" -OutFile /cmake.zip
94+
Expand-Archive /cmake.zip -DestinationPath /
95+
96+
Write-Output "> Download jq.exe (github.com/jqlang) (needed for tomlq / yq)"
97+
Invoke-WebRequest https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-i386.exe -OutFile /jq.exe
98+
99+
Write-Output "> Update GITHUB_PATH"
100+
[System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/git/bin/")
101+
[System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + $Env:USERPROFILE + "/.cargo/bin/")
102+
[System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/Llvm/bin/")
103+
[System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/cmake-3.31.2-windows-arm64/bin")
104+
[System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n" + "C:/")
105+
[System.IO.File]::AppendAllText($Env:GITHUB_PATH, "`n")
106+
107+
Get-Content $Env:GITHUB_PATH | Out-Host
108+
109+
- name: Check build environment (ARM64 Windows)
110+
if: matrix._.target == 'aarch64-pc-windows-msvc'
111+
run: |
112+
set -x
113+
bash --version
114+
rustup show
115+
clang -v
116+
cmake --version
117+
62118
- uses: actions/checkout@v4
63119
- uses: actions/setup-python@v5
64120
with:

0 commit comments

Comments
 (0)