Skip to content

Optimising foldrescale #768

Optimising foldrescale

Optimising foldrescale #768

Workflow file for this run

name: Python Wheel Build
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
jobs:
Linux:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64:latest
steps:
- uses: actions/checkout@v4
- name: Install fftw
run: |
yum install -y fftw3-devel
- name: Install ffi
run: |
yum install -y libffi-devel
- name: Compile python bindings
run: |
tools/finufft/build-wheels-linux.sh
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: linux-wheels
path: python/finufft/wheelhouse/finufft*manylinux*.whl
MacOS:
runs-on: macos-13
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
steps:
- uses: actions/checkout@v4
- name: Install gcc and fftw
run: |
brew install gcc fftw
cp make.inc.macosx_gcc-12 make.inc
echo "FC=gfortran-13" >> make.inc
echo "CC=gcc-13" >> make.inc
echo "CXX=g++-13" >> make.inc
echo "FFLAGS += -march=x86-64" >> make.inc
echo "CFLAGS += -march=x86-64" >> make.inc
echo "CXXFLAGS += -march=x86-64" >> make.inc
# link statically to libgcc, libgfortran and libquadmath
# otherwise binaries are incompatible with older systems
echo "LIBS += -static-libgfortran -static-libgcc -static-libstdc++" >> make.inc
# hack to make libquadmath link statically
sudo rm /usr/local/opt/gcc@13/lib/gcc/13/libquadmath.*dylib
# Download and install Python instead of using the setup_python
# as the python interpreters in the Github machines
# were compiled in 10.14, the wheels built with them
# are incompatible with older MacOS versions
- if: steps.cache-python.outputs.cache-hit != 'true'
name: Download and install Python
run: |
curl \
https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg \
--output python_installer.pkg
sudo installer -pkg python_installer.pkg -target /
curl \
https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg \
--output python_installer.pkg
sudo installer -pkg python_installer.pkg -target /
curl \
https://www.python.org/ftp/python/3.8.10/python-3.8.10-macosx10.9.pkg \
--output python_installer.pkg
sudo installer -pkg python_installer.pkg -target /
curl \
https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg \
--output python_installer.pkg
sudo installer -pkg python_installer.pkg -target /
curl \
https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg \
--output python_installer.pkg
sudo installer -pkg python_installer.pkg -target /
curl \
https://www.python.org/ftp/python/3.11.7/python-3.11.7-macos11.pkg \
--output python_installer.pkg
sudo installer -pkg python_installer.pkg -target /
curl \
https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg \
--output python_installer.pkg
sudo installer -pkg python_installer.pkg -target /
- name: Compile python bindings
run: |
make lib
export FINUFFT_DIR=`pwd`
export CC=gcc-13
export CXX=g++-13
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip wheel python/finufft -w wheelhouse
PYTHON_BIN=/Library/Frameworks/Python.framework/Versions/3.12/bin/
$PYTHON_BIN/python3 -m pip install delocate==0.10.7
ls wheelhouse/finufft*.whl | xargs -n1 $PYTHON_BIN/delocate-wheel -w fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pytest python/finufft/test
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: macos-wheels
path: fixed_wheel/*.whl
Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install GCC and make
run: C:\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm make mingw-w64-x86_64-toolchain mingw-w64-x86_64-fftw"
- name: Build and Test Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
architecture: 'x64'
- run: |
.\.github\workflows\python_build_win.ps1
.\.github\workflows\python_test_win.ps1
- name: Build and Test Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- run: |
.\.github\workflows\python_build_win.ps1
.\.github\workflows\python_test_win.ps1
- name: Build and Test Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- run: |
.\.github\workflows\python_build_win.ps1
.\.github\workflows\python_test_win.ps1
- name: Build and Test Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- run: |
.\.github\workflows\python_build_win.ps1
.\.github\workflows\python_test_win.ps1
- name: Build and Test Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- run: |
.\.github\workflows\python_build_win.ps1
.\.github\workflows\python_test_win.ps1
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: windows-wheels
path: wheelhouse\*.whl