Skip to content

Paired with StylES commit: Added back multi-filter levels #5

Paired with StylES commit: Added back multi-filter levels

Paired with StylES commit: Added back multi-filter levels #5

Workflow file for this run

name: Tests
on: [push, pull_request]
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
standard_tests:
timeout-minutes: 60
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
env:
BOUT_TEST_TIMEOUT: "6m"
PETSC_DIR: /usr/lib/petscdir/3.7.7/x86_64-linux-gnu-real
PETSC_ARCH: ""
SLEPC_DIR: /usr/lib/slepcdir/3.7.4/x86_64-linux-gnu-real
SLEPC_ARCH: ""
OMP_NUM_THREADS: ${{ matrix.config.omp_num_threads }}
PYTHONPATH: ${{ github.workspace }}/tools/pylib
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
strategy:
fail-fast: false
matrix:
# Need this to be able to exclude the coverage job
is_master_or_next:
- ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next' || github.base_ref == 'master' || github.base_ref == 'next' }}
config:
- name: "Default options, Ubuntu 18.04"
os: ubuntu-18.04
configure_options: ""
script_flags: "-uim"
- name: "Optimised, shared, Python"
os: ubuntu-18.04
configure_options: "--enable-shared
--enable-checks=no
--enable-optimize=3
--disable-signal
--disable-track
--disable-backtrace
--with-petsc
--with-slepc
--with-sundials=/home/runner/local"
script_flags: "-uim -t shared -t python"
- name: "Debug, shared"
os: ubuntu-18.04
configure_options: "--enable-shared
--enable-sigfpe
--enable-debug
--enable-track
--with-petsc
--with-slepc
--with-sundials=/home/runner/local"
script_flags: "-uim"
- name: "CMake, shared, release, Ubuntu 20.04"
os: ubuntu-20.04
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DBOUT_ENABLE_OPENMP=ON
-DCMAKE_BUILD_TYPE=Release
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_BUILD_DOCS=OFF
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2
- name: "CMake, shared, OpenMP, Ubuntu 20.04, 3D metrics"
os: ubuntu-20.04
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DBOUT_ENABLE_METRIC_3D=ON
-DBOUT_ENABLE_OPENMP=ON
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2
- name: "Coverage"
os: ubuntu-18.04
configure_options: "--enable-shared
--enable-code-coverage
--enable-debug
--enable-track
--with-lapack
--with-petsc
--with-slepc
--with-sundials=/home/runner/local"
script_flags: "-u"
exclude:
# Don't run the coverage tests if the branch isn't master or next
- is_master_or_next: false
config:
name: "Coverage"
steps:
- name: Job information
run: |
echo Build: ${{ matrix.config.name }}, ${{ matrix.config.os }}
echo Configure options: ${{ matrix.config.configure_options }}
echo CMake options: ${{ matrix.config.cmake_options }}
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
libfftw3-dev
libnetcdf-dev
libnetcdf-c++4-dev
netcdf-bin
python3
python3-pip
python3-pytest
python3-numpy
python3-scipy
lcov
openmpi-bin
libopenmpi-dev
petsc-dev
slepc-dev
liblapack-dev
libparpack2-dev
- uses: actions/checkout@v2
with:
submodules: true
- name: Install pip packages
run: |
./.pip_install_for_travis.sh 'cython~=0.29' 'netcdf4~=1.5' 'sympy~=1.5' 'gcovr' 'cmake' 'h5py' zoidberg
# Add the pip install location to the runner's PATH
echo ~/.local/bin >> $GITHUB_PATH
- name: Cache SUNDIALS build
uses: actions/cache@v2
with:
path: /home/runner/local
key: bout-sundials-${{ matrix.config.os }}
- name: Build SUNDIALS
run: ./.build_sundials_for_travis.sh
- name: Build (configure)
if: ${{ ! contains(matrix.config.name, 'CMake') }}
run: ./.travis_script.sh ${{ matrix.config.script_flags }}
env:
LD_LIBRARY_PATH: /home/runner/local/lib:$LD_LIBRARY_PATH
CONFIGURE_OPTIONS: ${{ matrix.config.configure_options }}
- name: Build (CMake)
if: ${{ contains(matrix.config.name, 'CMake') }}
run: ./.ci_with_cmake.sh ${{ matrix.config.cmake_options }}
- name: Capture coverage
if: ${{ matrix.config.name == 'Coverage' }}
# Explicitly run the coverage capture target, because
# travis_script.sh also does the upload, and we're going to do
# that ourselves in the next step
run: |
# Ensure that there is a corresponding .gcda file for every .gcno file
# This is to try and make the coverage report slightly more accurate
# It still won't include, e.g. any solvers we don't build with though
find . -name "*.gcno" -exec sh -c 'touch -a "${1%.gcno}.gcda"' _ {} \;
make code-coverage-capture
- name: Upload coverage
if: ${{ matrix.config.name == 'Coverage' }}
uses: codecov/codecov-action@v1
Fedora:
# This is its own job as it doesn't use most of the steps of the
# standard_tests
timeout-minutes: 60
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Fedora rawhide
run: ./.travis_fedora.sh setup mpich rawhide
shell: bash
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}