Skip to content

ci

ci #1151

Workflow file for this run

name: ci
on:
pull_request_review:
types: [submitted]
jobs:
approved:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py-version:
- 3.9
- '3.10'
- 3.11
- 3.12
mpi: [ 'openmpi' ]
install-options: [ '.', '.[hdf5,netcdf,pandas]' ]
pytorch-version:
- 'torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2'
- 'torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2'
- 'torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2'
- 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
- 'torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0'
exclude:
- py-version: '3.12'
pytorch-version: 'torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2'
- py-version: '3.12'
pytorch-version: 'torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2'
- py-version: '3.12'
pytorch-version: 'torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2'
name: Python ${{ matrix.py-version }} with ${{ matrix.pytorch-version }}; options ${{ matrix.install-options }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4.1.7
- name: Setup MPI
uses: mpi4py/setup-mpi@v1.2.0
with:
mpi: ${{ matrix.mpi }}
- name: Use Python ${{ matrix.py-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.py-version }}
architecture: x64
- name: Test
run: |
pip install pytest
pip install ${{ matrix.pytorch-version }} --extra-index-url https://download.pytorch.org/whl/cpu
pip install ${{ matrix.install-options }}
mpirun -n 3 pytest heat/
mpirun -n 4 pytest heat/