|
| 1 | +name: Windows-on-ARM |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
| 8 | + |
| 9 | +env: |
| 10 | + OPENBLAS_COMMIT: "v0.3.29" |
| 11 | + OPENBLAS_ROOT: "c:\\opt" |
| 12 | + # Preserve working directory for calls into bash |
| 13 | + # Without this, invoking bash will cd to the home directory |
| 14 | + CHERE_INVOKING: "yes" |
| 15 | + BASH_PATH: "C:\\Program Files\\Git\\bin\\bash.exe" |
| 16 | + PLAT: arm64 |
| 17 | + INTERFACE64: 0 |
| 18 | + BUILD_BITS: 32 |
| 19 | + |
| 20 | +jobs: |
| 21 | + build: |
| 22 | + runs-on: windows-11-arm |
| 23 | + timeout-minutes: 90 |
| 24 | + |
| 25 | + steps: |
| 26 | + |
| 27 | + - uses: actions/checkout@v4.1.1 |
| 28 | + |
| 29 | + - name: Set up Python |
| 30 | + uses: actions/setup-python@v5 |
| 31 | + with: |
| 32 | + python-version: 3.12 |
| 33 | + architecture: arm64 |
| 34 | + |
| 35 | + - name: Setup visual studio |
| 36 | + uses: microsoft/setup-msbuild@v2 |
| 37 | + |
| 38 | + - name: Download, install 7zip. |
| 39 | + run: | |
| 40 | + Invoke-WebRequest https://www.7-zip.org/a/7z2409-arm64.exe -UseBasicParsing -OutFile 7z_arm.exe |
| 41 | + Start-Process -FilePath ".\7z_arm.exe" -ArgumentList "/S" -Wait |
| 42 | + echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 43 | +
|
| 44 | + - name: Download and install LLVM installer |
| 45 | + run: | |
| 46 | + Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.5/LLVM-19.1.5-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe |
| 47 | + Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait |
| 48 | + echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 49 | +
|
| 50 | + - name: Update CMake for WoA |
| 51 | + run: | |
| 52 | + pip install cmake |
| 53 | + get-command cmake |
| 54 | +
|
| 55 | + - name: Build |
| 56 | + run: | |
| 57 | + git submodule update --init --recursive |
| 58 | + .\tools\build_steps_win_arm64.bat |
| 59 | +
|
| 60 | + - name: Pack |
| 61 | + run: | |
| 62 | + cd local |
| 63 | + cp -r "scipy_openblas${env:BUILD_BITS}" $env:BUILD_BITS |
| 64 | + 7z a ../builds/openblas-${env:PLAT}-${env:INTERFACE64}.zip -tzip $env:BUILD_BITS |
| 65 | +
|
| 66 | + - name: Test 32-bit interface wheel |
| 67 | + run: | |
| 68 | + python -m pip install --no-index --find-links dist scipy_openblas32 |
| 69 | + python -m scipy_openblas32 |
| 70 | + python -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" |
| 71 | +
|
| 72 | + - uses: actions/upload-artifact@v4.3.0 |
| 73 | + with: |
| 74 | + name: wheels-${{ env.PLAT }}-${{ env.INTERFACE64 }} |
| 75 | + path: dist/scipy_openblas*.whl |
| 76 | + |
| 77 | + - uses: actions/upload-artifact@v4.3.0 |
| 78 | + with: |
| 79 | + name: openblas-${{ env.PLAT }}-${{ env.INTERFACE64 }} |
| 80 | + path: builds/openblas*.zip |
| 81 | + |
| 82 | + - name: Install Anaconda client |
| 83 | + run: | |
| 84 | + Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -UseBasicParsing -Outfile rustup-init.exe |
| 85 | + .\rustup-init.exe -y |
| 86 | + $env:PATH="$env:PATH;$env:USERPROFILE\.cargo\bin" |
| 87 | + pip install anaconda-client |
| 88 | +
|
| 89 | + - name: Upload |
| 90 | + # see https://github.com/marketplace/actions/setup-miniconda for why |
| 91 | + # `-el {0}` is required. |
| 92 | + shell: bash -el {0} |
| 93 | + env: |
| 94 | + ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} |
| 95 | + run: | |
| 96 | + source tools/upload_to_anaconda_staging.sh |
| 97 | + upload_wheels |
0 commit comments