Refactor Windows on ARM build script #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows-on-ARM | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| OPENBLAS_COMMIT: "v0.3.29" | |
| OPENBLAS_ROOT: "c:\\opt" | |
| # Preserve working directory for calls into bash | |
| # Without this, invoking bash will cd to the home directory | |
| CHERE_INVOKING: "yes" | |
| BASH_PATH: "C:\\Program Files\\Git\\bin\\bash.exe" | |
| FORTRAN_BIN: flang | |
| PLAT: arm64 | |
| INTERFACE64: 0 | |
| jobs: | |
| build: | |
| runs-on: windows-11-arm | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v4.1.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| architecture: arm64 | |
| - name: Setup visual studio | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: What's where | |
| run: | | |
| get-command zip | |
| - name: Download LLVM installer for woa64 | |
| run: | | |
| curl -L -o LLVM-woa64.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.5/LLVM-19.1.5-woa64.exe | |
| - name: Install LLVM silently | |
| shell: pwsh | |
| run: | | |
| Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait | |
| - name: Add LLVM to PATH | |
| shell: pwsh | |
| run: | | |
| $llvmPath = "C:\Program Files\LLVM\bin" | |
| echo "$llvmPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Update CMake for WoA | |
| run: | | |
| pip install cmake | |
| get-command cmake | |
| - name: Build | |
| run: | | |
| git submodule update --init --recursive | |
| .\tools\build_steps_win_arm64.bat | |
| - name: Pack | |
| run: | | |
| cd local | |
| zip -r ../builds/scipy_openblas32.zip scipy_openblas32 | |
| - name: Test | |
| # Disable test while we work out bash / testing. | |
| if: false | |
| run: | | |
| & $env:BASH_PATH -lc tools/build_gfortran.sh | |
| echo "Static test" | |
| .\for_test\test.exe | |
| echo "Dynamic test" | |
| .\for_test\test_dyn.exe | |
| cp for_test\test*.exe builds | |
| - name: Test 32-bit interface wheel | |
| if: matrix.INTERFACE64 != '1' | |
| run: | | |
| python -m pip install --no-index --find-links dist scipy_openblas32 | |
| python -m scipy_openblas32 | |
| python -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" | |
| - uses: actions/upload-artifact@v4.3.0 | |
| with: | |
| name: wheels-${{ env.PLAT }}-${{ env.INTERFACE64 }} | |
| path: dist/scipy_openblas*.whl | |
| - uses: actions/upload-artifact@v4.3.0 | |
| with: | |
| name: openblas-${{ env.PLAT }}-${{ env.INTERFACE64 }} | |
| path: builds/openblas*.zip | |
| - name: Install Anaconda client | |
| run: | | |
| wget https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -Outfile rustup-init.exe | |
| .\rustup-init.exe -y | |
| $env:PATH="$env:PATH;$env:USERPROFILE\.cargo\bin" | |
| pip install anaconda-client | |
| - name: Upload | |
| # see https://github.com/marketplace/actions/setup-miniconda for why | |
| # `-el {0}` is required. | |
| shell: bash -el {0} | |
| env: | |
| ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} | |
| run: | | |
| source tools/upload_to_anaconda_staging.sh | |
| upload_wheels |