Skip to content

Remove pyFFTw dep

Remove pyFFTw dep #452

Workflow file for this run

name: Build wheels and upload to PyPI
on:
pull_request:
push:
branches:
- master
tags:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} for ${{ matrix.cp }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
cp: [cp37, cp38, cp39, cp310, cp311]
include:
- cp: cp37
numpyver: "1.20"
- cp: cp38
numpyver: "1.22"
- cp: cp39
numpyver: "1.22"
- cp: cp310
numpyver: "1.22"
- cp: cp311
numpyver: "1.22"
steps:
- uses: actions/checkout@v4
- name: Brew packages
if: matrix.os == 'macos-latest'
run: |
set -x
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
gfortran --version
brew install fftw
- name: Apt packages
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libfftw3-dev
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BEFORE_BUILD: "python -m pip install numpy==${{ matrix.numpyver }}"
CIBW_BUILD_VERBOSITY: 3
CIBW_BUILD: "${{ matrix.cp }}-*x86_64"
CIBW_SKIP: "*-musllinux_*"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.cp }}
path: ./wheelhouse/*.whl
retention-days: 1
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.8'
- name: Brew packages
if: matrix.os == 'macos-latest'
run: |
set -x
sudo ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
gfortran --version
brew install fftw
- name: Apt packages
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libfftw3-dev
- name: Build sdist
run: |
python -m pip install numpy
python setup.py sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
retention-days: 1
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# To test: repository_url: https://test.pypi.org/legacy/