Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 68 additions & 36 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ 3.9, '3.10', '3.11', '3.12' ]
#python-version: [ 3.9, '3.10', '3.11', '3.12' ]
python-version: [ '3.11' ]
isMerge:
- ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }}
exclude:
- { isMerge: false, python-version: '3.10' }
- { isMerge: false, python-version: '3.11' }
include:
- os: macos-latest
python-version: '3.10'
- os: macos-latest
python-version: '3.11'
#exclude:
# - { isMerge: false, python-version: '3.10' }
# - { isMerge: false, python-version: '3.11' }
# include:
# #- os: macos-latest
# # python-version: '3.10'
# - os: macos-latest
# python-version: '3.11'

name: ${{ matrix.os }} / Python ${{ matrix.python-version }}

Expand Down Expand Up @@ -67,6 +68,13 @@ jobs:
brew install open-mpi
brew install hdf5-mpi
brew install libomp
brew update
brew install python3
brew install gcc
brew install openblas
brew install lapack
brew install git
brew install pandoc
GFORTRAN_HOME=$(which gfortran || true)
echo "GFORTRAN_HOME : $GFORTRAN_HOME"
if [[ ! -f "$GFORTRAN_HOME" ]]; then
Expand Down Expand Up @@ -169,33 +177,57 @@ jobs:
mkdir pytest
cp mpi_tester.py pytest

- name: Run single-process tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python -m pytest -n auto --pyargs psydac -m "not parallel and not petsc"

- name: Run MPI tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and not petsc"

- name: Run single-process PETSc tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python -m pytest -n auto --pyargs psydac -m "not parallel and petsc"

- name: Run MPI PETSc tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and petsc"
- name: Run single-process tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python -m pytest -n auto --pyargs psydac -m "not parallel and not petsc"

- name: Run MPI tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and not petsc"

- name: Run single-process PETSc tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python -m pytest -n auto --pyargs psydac -m "not parallel and petsc"

- name: Run MPI PETSc tests with Pytest
working-directory: ./pytest
run: |
export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh
export OMP_NUM_THREADS=2
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and petsc"

- name: Clone struphy from GitLab (struphy-with-psydac-devel branch)
run: |
git clone --branch struphy-with-psydac-devel https://gitlab.mpcdf.mpg.de/struphy/struphy.git

- name: Update struphy to use the current Psydac branch
working-directory: ./struphy
run: |
# Replace the Psydac dependency with a local path reference
cat pyproject.toml
# sed -i "s|psydac @ git+https://github.com/pyccel/psydac.git@struphy-2024|psydac @ file://${GITHUB_WORKSPACE}|" pyproject.toml
sed -i.bak "s|psydac @ git+https://github.com/pyccel/psydac.git@struphy-2024|psydac @ file://${GITHUB_WORKSPACE}|" pyproject.toml
cat pyproject.toml

- name: Install StruPhy with local Psydac
working-directory: ./struphy
run: |
python -m pip install -e .
struphy -h
struphy compile -y

- name: Run struphy tests
working-directory: ./struphy
run: struphy test unit

- name: Remove test directory
if: ${{ always() }}
Expand Down
Loading