|
1 | | -#name: Windows-on-ARM |
2 | | -# |
3 | | -#on: |
4 | | -# push: |
5 | | -# branches: [ main ] |
6 | | -# pull_request: |
7 | | -# branches: |
8 | | -# - main |
9 | | -# - maintenance/** |
10 | | -# |
11 | | -#env: |
12 | | -# OPENBLAS_ROOT: "c:\\opt" |
13 | | -# # Preserve working directory for calls into bash |
14 | | -# # Without this, invoking bash will cd to the home directory |
15 | | -# CHERE_INVOKING: "yes" |
16 | | -# BASH_PATH: "C:\\Program Files\\Git\\bin\\bash.exe" |
17 | | -# PLAT: arm64 |
18 | | -# |
19 | | -#jobs: |
20 | | -# build: |
21 | | -# runs-on: windows-11-arm |
22 | | -# timeout-minutes: 90 |
23 | | -# |
24 | | -# strategy: |
25 | | -# matrix: |
26 | | -# INTERFACE64: ['1', '0'] |
27 | | -# |
28 | | -# env: |
29 | | -# INTERFACE64: ${{ matrix.INTERFACE64 }} |
30 | | -# |
31 | | -# steps: |
32 | | -# |
33 | | -# - uses: actions/checkout@v6.0.1 |
34 | | -# |
35 | | -# - name: Set up Python |
36 | | -# uses: actions/setup-python@v6.2.0 |
37 | | -# with: |
38 | | -# python-version: 3.12 |
39 | | -# architecture: arm64 |
40 | | -# |
41 | | -# - name: Download and install LLVM installer |
42 | | -# run: | |
43 | | -# Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/LLVM-20.1.8-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe |
44 | | -# Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait |
45 | | -# echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
46 | | -# |
47 | | -# - name: Install CMake and Ninja for Win-ARM64 |
48 | | -# shell: pwsh |
49 | | -# run: | |
50 | | -# Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v3.29.4/cmake-3.29.4-windows-arm64.msi -OutFile cmake-arm64.msi |
51 | | -# Start-Process msiexec.exe -ArgumentList "/i cmake-arm64.msi /quiet /norestart" -Wait |
52 | | -# echo "C:\Program Files\CMake\bin" >> $env:GITHUB_PATH |
53 | | -# |
54 | | -# Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-winarm64.zip -OutFile ninja-winarm64.zip |
55 | | -# Expand-Archive ninja-winarm64.zip -DestinationPath ninja |
56 | | -# Copy-Item ninja\ninja.exe -Destination "C:\Windows\System32" |
57 | | -# |
58 | | -# - name: Set env variables |
59 | | -# run: | |
60 | | -# if ( ${{ matrix.INTERFACE64 }} -eq "1" ) { |
61 | | -# echo "INTERFACE_BITS=64" >> $env:GITHUB_ENV |
62 | | -# } else { |
63 | | -# echo "INTERFACE_BITS=32" >> $env:GITHUB_ENV |
64 | | -# } |
65 | | -# |
66 | | -# - name: Build |
67 | | -# run: | |
68 | | -# git submodule update --init --recursive |
69 | | -# .\tools\build_steps_win_arm64.bat 64 ${env:INTERFACE_BITS} |
70 | | -# |
71 | | -# - name: Test ${{ matrix.INTERFACE_BITS }}-bit interface wheel |
72 | | -# run: | |
73 | | -# python -m pip install --no-index --find-links dist scipy_openblas${env:INTERFACE_BITS} |
74 | | -# python -m scipy_openblas${env:INTERFACE_BITS} |
75 | | -# python -c "import scipy_openblas${env:INTERFACE_BITS}; print(scipy_openblas${env:INTERFACE_BITS}.get_pkg_config())" |
76 | | -# |
77 | | -# - uses: actions/upload-artifact@v6.0.0 |
78 | | -# with: |
79 | | -# name: wheels-${{ env.PLAT }}-${{ env.INTERFACE64 }} |
80 | | -# path: dist/scipy_openblas*.whl |
81 | | -# |
82 | | -# - name: Install Anaconda client |
83 | | -# run: | |
84 | | -# # Rust installation needed for rpds-py. |
85 | | -# Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -UseBasicParsing -Outfile rustup-init.exe |
86 | | -# .\rustup-init.exe -y |
87 | | -# $env:PATH="$env:PATH;$env:USERPROFILE\.cargo\bin" |
88 | | -# # cryptography dropped win-arm64 for 46.0.4, make sure we don't try to compile from source |
89 | | -# pip install --only-binary :all: cryptography |
90 | | -# pip install anaconda-client |
91 | | -# |
92 | | -# - name: Upload |
93 | | -# # see https://github.com/marketplace/actions/setup-miniconda for why |
94 | | -# # `-el {0}` is required. |
95 | | -# shell: bash -el {0} |
96 | | -# env: |
97 | | -# ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} |
98 | | -# run: | |
99 | | -# source tools/upload_to_anaconda_staging.sh |
100 | | -# upload_wheels |
| 1 | +name: Windows-on-ARM |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - main |
| 9 | + - maintenance/** |
| 10 | + |
| 11 | +env: |
| 12 | + OPENBLAS_ROOT: "c:\\opt" |
| 13 | + # Preserve working directory for calls into bash |
| 14 | + # Without this, invoking bash will cd to the home directory |
| 15 | + CHERE_INVOKING: "yes" |
| 16 | + BASH_PATH: "C:\\Program Files\\Git\\bin\\bash.exe" |
| 17 | + PLAT: arm64 |
| 18 | + |
| 19 | +jobs: |
| 20 | + build: |
| 21 | + runs-on: windows-11-arm |
| 22 | + timeout-minutes: 90 |
| 23 | + |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + INTERFACE64: ['1', '0'] |
| 27 | + |
| 28 | + env: |
| 29 | + INTERFACE64: ${{ matrix.INTERFACE64 }} |
| 30 | + |
| 31 | + steps: |
| 32 | + |
| 33 | + - uses: actions/checkout@v6.0.1 |
| 34 | + |
| 35 | + - name: Set up Python |
| 36 | + uses: actions/setup-python@v6.2.0 |
| 37 | + with: |
| 38 | + python-version: 3.12 |
| 39 | + architecture: arm64 |
| 40 | + |
| 41 | + - name: Download and install LLVM installer |
| 42 | + run: | |
| 43 | + Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/LLVM-20.1.8-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe |
| 44 | + Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait |
| 45 | + echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 46 | +
|
| 47 | + - name: Install CMake and Ninja for Win-ARM64 |
| 48 | + shell: pwsh |
| 49 | + run: | |
| 50 | + Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v3.29.4/cmake-3.29.4-windows-arm64.msi -OutFile cmake-arm64.msi |
| 51 | + Start-Process msiexec.exe -ArgumentList "/i cmake-arm64.msi /quiet /norestart" -Wait |
| 52 | + echo "C:\Program Files\CMake\bin" >> $env:GITHUB_PATH |
| 53 | +
|
| 54 | + Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-winarm64.zip -OutFile ninja-winarm64.zip |
| 55 | + Expand-Archive ninja-winarm64.zip -DestinationPath ninja |
| 56 | + Copy-Item ninja\ninja.exe -Destination "C:\Windows\System32" |
| 57 | +
|
| 58 | + - name: Set env variables |
| 59 | + run: | |
| 60 | + if ( ${{ matrix.INTERFACE64 }} -eq "1" ) { |
| 61 | + echo "INTERFACE_BITS=64" >> $env:GITHUB_ENV |
| 62 | + } else { |
| 63 | + echo "INTERFACE_BITS=32" >> $env:GITHUB_ENV |
| 64 | + } |
| 65 | +
|
| 66 | + - name: Build |
| 67 | + run: | |
| 68 | + git submodule update --init --recursive |
| 69 | + .\tools\build_steps_win_arm64.bat 64 ${env:INTERFACE_BITS} |
| 70 | +
|
| 71 | + - name: Test ${{ matrix.INTERFACE_BITS }}-bit interface wheel |
| 72 | + run: | |
| 73 | + python -m pip install --no-index --find-links dist scipy_openblas${env:INTERFACE_BITS} |
| 74 | + python -m scipy_openblas${env:INTERFACE_BITS} |
| 75 | + python -c "import scipy_openblas${env:INTERFACE_BITS}; print(scipy_openblas${env:INTERFACE_BITS}.get_pkg_config())" |
| 76 | +
|
| 77 | + - uses: actions/upload-artifact@v6.0.0 |
| 78 | + with: |
| 79 | + name: wheels-${{ env.PLAT }}-${{ env.INTERFACE64 }} |
| 80 | + path: dist/scipy_openblas*.whl |
| 81 | + |
| 82 | + - name: Install Anaconda client |
| 83 | + run: | |
| 84 | + # Rust installation needed for rpds-py. |
| 85 | + Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -UseBasicParsing -Outfile rustup-init.exe |
| 86 | + .\rustup-init.exe -y |
| 87 | + $env:PATH="$env:PATH;$env:USERPROFILE\.cargo\bin" |
| 88 | + # cryptography dropped win-arm64 for 46.0.4, make sure we don't try to compile from source |
| 89 | + pip install --only-binary :all: cryptography |
| 90 | + pip install anaconda-client |
| 91 | +
|
| 92 | + - name: Upload |
| 93 | + # see https://github.com/marketplace/actions/setup-miniconda for why |
| 94 | + # `-el {0}` is required. |
| 95 | + shell: bash -el {0} |
| 96 | + env: |
| 97 | + ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} |
| 98 | + run: | |
| 99 | + source tools/upload_to_anaconda_staging.sh |
| 100 | + upload_wheels |
0 commit comments