Skip to content

ci

ci #1244

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.1 torchvision==0.19.1 torchaudio==2.4.1'
- 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
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@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout
uses: actions/[email protected]
- name: Setup MPI
uses: mpi4py/[email protected]
with:
mpi: ${{ matrix.mpi }}
- name: Use Python ${{ matrix.py-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.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/