Sigma (#6) #36
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: null | |
jobs: | |
tests: | |
name: tests | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: n1hility/cancel-previous-runs@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: 3.9 | |
channels: conda-forge,defaults | |
channel-priority: strict | |
show-channel-urls: true | |
environment-file: environment.yaml | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: configure conda and install code | |
shell: bash -l {0} | |
run: | | |
python -m pip install -e . | |
mamba install -y -q \ | |
flake8 \ | |
pytest \ | |
pytest-mpi \ | |
setuptools \ | |
pip \ | |
poetry | |
- name: lint | |
shell: bash -l {0} | |
run: | | |
flake8 diffsmhm | |
- name: test | |
shell: bash -l {0} | |
run: | | |
export JAX_ENABLE_X64=True | |
export NUMBA_ENABLE_CUDASIM=1 | |
pytest -vvs diffsmhm | |
- name: test mpi 8 | |
shell: bash -l {0} | |
run: | | |
export JAX_ENABLE_X64=True | |
export NUMBA_ENABLE_CUDASIM=1 | |
mpirun -n 8 --oversubscribe python -m pytest -vv --only-mpi diffsmhm | |
- name: test mpi 12 | |
shell: bash -l {0} | |
run: | | |
export JAX_ENABLE_X64=True | |
export NUMBA_ENABLE_CUDASIM=1 | |
mpirun -n 12 --oversubscribe python -m pytest -vv --only-mpi diffsmhm |