Update Makefile #1430
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
# Run these tests automatically on Github | |
# on every push and pull request. | |
name: NumericalTests | |
on: [push, pull_request] | |
# We run the in a bash shell | |
defaults: | |
run: | |
shell: bash | |
# Define the tests, for now we only have <standard_tests> | |
# where we define 3 seperate workflows in matrix/config/name | |
# For each of these workflows we need to perform the same | |
# initial steps: <Install dependencies>, <System information> | |
# Next, only the step corresponding to the test will be executed. | |
jobs: | |
# Build stella with Make in debug mode, here the python tests do not work! | |
# Specifically, the flush statement in mini_libstell's | |
# read_wout_mod.F module in the readw_and_open() routine breaks | |
# when reading a VMEC equilibirium during the python tests. | |
test1: | |
runs-on: ubuntu-latest | |
env: | |
OMPI_MCA_rmaps_base_oversubscribe: yes | |
MPIRUN: mpiexec -np | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: "Make stella in debug mode" | |
steps: | |
- name: Install dependencies | |
run: sudo apt update && | |
sudo apt install -y | |
gfortran | |
make | |
libfftw3-dev | |
libnetcdf-dev | |
libnetcdff-dev | |
netcdf-bin | |
python3 | |
python3-pip | |
openmpi-bin | |
libopenmpi-dev | |
- name: System information | |
run: | | |
cat /etc/*release | |
gfortran --version | |
nf-config --all | |
- uses: actions/checkout@v2 | |
- name: Build stella in debug mode | |
run: | | |
set -ex | |
export STELLA_SYSTEM=gnu_ubuntu_debug | |
git submodule update --init --recursive | |
make -I Makefiles -j12 | |
# Build stella with Make and run automatic fortran tests | |
test2: | |
runs-on: ubuntu-latest | |
env: | |
OMPI_MCA_rmaps_base_oversubscribe: yes | |
MPIRUN: mpiexec -np | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: "Perform fortran tests of the stella code" | |
steps: | |
- name: Install dependencies | |
run: sudo apt update && | |
sudo apt install -y | |
gfortran | |
make | |
libfftw3-dev | |
libnetcdf-dev | |
libnetcdff-dev | |
netcdf-bin | |
python3 | |
python3-pip | |
openmpi-bin | |
libopenmpi-dev | |
- name: System information | |
run: | | |
cat /etc/*release | |
gfortran --version | |
nf-config --all | |
- uses: actions/checkout@v2 | |
- name: Build stella | |
run: | | |
set -ex | |
export STELLA_SYSTEM=gnu_ubuntu | |
git submodule update --init --recursive | |
make -I Makefiles -j12 | |
- name: Build pFUnit library | |
run: | | |
set -ex | |
export STELLA_SYSTEM=gnu_ubuntu | |
make -I Makefiles -j4 build-pfunit-library | |
- name: Perform automated Fortran tests | |
run: | | |
set -ex | |
export STELLA_SYSTEM=gnu_ubuntu | |
make -I Makefiles -j4 run-automated-fortran-tests | |
# Build stella with Make and run automatic python tests | |
test3: | |
runs-on: ubuntu-latest | |
env: | |
OMPI_MCA_rmaps_base_oversubscribe: yes | |
MPIRUN: mpiexec -np | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: "Run stella and check the outputs numerically" | |
steps: | |
- name: Install dependencies | |
run: sudo apt update && | |
sudo apt install -y | |
gfortran | |
make | |
libfftw3-dev | |
libnetcdf-dev | |
libnetcdff-dev | |
netcdf-bin | |
python3 | |
python3-pip | |
openmpi-bin | |
libopenmpi-dev | |
- name: System information | |
run: | | |
cat /etc/*release | |
gfortran --version | |
nf-config --all | |
- uses: actions/checkout@v2 | |
- name: Install automated stella test dependencies | |
run: pip3 install --user -r AUTOMATIC_TESTS/requirements.txt | |
- name: Build stella | |
run: | | |
set -ex | |
export STELLA_SYSTEM=gnu_ubuntu | |
git submodule update --init --recursive | |
make -I Makefiles -j12 | |
- name: Perform numerical tests for stella with Python | |
run: | | |
set -ex | |
export STELLA_SYSTEM=gnu_ubuntu | |
make -I Makefiles numerical-tests | |
# Build stella with CMake and run automatic Fortran tests | |
# Cmake has to run on 1 node or it will run into parallelisation errors | |
test4: | |
runs-on: ubuntu-latest | |
env: | |
OMPI_MCA_rmaps_base_oversubscribe: yes | |
MPIRUN: mpiexec -np | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: "CMake stella" | |
steps: | |
- name: Install dependencies | |
run: sudo apt update && | |
sudo apt install -y | |
gfortran | |
make | |
libfftw3-dev | |
libnetcdf-dev | |
libnetcdff-dev | |
netcdf-bin | |
python3 | |
python3-pip | |
openmpi-bin | |
libopenmpi-dev | |
- name: System information | |
run: | | |
cat /etc/*release | |
gfortran --version | |
nf-config --all | |
- uses: actions/checkout@v2 | |
- name: Build stella (CMake) | |
run: | | |
set -ex | |
git submodule update --init --recursive | |
cmake . -B COMPILATION/build_cmake -DSTELLA_ENABLE_TESTS=on | |
cmake --build COMPILATION/build_cmake -j12 --target check |