workflow draft #647
Workflow file for this run
This file contains 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: Build and test Python wheels | |
on: [ push, pull_request ] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.buildplat[0] }} | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
matrix: | |
buildplat: | |
- [ ubuntu-22.04, manylinux_x86_64 ] | |
- [ ubuntu-22.04, musllinux_x86_64 ] | |
- [ macos-13, macosx_x86_64 ] | |
- [ macos-14, macosx_arm64 ] | |
- [ windows-2019, win_amd64 ] | |
- [ windows-2019, win32 ] | |
python: [ "cp311", "cp312", "cp313" ] # exclude pp313t for now | |
exclude: | |
# Don't build PyPy 32-bit windows | |
- buildplat: [ windows-2019, win32 ] | |
python: "pp310" | |
- buildplat: [ ubuntu-22.04, musllinux_x86_64 ] | |
python: "pp310" | |
- buildplat: [ macos-14, macosx_arm64 ] | |
python: "pp310" | |
- buildplat: [ macos-13, macosx_x86_64 ] | |
python: "cp313t" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup MSVC (32-bit) | |
if: ${{ matrix.buildplat[1] == 'win32' }} | |
uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1 | |
with: | |
architecture: 'x86' | |
- name: Install dependencies | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
# Here we install the mingw64 versions of gcc and FFTW that we will | |
# use to compile the library. We also need pkg-config so that cmake | |
# can easily find FFTW when configurating the build. | |
c:\msys64\usr\bin\pacman.exe -Sy --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-fftw mingw-w64-x86_64-pkgconf | |
# This particular install of mingw64 *is not* in the path by default | |
# (another one at c:\mingw64 is, however), so we add it to the path. | |
echo "c:\msys64\mingw64\bin;" >> $env:GITHUB_PATH | |
- name: Build wheels ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
uses: pypa/[email protected] | |
with: | |
package-dir: 'python/finufft' | |
env: | |
CIBW_BEFORE_ALL_MACOS: | | |
brew install llvm libomp | |
CIBW_ENVIRONMENT_MACOS: > | |
CC=$(brew --prefix llvm)/bin/clang | |
CXX=$(brew --prefix llvm)/bin/clang++ | |
CFLAGS="-I$(brew --prefix libomp)/include" | |
LDFLAGS="-L$(brew --prefix libomp)/lib" | |
MACOSX_DEPLOYMENT_TARGET=${{ matrix.buildplat[0] == 'macos-14' && '14' || '13' }} | |
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
path: ./wheelhouse/*.whl |