-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from mpi4py/dalcinl/cython3
Add pyproject.toml and support Cython 3
- Loading branch information
Showing
14 changed files
with
191 additions
and
198 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,77 @@ | ||
name: github-CI | ||
name: main | ||
|
||
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 | ||
py: | ||
# - "3.7" | ||
# - "3.8" | ||
# - "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
|
||
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/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
conda-channels: anaconda, conda-forge | ||
- run: conda --version | ||
- run: which python | ||
python-version: ${{ matrix.py }} | ||
|
||
- 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 libfftw3-dev | ||
;; | ||
Darwin) | ||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 | ||
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 | ||
env: | ||
CFLAGS: "-O0" | ||
|
||
- run: pip install -r conf/requirements-test.txt | ||
|
||
- if: matrix.mpi == 'mpich' && startsWith(matrix.os, 'ubuntu') | ||
run: ./runtests.sh | ||
working-directory: tests | ||
|
||
- if: matrix.mpi == 'mpich' && startsWith(matrix.os, 'ubuntu') | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: test/coverage.xml | ||
name: ${{ matrix.os }}-${{ matrix.mpi }}-${{ matrix.py }} | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ _templates/ | |
*.dat | ||
*.html | ||
*.xml | ||
*.txt | ||
*.h5 | ||
*.nc | ||
*.xdmf | ||
|
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage | ||
pyfftw; sys_platform == 'linux' and python_version < '3.12' | ||
scipy |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#cython: language_level=3 | ||
#cython: language_level=3str | ||
|
||
cimport numpy as np | ||
import numpy as np | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools >= 42", "numpy", "cython >= 0.29.32"] | ||
build-backend = "setuptools.build_meta" |
Oops, something went wrong.