Implementing the find_season_index routine #1479
Workflow file for this run
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: auto_test | |
# This action is triggered: | |
# 1. when someone creates a pull request for a merge to the main branch | |
# 2. when changes are merged into the main branch (via a pull request) | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Below are jobs, each of which runs sequentially. | |
jobs: | |
# This job builds the box model and runs our test suite. | |
build: | |
# A build matrix storing all desired configurations. | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] #, macos-latest] | |
build-type: [Debug, Release] | |
fp-precision: [single, double] | |
runs-on: ${{ matrix.os }} | |
# Environment variables | |
env: | |
CI: 1 # indicates that we are running in a CI environment. | |
# Steps for building and running tests. | |
steps: | |
- name: Installing dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \ | |
autoconf \ | |
clang-format \ | |
cmake \ | |
gcc \ | |
g++ \ | |
git \ | |
lcov \ | |
make \ | |
pkg-config \ | |
ca-certificates | |
- name: Checking out repository | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: recursive | |
- name: Cloning Haero | |
uses: actions/checkout@v3 | |
with: | |
repository: eagles-project/haero | |
submodules: recursive | |
path: haero_src | |
- name: Building Haero (${{ matrix.build-type }}, ${{ matrix.fp-precision }} precision) | |
run: | | |
cmake -S haero_src -B haero_build \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DCMAKE_INSTALL_PREFIX="haero_install" \ | |
-DCMAKE_C_COMPILER=gcc \ | |
-DCMAKE_CXX_COMPILER=g++ \ | |
-DHAERO_ENABLE_MPI=OFF \ | |
-DHAERO_ENABLE_GPU=OFF \ | |
-DKokkos_ARCH_AMDAVX:BOOL=ON \ | |
-DHAERO_PRECISION=${{ matrix.fp-precision }} | |
cd haero_build | |
make -j | |
make install | |
- name: Configuring MAM4xx (${{ matrix.build-type }}, ${{ matrix.fp-precision }} precision) | |
run: | | |
cmake -S . -B build \ | |
-DCMAKE_INSTALL_PREFIX=`pwd`/install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DMAM4XX_HAERO_DIR=`pwd`/haero_install \ | |
-DNUM_VERTICAL_LEVELS=72 \ | |
-DENABLE_COVERAGE=ON \ | |
-G "Unix Makefiles" | |
- name: Building MAM4xx (${{ matrix.build-type }}, ${{ matrix.fp-precision }} precision) | |
run: | | |
cd build | |
make | |
- name: Installing Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3' | |
- name: Installing Numpy | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install numpy | |
- name: Running tests (${{ matrix.build-type }}, ${{ matrix.fp-precision }} precision) | |
run: | | |
cd build | |
ctest -V --output-on-failure | |
- name: Installing MAM4xx (${{ matrix.build-type }}, ${{ matrix.fp-precision }} precision) | |
run: | | |
cd build | |
make install | |
- name: Evaluating code coverage | |
run: | | |
cd build | |
make coverage | |
- name: Uploading coverage report to codecov.io | |
if: ${{ (contains(matrix.os, 'ubuntu')) && (matrix.build-type == 'Debug') && (matrix.fp-precision == 'double') }} | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
files: build/coverage.info | |
name: mam4xx | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true |