Workflow: label run_ci_matrix
allows to start the full CI-matrix manually
#1
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: ci | |
on: | |
pull_request: | |
types: [labeled] | |
jobs: | |
approved: | |
if: ${{ github.event.label.name == 'run_ci_onmac' }} | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
py-version: | |
- 3.8 | |
- 3.9 | |
- '3.10' | |
- 3.11 | |
mpi: [ 'openmpi' ] | |
install-options: [ '.', '.[hdf5,netcdf]' ] | |
pytorch-version: | |
- 'torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1' | |
- 'torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1' | |
- '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' | |
exclude: | |
- py-version: '3.11' | |
pytorch-version: 'torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1' | |
- py-version: '3.11' | |
pytorch-version: 'torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1' | |
name: Python ${{ matrix.py-version }} with ${{ matrix.pytorch-version }}; options ${{ matrix.install-options }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
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@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.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/ |