Skip to content

ci

ci #1543

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.10'
- 3.11
- 3.12
- 3.13
mpi: [ 'openmpi' ]
install-options: [ '.', '.[hdf5,netcdf,pandas,zarr]' ]
pytorch-version:
- 'numpy==1.26 torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2'
- 'numpy==1.26 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'
- 'torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0'
- 'torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1'
exclude:
- py-version: '3.13'
pytorch-version: 'numpy==1.26 torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2'
- py-version: '3.13'
pytorch-version: 'numpy==1.26 torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2'
- py-version: '3.13'
pytorch-version: 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
- py-version: '3.13'
pytorch-version: 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
- py-version: '3.13'
pytorch-version: 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
- py-version: '3.12'
pytorch-version: 'numpy==1.26 torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2'
- py-version: '3.12'
pytorch-version: 'numpy==1.26 torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2'
- py-version: '3.10'
install-options: '.[hdf5,netcdf,pandas,zarr]'
name: Python ${{ matrix.py-version }} with ${{ matrix.pytorch-version }}; options ${{ matrix.install-options }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup MPI
uses: mpi4py/setup-mpi@3969f247e8fceef153418744f9d9ee6fdaeda29f # v1.2.0
with:
mpi: ${{ matrix.mpi }}
- name: Use Python ${{ matrix.py-version }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.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/