Skip to content

Windows support (#24) #24

Windows support (#24)

Windows support (#24) #24

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '1 5 * * 1'
# Cancel running jobs if new commits are pushed
concurrency:
group: >
${{ github.workflow }}-
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests:
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest, macos-latest, windows-latest]
mpi: [mpich, openmpi, msmpi]
exclude:
- os: ubuntu-latest
mpi: msmpi
- os: macos-latest
mpi: msmpi
- os: windows-latest
mpi: mpich
- os: windows-latest
mpi: openmpi
include:
- mpi: mpich
mpiexec: mpiexec
- mpi: openmpi
mpiexec: mpiexec --oversubscribe
- mpi: msmpi
mpiexec: mpiexec
runs-on: ${{ matrix.os }}
defaults:
run:
# Micromamba needs a login shell to make sure the environment is active
shell: bash -el {0}
env:
PYTEST_MPI_MAX_NPROCS: 3
steps:
- uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ".github/etc/test_environment_${{ matrix.mpi }}.yml"
create-args: >-
python=${{ matrix.python }}
- name: Install mpi-pytest
run: pip install --no-deps -e .
- name: Run tests
run: |
: # 'forking' mode
pytest -v tests
: # 'non-forking' mode
${{ matrix.mpiexec }} -n 1 pytest -v -m "not parallel or parallel[1]" tests
${{ matrix.mpiexec }} -n 2 pytest -v -m parallel[2] tests
${{ matrix.mpiexec }} -n 3 pytest -v -m parallel[3] tests