From 52efcbacdcd8ca346c63fa35764829c27259afce Mon Sep 17 00:00:00 2001 From: Ben Landrum Date: Sat, 30 Mar 2024 08:38:00 -0700 Subject: [PATCH] Use CI changes from dalcinl/cython3 --- .github/workflows/main.yml | 64 ++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1df4b1..b68b796 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,29 +1,59 @@ name: github-CI -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: jobs: - build: - + test: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [ubuntu-latest, macOS-latest] - python-version: ["3.7", "3.8", "3.9", "3.10"] - name: Python ${{ matrix.python-version }} example + os: + - ubuntu-latest + - macos-latest + mpi: + - mpich + - openmpi + python-version: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12-dev" steps: + - uses: actions/checkout@v3 - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: setup-conda - uses: s-weigand/setup-conda@v1 + + - uses: actions/setup-python@v4 with: - update-conda: true - python-version: ${{ matrix.python-version }} - conda-channels: anaconda, conda-forge - - run: conda --version - - run: which python + python-version: ${{ matrix.python-version }} + - run: | - conda config --set always_yes yes - conda install -n root conda-build numpy fftw - conda build ./conf + # Install fftw + case $(uname) in + Linux) + sudo apt update && sudo apt install -y -q fftw-dev + ;; + Darwin) + brew install fftw + ;; + esac + + - run: python -m pip install -U pip build + + - run: python -m build + + - uses: mpi4py/setup-mpi@v1 + with: + mpi: ${{ matrix.mpi }} + + - run: pip install -vvv dist/mpi4py_fft-*.whl