[DRAFT] Using pyproject.toml and Cmake to build wheels #1
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: Test python skbuild with CMake | |
on: [push, pull_request] | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Generate matrix | |
id: generate_matrix | |
run: | | |
MATRIX=$(python3 ${{ github.workspace }}/.github/workflows/generate_matrix.py) | |
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT | |
build: | |
name: Build with Pip | |
runs-on: ${{ matrix.os }} | |
needs: prepare | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set min macOS version and install fftw and libomp | |
if: runner.os == 'macOS' | |
run: | | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
echo "MACOS_DEPLOYMENT_TARGET=10.14" >> $GITHUB_ENV | |
brew install fftw libomp | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: ${{ matrix.compiler }} | |
vcvarsall: ${{ contains(matrix.os, 'windows') }} | |
cmake: false | |
ninja: false | |
vcpkg: false | |
cppcheck: false | |
clangtidy: false | |
- name: Install pytest | |
run: python -m pip install pytest | |
- name: Install fftw and libomp | |
if: runner.os == 'linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfftw3-dev libomp-dev | |
- name: Set compiler flags | |
run: | | |
echo MAKE_ARGS="-DFINUFFT_ARCH_FLAGS=${{ matrix.arch_flags }}" >> $GITHUB_ENV | |
- name: Build | |
run: pip install . --verbose | |
- name: Test | |
run: python -m pytest python/finufft/test |