Test NUOPC cap #193
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: test_datm_lnd | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
branches: [ develop ] | |
schedule: | |
- cron: '0 0 * * MON' | |
- cron: '0 0 * * FRI' | |
workflow_dispatch: | |
jobs: | |
latest-stable: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
test: [test_datm_lnd] | |
esmf: [8.4.2] | |
env: | |
# set token to access gh command | |
GH_TOKEN: ${{ github.token }} | |
# installation location for application | |
APP_INSTALL_DIR: ${{ github.workspace }}/app | |
# installation location for dependencies | |
DEP_INSTALL_DIR: ~/.spack-ci | |
# option for retention period for artifacts, default is 90 days | |
ARTIFACTS_RETENTION_PERIOD: 2 | |
steps: | |
# test component | |
- name: Test Component | |
uses: esmf-org/nuopc-comp-testing@feature/v1.2 | |
with: | |
app_install_dir: ${{ env.APP_INSTALL_DIR }} | |
artifacts_files: | | |
${{ env.APP_INSTALL_DIR }}/run/PET* | |
${{ env.APP_INSTALL_DIR }}/run/*.txt | |
${{ env.APP_INSTALL_DIR }}/run/*.log | |
${{ env.APP_INSTALL_DIR }}/run/comp.test.lnd.out.2000-01-01-75600.* | |
baseline_files: | | |
${{ env.APP_INSTALL_DIR }}/run/comp.test.*.nc | |
cache_input_file_list: | | |
${{ env.APP_INSTALL_DIR }}/run/INPUT | |
${{ env.APP_INSTALL_DIR }}/run/fd_nems.yaml | |
component_build: | | |
export PATH=${{ env.DEP_INSTALL_DIR }}/view/bin:$PATH | |
export ESMFMKFILE=${{ env.DEP_INSTALL_DIR }}/view/lib/esmf.mk | |
export NetCDF_ROOT=${{ env.DEP_INSTALL_DIR }}/view | |
export FC=gfortran | |
cd ${{ env.APP_INSTALL_DIR }}/noahmp | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=${{ env.APP_INSTALL_DIR }} -DOPENMP=ON ../ | |
make | |
make install | |
component_module_name: lnd_comp_nuopc | |
data_component_name: datm | |
dependencies: | | |
[email protected] precision=32,64 | |
esmf@${{ matrix.esmf }}+external-parallelio | |
dependencies_install_dir: ${{ env.DEP_INSTALL_DIR }} | |
mpirun_args: --oversubscribe -np 6 --mca btl_tcp_if_include eth0 | |
test_definition: ${{ env.APP_INSTALL_DIR }}/noahmp/.github/workflows/tests/${{ matrix.test }}.yaml |