Update cmake build #144
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
# CIME scripts regression tests | |
name: scripts regression tests | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, 3.11] | |
env: | |
CC: mpicc | |
FC: mpifort | |
CXX: mpicxx | |
CPPFLAGS: "-I/usr/include -I/usr/local/include" | |
CIME_TEST_PLATFORM: ubuntu-latest | |
# Versions of all dependencies can be updated here | |
PNETCDF_VERSION: pnetcdf-1.12.3 | |
NETCDF_FORTRAN_VERSION: v4.6.0 | |
MCT_VERSION: MCT_2.11.0 | |
PARALLELIO_VERSION: pio2_6_2 | |
NETCDF_C_PATH: /usr | |
NETCDF_FORTRAN_PATH: ${HOME}/netcdf-fortran | |
PNETCDF_PATH: ${HOME}/pnetcdf | |
CIME_MODEL: cesm | |
CIME_DRIVER: nuopc | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- id: load-env | |
run: | | |
sudo apt-get update | |
sudo apt-get install libxml2-utils pylint wget gfortran openmpi-bin netcdf-bin libopenmpi-dev cmake libnetcdf-dev pnetcdf-bin libpnetcdf-dev libnetcdff-dev | |
# - name: Set up Python ${{ matrix.python-version }} | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
# cache: 'pip' | |
# | |
# - name: pip install | |
# run: pip install PyYAML | |
- name: cesm checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: ESCOMP/CESM | |
path: cesm | |
- name: checkout submodules | |
run: | | |
pushd cesm | |
./bin/git-fleximod update ccs_config cdeps mct parallelio | |
pushd ccs_config | |
git checkout main | |
popd | |
git clone https://github.com/ESMCI/cime | |
pushd cime | |
if [[ ! -e "${PWD}/.gitmodules.bak" ]] | |
then | |
echo "Converting [email protected] to https://github.com urls in ${PWD}/.gitmodules" | |
sed -i".bak" "s/[email protected]:/https:\/\/github.com\//g" "${PWD}/.gitmodules" | |
fi | |
git submodule update --init | |
popd | |
pushd components/cdeps | |
git checkout main | |
git submodule update --init | |
popd | |
popd | |
- name: share checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ~/cesm/share | |
- name: Cache inputdata | |
if: ${{ ! env.ACT }} | |
uses: actions/cache@v4 | |
with: | |
path: $HOME/cesm/inputdata | |
key: inputdata | |
# | |
# The following can be used to ssh to the testnode for debugging | |
# see https://github.com/mxschmitt/action-tmate for details | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: scripts regression tests | |
run: | | |
mkdir -p $HOME/cesm/scratch | |
mkdir -p $HOME/cesm/inputdata | |
cd $HOME/work/CESM_share/CESM_share | |
ls -l $HOME/work/CESM_share/CESM_share | |
python -m pip install pytest pytest-cov | |
pytest -vvv --no-fortran-run --compiler gnu --mpilib openmpi --machine ubuntu-latest | |
# the following can be used by developers to login to the github server in case of errors | |
# see https://github.com/marketplace/actions/debugging-with-tmate for further details | |
# - name: Setup tmate session | |
# if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 |