Skip to content

Merge pull request #27 from jedwards4b/remove_smp_present #71

Merge pull request #27 from jedwards4b/remove_smp_present

Merge pull request #27 from jedwards4b/remove_smp_present #71

Workflow file for this run

# 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 main 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.10.9 ]
env:
CC: mpicc
FC: mpifort
CXX: mpicxx
CPPFLAGS: "-I/usr/include -I/usr/local/include "
LDFLAGS: "-L/usr/lib/x86_64-linux-gnu -lnetcdf -lnetcdff -lpnetcdf"
# Versions of all dependencies can be updated here
CIME_MODEL: cesm
CIME_DRIVER: mct
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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
- name: Setup Ubuntu Environment
id: load-env
run: |
set -x
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install netcdf-bin
sudo apt-get install libnetcdf-dev
sudo apt-get install libnetcdff-dev
sudo apt-get install pnetcdf-bin
sudo apt-get install libpnetcdf-dev
sudo apt-get install doxygen
sudo apt-get install graphviz
sudo apt-get install wget
sudo apt-get install gfortran
sudo apt-get install libjpeg-dev
sudo apt-get install libz-dev
sudo apt-get install openmpi-bin
sudo apt-get install libopenmpi-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: echo "PyYAML" > requirements.txt
- name: Install PyYAML
run: pip install -r requirements.txt
# use the latest cesm main
- name: cesm checkout
uses: actions/checkout@v3
with:
repository: ESCOMP/CESM
path: cesm
# this cpl7 commit
- name: cpl7 checkout
uses: actions/checkout@v3
with:
path: cesm/components/cpl7
# Checkout cesm datamodels and support
- name: checkout externals
run: |
pushd cesm
./manage_externals/checkout_externals ccs_config cime share mct parallelio
pushd cime
git checkout master
popd
- name: Cache inputdata
id: cache-inputdata
uses: actions/cache@v3
with:
path: $HOME/cesm/inputdata
key: inputdata
- name: PREP for scripts regression test
run: |
mkdir -p $HOME/cesm/scratch
mkdir -p $HOME/cesm/inputdata
pushd $GITHUB_WORKSPACE/cesm/cime/CIME/tests
export SRCROOT=$GITHUB_WORKSPACE/cesm/
export CIME_TEST_PLATFORM=ubuntu-latest
export PNETCDF_PATH=/usr
pushd /usr/lib
sudo ln -fs x86_64-linux-gnu/*netcdf* .
popd
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
cat <<EOF >> $GITHUB_WORKSPACE/cesm/ccs_config/machines/cmake_macros/ubuntu-latest.cmake
set(NETCDF_PATH /usr)
EOF
printenv >> $GITHUB_ENV
popd
- name: scripts regression tests
run: |
pushd $GITHUB_WORKSPACE/cesm/cime/CIME/tests
./scripts_regression_tests.py --no-fortran-run --compiler gnu --mpilib openmpi --machine ubuntu-latest
popd
# 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