Skip to content

Commit

Permalink
Merge pull request #300 from idefix-code/test-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
glesur authored Dec 13, 2024
2 parents 579ceaa + 13c34d3 commit 4dd1f5a
Show file tree
Hide file tree
Showing 4 changed files with 239 additions and 266 deletions.
203 changes: 203 additions & 0 deletions .github/workflows/idefix-ci-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
on:
workflow_call:
inputs:
TESTME_OPTIONS:
required: true
type: string
IDEFIX_COMPILER:
required: true
type: string

# concurrency:
# # auto-cancel any concurrent job *in the same context*
# # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
# # see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

env:
IDEFIX_COMPILER: ${{ inputs.IDEFIX_COMPILER }}
TESTME_OPTIONS: ${{ inputs.TESTME_OPTIONS }}
PYTHONPATH: ${{ github.workspace }}
IDEFIX_DIR: ${{ github.workspace }}

jobs:
ShocksHydro:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod -all $TESTME_OPTIONS
- name: Isothermal Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod-iso -all $TESTME_OPTIONS
- name: Mach reflection test
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD//MachReflection -all $TESTME_OPTIONS

ParabolicHydro:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Viscous flow past cylinder
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder -all $TESTME_OPTIONS
- name: Viscous disk
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ViscousDisk -all $TESTME_OPTIONS
- name: Thermal diffusion
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/thermalDiffusion -all $TESTME_OPTIONS

ShocksMHD:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: MHD Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod -all $TESTME_OPTIONS
- name: MHD Isothermal Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod-iso -all $TESTME_OPTIONS
- name: Orszag Tang
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang -all $TESTME_OPTIONS
- name: Orszag Tang 3D+restart tests
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang3D -all $TESTME_OPTIONS

ParabolicMHD:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Ambipolar C Shock
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AmbipolarCshock -all $TESTME_OPTIONS
- name: Ambipolar C Shock 3D
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AmbipolarCshock3D -all $TESTME_OPTIONS
- name: Resistive Alfvén wave
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/ResistiveAlfvenWave -all $TESTME_OPTIONS
- name: Grid coarsening diffusion
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/Coarsening -all $TESTME_OPTIONS
- name: Hall whistler waves
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/HallWhistler -all $TESTME_OPTIONS

Fargo:
needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Fargo + planet
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/FargoPlanet -all $TESTME_OPTIONS
- name: Fargo MHD spherical
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/FargoMHDSpherical -all $TESTME_OPTIONS

ShearingBox:
needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Hydro shearing box
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ShearingBox -all $TESTME_OPTIONS
- name: MHD shearing box
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/ShearingBox -all $TESTME_OPTIONS

SelfGravity:
needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Jeans Instability
run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/JeansInstability -all $TESTME_OPTIONS
- name: Random sphere spherical
run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/RandomSphere -all $TESTME_OPTIONS
- name: Random sphere cartesian
run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/RandomSphereCartesian -all $TESTME_OPTIONS
- name: Uniform spherical collapse
run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/UniformCollapse -all $TESTME_OPTIONS
- name: Dusty spherical collapse
run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/DustyCollapse -all $TESTME_OPTIONS

Planet:
needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: 3 body
run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/Planet3Body -all $TESTME_OPTIONS
- name: migration
run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetMigration2D -all $TESTME_OPTIONS
- name: planet-planet
run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetPlanetRK42D -all $TESTME_OPTIONS
- name: spiral wake
run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetSpiral2D -all $TESTME_OPTIONS
- name: torques
run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetTorque3D -all $TESTME_OPTIONS
- name: RK5
run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D -all $TESTME_OPTIONS

Dust:
needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Energy conservation
run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustEnergy -all $TESTME_OPTIONS
- name: Dusty wave
run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustyWave -all $TESTME_OPTIONS

Braginskii:
needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: MTI
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/MTI -all $TESTME_OPTIONS
- name: Spherical anisotropic diffusion
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragTDiffusion -all $TESTME_OPTIONS
- name: Spherical anisotropic viscosity
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragViscosity -all $TESTME_OPTIONS

Examples:
needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run examples test
run: cd test && ./checks_examples.sh $TEST_OPTIONS

Utils:
needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Lookup table
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/lookupTable -all $TESTME_OPTIONS
- name: Dump Image
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/dumpImage -all $TESTME_OPTIONS
Loading

0 comments on commit 4dd1f5a

Please sign in to comment.