Skip to content
128 changes: 122 additions & 6 deletions .github/workflows/idefix-ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,132 @@
name: Idefix CIs
run-name: ${{ github.actor }} is learning GitHub Actions
on:
workflow_dispatch:
push:
branches:
- main
pull_request:

jobs:
Hydro:
Linter:
# Don't do this in forks
if: github.repository == 'idefix-code/idefix'
runs-on: self-hosted
uses: actions/checkout
steps:
- run: cd test
- run: ./checks_hydro.sh $TEST_OPTIONS
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: false
- run: pre-commit install
- run: pre-commit run --all-files

Hydrodynamics:
needs: Linter
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run Hydro test
run: cd test && ./checks_hydro.sh $TEST_OPTIONS

Magneto-Hydrodynamics:
needs: Linter
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run MHD test
run: cd test && ./checks_mhd.sh $TEST_OPTIONS

MPI:
needs: Linter
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run MPI test
run: cd test && ./checks_mpi.sh $TEST_OPTIONS

VectorPotential:
needs: [Linter, Hydrodynamics, Magneto-Hydrodynamics, MPI]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run Vector Potential test
run: cd test && ./checks_vector_potential.sh $TEST_OPTIONS

HighOrder:
needs: [Linter, Hydrodynamics, Magneto-Hydrodynamics, MPI]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run high order test
run: cd test && ./checks_highorder.sh $TEST_OPTIONS

SinglePrecision:
needs: [Linter, Hydrodynamics, Magneto-Hydrodynamics, MPI]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run single precision test
run: cd test && ./checks_singleprecision.sh $TEST_OPTIONS

Examples:
needs: [VectorPotential, HighOrder,SinglePrecision]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run examples test
run: cd test && ./checks_examples.sh $TEST_OPTIONS

Utils:
needs: [VectorPotential, HighOrder,SinglePrecision]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
# Manually do a git LFS https://github.com/actions/checkout/issues/270
- run: git lfs pull
- name: Run utils test
run: cd test && ./checks_utils.sh $TEST_OPTIONS