CI #454
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: | |
workflow_run: | |
workflows: [ExtractND] | |
types: | |
- completed | |
jobs: | |
run-typical-cases: | |
name: Run typical 2D and 3D cases | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dimension: [2, 3] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
repository: "NaokiHori/SimpleNSSolver" | |
ref: ${{ matrix.dimension }}d | |
submodules: "recursive" | |
- name: Install dependencies | |
run: | | |
sudo apt-get -y update && \ | |
sudo apt-get -y install make libopenmpi-dev libfftw3-dev | |
- name: Setup headless display | |
uses: pyvista/setup-headless-display-action@main | |
- name: Install python dependencies for pre- and post-processings | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy matplotlib pyvista | |
- name: Pre-process, execute, and post-process | |
run: | | |
bash docs/source/examples/typical/data/exec_${{ matrix.dimension }}d.sh | |
- name: Upload artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: typical-cases-${{ matrix.dimension }}d | |
path: artifacts | |
check-energy-conservations: | |
name: Check discrete energy conservations | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dimension: [2, 3] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
repository: "NaokiHori/SimpleNSSolver" | |
ref: ${{ matrix.dimension }}d | |
submodules: "recursive" | |
- name: Install dependencies | |
run: | | |
sudo apt-get -y update && \ | |
sudo apt-get -y install make libopenmpi-dev libfftw3-dev | |
- name: Install python dependencies for pre- and post-processings | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy matplotlib | |
- name: Pre-process, execute, and post-process | |
run: | | |
bash docs/source/examples/energy/data/exec_${{ matrix.dimension }}d.sh | |
- name: Upload artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: check-energy-conservations-${{ matrix.dimension }}d | |
path: artifacts | |
check-nusselt-agreements: | |
name: Check Nusselt number agreements | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dimension: [2, 3] | |
prandtl: ["1.e-1", "1.e+0", "1.e+1"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
repository: "NaokiHori/SimpleNSSolver" | |
ref: ${{ matrix.dimension }}d | |
submodules: "recursive" | |
- name: Install dependencies | |
run: | | |
sudo apt-get -y update && \ | |
sudo apt-get -y install make libopenmpi-dev libfftw3-dev | |
- name: Install python dependencies for pre- and post-processings | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy matplotlib | |
- name: Pre-process, execute, and post-process | |
run: | | |
bash docs/source/examples/nu/data/exec_${{ matrix.dimension }}d.sh ${{ matrix.prandtl }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: check-nusselt-agreements-${{ matrix.prandtl }}-${{ matrix.dimension }}d | |
path: artifacts | |
check-gl-exec: | |
name: Check GL theory, execution | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rayleigh: ["1.0e+4", "3.1e+4", "1.0e+5", "3.1e+5", "1.0e+6", "3.1e+6", "1.0e+7", "3.1e+7", "1.0e+8"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
repository: "NaokiHori/SimpleNSSolver" | |
ref: "2d" | |
submodules: "recursive" | |
- name: Install dependencies | |
run: | | |
sudo apt-get -y update && \ | |
sudo apt-get -y install make libopenmpi-dev libfftw3-dev | |
- name: Install python dependencies for pre-processing | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy | |
- name: Pre-process, execute, and post-process | |
run: | | |
bash docs/source/examples/gl/data/exec.sh ${{ matrix.rayleigh }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: gl-${{ matrix.rayleigh }} | |
path: artifacts | |
check-gl-post: | |
name: Check GL theory, post-process | |
runs-on: ubuntu-latest | |
needs: check-gl-exec | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
repository: "NaokiHori/SimpleNSSolver" | |
ref: "2d" | |
submodules: "recursive" | |
- name: Install python dependencies for post-processings | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy matplotlib | |
- name: Prepare place for dat files | |
run: | | |
mkdir data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-1.0e+4 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-3.1e+4 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-1.0e+5 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-3.1e+5 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-1.0e+6 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-3.1e+6 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-1.0e+7 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-3.1e+7 | |
path: data | |
- name: Download artifacts | |
uses: actions/download-artifact@main | |
with: | |
name: gl-1.0e+8 | |
path: data | |
- name: Create figure from data | |
run: | | |
mkdir artifacts | |
python \ | |
docs/source/examples/gl/data/process.py \ | |
data \ | |
artifacts/nu_ra.png | |
- name: Upload artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: gl | |
path: artifacts | |