@@ -69,32 +69,50 @@ jobs:
6969 # TODO: figure out whether we need/want to use other compilers too
7070 compiler : " gcc"
7171 version : " 13"
72- - name : Specify MSVC toolchain - windows-arm
73- # When building on windows ARM, we need to use the MSVC toolchain
74- # # Original from: https://github.com/matplotlib/matplotlib/blob/1ddb1eccac8cfc25dee47bc538dc5913384b253f/.github/workflows/cibuildwheel.yml#L108
75- # # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
76- # # MinGW on PATH that would be picked otherwise), switch to a static build for
77- # # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
78- # # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
79- # # keeping shared state with the rest of the Python process/extensions.
80- # CIBW_CONFIG_SETTINGS_WINDOWS: >-
81- # setup-args="--vsenv"
82- # setup-args="-Db_vscrt=mt"
83- # setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
84- run : |
85- echo 'CIBW_CONFIG_SETTINGS_WINDOWS=setup-args="--vsenv" setup-args="-Db_vscrt=mt"' >> $GITHUB_ENV
86- # TODO: figure out escaping and add back in (?)
87- # setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
88- - name : Install Fortran compiler - windows-arm
89- # When building on windows ARM, we need to use the MSVC toolchain
72+ # From numpy: https://github.com/numpy/numpy/blob/37c9cb68ba7db9c48bc0e3354953c57a78d2b0e8/.github/windows_arm64_steps/action.yml
73+ - name : Install LLVM with checksum verification
9074 if : ${{ matrix.os == 'windows-11-arm' }}
91- uses : fortran-lang/setup-fortran@v1
92- id : setup-fortran-windows-arm
93- with :
94- # Only intel-classic supported by f2py
95- # (https://numpy.org/devdocs/f2py/windows/intel.html#f2py-and-windows-intel-fortran)
96- compiler : " intel-classic"
97- version : " 2021.10"
75+ shell : pwsh
76+ run : |
77+ Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.6/LLVM-20.1.6-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe
78+ $expectedHash = "92f69a1134e32e54b07d51c6e24d9594852f6476f32c3d70471ae00fffc2d462"
79+ $fileHash = (Get-FileHash -Path "LLVM-woa64.exe" -Algorithm SHA256).Hash
80+ if ($fileHash -ne $expectedHash) {
81+ Write-Error "Checksum verification failed. The downloaded file may be corrupted or tampered with."
82+ exit 1
83+ }
84+ Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait
85+ echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
86+ echo "CC=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
87+ echo "CXX=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
88+ echo "FC=flang-new" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
89+ # - name: Specify MSVC toolchain - windows-arm
90+ # if: ${{ matrix.os == 'windows-11-arm' }}
91+ # # When building on windows ARM, we need to use the MSVC toolchain
92+ # # # Original from: https://github.com/matplotlib/matplotlib/blob/1ddb1eccac8cfc25dee47bc538dc5913384b253f/.github/workflows/cibuildwheel.yml#L108
93+ # # # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
94+ # # # MinGW on PATH that would be picked otherwise), switch to a static build for
95+ # # # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
96+ # # # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
97+ # # # keeping shared state with the rest of the Python process/extensions.
98+ # # CIBW_CONFIG_SETTINGS_WINDOWS: >-
99+ # # setup-args="--vsenv"
100+ # # setup-args="-Db_vscrt=mt"
101+ # # setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
102+ # run: |
103+ # echo 'CIBW_CONFIG_SETTINGS_WINDOWS=setup-args="--vsenv" setup-args="-Db_vscrt=mt"' >> $GITHUB_ENV
104+ # # TODO: figure out escaping and add back in (?)
105+ # # setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
106+ # - name: Install Fortran compiler - windows-arm
107+ # # When building on windows ARM, we need to use the MSVC toolchain
108+ # if: ${{ matrix.os == 'windows-11-arm' }}
109+ # uses: fortran-lang/setup-fortran@v1
110+ # id: setup-fortran-windows-arm
111+ # with:
112+ # # Only intel-classic supported by f2py
113+ # # (https://numpy.org/devdocs/f2py/windows/intel.html#f2py-and-windows-intel-fortran)
114+ # compiler: "intel-classic"
115+ # version: "2021.10"
98116 - name : Build wheels
99117 uses :
pypa/[email protected] # matplotlib had v3.1.3 100118 with :
0 commit comments