Skip to content

tell dependabot to check for updates to github actions #5

tell dependabot to check for updates to github actions

tell dependabot to check for updates to github actions #5

name: Build windows wheels
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_windows_wheels:
# This is lifted from pyfftw
name: Build ${{ matrix.cibw_python }}-win${{ matrix.cibw_arch }} wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
cibw_python: ["cp38", "cp39", "cp310", "cp311", "pp38"]
# # Add arm64 when we support it
# # We don't support Windows 32-bit
cibw_arch: ["_amd64", "32", "_arm64"]
exclude:
# windows arm64 support is 3.9+
- cibw_python: "cp38"
cibw_arch: "_arm64"
# cibuildwheel only supports pypy38 AMD64 on Windows
- cibw_python: "pp38"
cibw_arch: "32"
- cibw_python: "pp38"
cibw_arch: "_arm64"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel
- name: Download FFTW libraries
run: |
Write-Output "Downloading FFTW release (64-bit)"
Invoke-WebRequest -Uri "https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip" -OutFile "${{ github.workspace }}\fftw64.zip"
Write-Output "Unzipping 64-bit FFTW release"
Expand-Archive -Path "${{ github.workspace }}\fftw64.zip" -DestinationPath "${{ github.workspace }}\fftw64"
Write-Output "Downloading FFTW release (32-bit)"
Invoke-WebRequest -Uri "https://fftw.org/pub/fftw/fftw-3.3.5-dll32.zip" -OutFile "${{ github.workspace }}\fftw32.zip"
Write-Output "Unzipping 32-bit FFTW release"
Expand-Archive -Path "${{ github.workspace }}\fftw32.zip" -DestinationPath "${{ github.workspace }}\fftw32"
shell: powershell
# Annoyingly these two next steps are needed as FFTW does not ship with
# .lib files which msvc requires for linking
- name: Setup Visual Code build tools (32-bit)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
if: ${{ matrix.cibw_arch == '32' }}
- name: Setup Visual Code build tools (64-bit)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
if: ${{ matrix.cibw_arch != '32' }}
- name: Convert .def files to .lib
run: |
lib.exe /def:${{ github.workspace }}\fftw64\libfftw3-3.def /out:${{ github.workspace }}\fftw64\libfftw3-3.lib /machine:x64
lib.exe /def:${{ github.workspace }}\fftw64\libfftw3f-3.def /out:${{ github.workspace }}\fftw64\libfftw3f-3.lib /machine:x64
lib.exe /def:${{ github.workspace }}\fftw64\libfftw3l-3.def /out:${{ github.workspace }}\fftw64\libfftw3l-3.lib /machine:x64
lib.exe /def:${{ github.workspace }}\fftw32\libfftw3-3.def /out:${{ github.workspace }}\fftw32\libfftw3-3.lib /machine:x86
lib.exe /def:${{ github.workspace }}\fftw32\libfftw3f-3.def /out:${{ github.workspace }}\fftw32\libfftw3f-3.lib /machine:x86
lib.exe /def:${{ github.workspace }}\fftw32\libfftw3l-3.def /out:${{ github.workspace }}\fftw32\libfftw3l-3.lib /machine:x86
- name: Build Windows wheels
env:
ARCHITECTURE_BIT: ${{ matrix.cibw_arch == '32' && '32' || '64' }}
CIBW_BUILD: ${{ matrix.cibw_python }}-win${{ matrix.cibw_arch }}
CIBW_BEFORE_BUILD: >-
(robocopy
${{ github.workspace }}\fftw${{ matrix.cibw_arch == '32' && '32' || '64' }}
${{ github.workspace }}\fftw /V /S /E)
^& exit 0
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
name: Upload wheels as artifacts
if: ${{ github.event_name != 'pull_request' }}
with:
name: wheels
path: ./wheelhouse/*.whl