Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning fixes: Github Actions Updates #562

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: CI test to build the CCPP-SCM on ubuntu v22.04
name: build the CCPP-SCM on latest Ubuntu runner

on: [pull_request,workflow_dispatch]

jobs:
build_scm:

# The type of runner that the job will run on
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
fortran-compiler: [gfortran-10, gfortran-11, gfortran-12]
fortran-compiler: [gfortran-10, gfortran-12]
build-type: [Release, Debug]
py-version: [3.7.13, 3.9.12]
py-version: [3.12.9]

# Environmental variables
env:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/bacio
key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key
key: cache-bacio-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-${{matrix.py-version}}-key

- name: Install bacio library v2.4.1
if: steps.cache-bacio-fortran.outputs.cache-hit != 'true'
Expand All @@ -90,7 +90,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/NCEPLIBS-sp
key: cache-sp-fortran-${{matrix.fortran-compiler}}-key
key: cache-sp-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-${{matrix.py-version}}-key

- name: Install SP-library v2.3.3
if: steps.cache-sp-fortran.outputs.cache-hit != 'true'
Expand All @@ -107,7 +107,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/myw3emc
key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key
key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-${{matrix.py-version}}-key

- name: Install w3emc library v2.9.2
if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true'
Expand All @@ -129,7 +129,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/netcdf-fortran
key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key
key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-${{matrix.py-version}}-key

- name: Install NetCDF Fortran library
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: CI test to build the CCPP-SCM on ubuntu v22.04
name: build the CCPP-SCM with Nvidia

on: [pull_request,workflow_dispatch]

jobs:

build_scm:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
fortran-compiler: [nvfortran]
build-type: [Release]#, Debug]
enable-gpu-acc: [False, True]
py-version: [3.7.13, 3.9.12]
build-type: [Release] #, Debug]
enable-gpu-acc: [False] #, True] # GPUs aren't available for testing
py-version: [3.10.16]

# Environmental variables
env:
Expand Down Expand Up @@ -90,35 +90,41 @@ jobs:
env:
NVCOMPILERS: /home/runner/hpc_sdk
NVARCH: Linux_x86_64
NVYEAR: 2025
NVVERSION: 25.1
CUDA_VERSION: 12.6
NVVERSION_PACKED: 251 # Manually take NVVERSION and remove . because funcationality not in actions
NVHPC_SILENT: true
NVHPC_INSTALL_DIR: /home/runner/hpc_sdk
NVHPC_INSTALL_TYPE: network
NVHPC_INSTALL_LOCAL_DIR: /home/runner/hpc_sdk
run: |
mkdir /home/runner/hpc_sdk && cd /home/runner/hpc_sdk
wget -q https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
tar xpzf nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
nvhpc_2024_241_Linux_x86_64_cuda_12.3/install
export PATH=${PATH}:${NVCOMPILERS}/${NVARCH}/24.1/compilers/bin
export MANPATH=${MANPATH}:${NVCOMPILERS}/${NVARCH}/24.1/compilers/man
wget -q https://developer.download.nvidia.com/hpc-sdk/${NVVERSION}/nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}.tar.gz
tar xpzf nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}.tar.gz
ls
nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}/install
export PATH=${PATH}:${NVCOMPILERS}/${NVARCH}/${NVVERSION}/compilers/bin
export MANPATH=${MANPATH}:${NVCOMPILERS}/${NVARCH}/${NVVERSION}/compilers/man
echo "The nvfortran installed is:"
nvfortran --version
echo "The path to nvfortran is:"
command -v nvfortran
echo "Removing tarball"
rm nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz

- name: Set environment for Nvidia compiler.
run: |
echo "CC=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvc" >> $GITHUB_ENV
echo "FC=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvfortran" >> $GITHUB_ENV
echo "CMAKE_C_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvc" >> $GITHUB_ENV
echo "CMAKE_Fortran_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvfortran" >> $GITHUB_ENV
rm nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}.tar.gz
echo "CC=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvc" >> $GITHUB_ENV
echo "FC=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvfortran" >> $GITHUB_ENV
echo "CMAKE_C_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvc" >> $GITHUB_ENV
echo "CMAKE_Fortran_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvfortran" >> $GITHUB_ENV

#######################################################################################
# Install FORTRAN dependencies
#######################################################################################

- name: Check space (pre dependency install)
run: |
df -h

- name: Install Curl and zlib
run: |
sudo apt-get update
Expand All @@ -142,6 +148,8 @@ jobs:
./configure --prefix=${HDF5_ROOT}
make -j
make install
cd ..
rm -rf hdf5-hdf5-1_14_1-2 hdf5-1_14_1-2.tar.gz

- name: Setup HDF5 Paths
run: |
Expand Down Expand Up @@ -175,6 +183,8 @@ jobs:
run: |
cd ${HOME}/openmpi-4.1.6
sudo make install -j
cd ..
rm -rf openmpi-4.1.6 openmpi-4.1.6.tar.gz

- name: Setup OpenMPI Paths
run: |
Expand Down Expand Up @@ -213,6 +223,8 @@ jobs:
CPPFLAGS="-I/home/runner/hdf5/include" LDFLAGS="-L/home/runner/hdf5/lib" ./configure --prefix=${NETCDF}
make
make install
cd ..
rm -rf netcdf-c-4.7.4 v4.7.4.tar.gz

- name: Install NetCDF Fortran library
if: steps.cache-netcdf.outputs.cache-hit != 'true'
Expand All @@ -223,6 +235,8 @@ jobs:
FCFLAGS="-fPIC" FFLAGS="-fPIC" CPPFLAGS="-I/home/runner/hdf5/include -I/home/runner/netcdf/include" LDFLAGS="-L/home/runner/hdf5/lib -L/home/runner/netcdf/lib" ./configure --prefix=${NETCDF}
make
make install
cd ..
rm -rf netcdf-fortran-4.6.1 v4.6.1.tar.gz

- name: Cache bacio library v2.4.1
id: cache-bacio-fortran
Expand All @@ -240,6 +254,8 @@ jobs:
make -j
make install
echo "bacio_DIR=/home/runner/bacio/lib/cmake/bacio" >> $GITHUB_ENV
cd ../../
rm -rf bacio

- name: Cache SP-library v2.3.3
id: cache-sp-fortran
Expand All @@ -257,6 +273,8 @@ jobs:
make -j
make install
echo "sp_DIR=/home/runner/NCEPLIBS-sp/lib/cmake/sp" >> $GITHUB_ENV
cd ../../
rm -rf NCEPLIBS-sp

- name: Cache w3emc library v2.9.2
id: cache-w3emc-fortran
Expand All @@ -274,6 +292,12 @@ jobs:
make -j
make install
echo "w3emc_DIR=/home/runner/myw3emc/lib/cmake/w3emc" >> $GITHUB_ENV
cd ../../
rm -rf NCEPLIBS-w3emc

- name: Check space (pre SCM build)
run: |
df -h

#######################################################################################
# Build and run SCM regression tests (ccpp-scm/test/rt_test_cases.py)
Expand All @@ -290,6 +314,10 @@ jobs:
cd ${SCM_ROOT}/scm/bin
make -j

- name: Check space (post SCM build)
run: |
df -h

- name: Download data for SCM
if: contains(matrix.enable-gpu-acc, 'False')
run: |
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci_run_scm_DEPHY.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: CI test to run the SCM with DEPHY v1 data
name: run the SCM with DEPHY v1 data

on: [pull_request,workflow_dispatch]

jobs:
run-scm-DEPHY:

# The type of runner that the job will run on
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
fortran-compiler: [gfortran-12]
build-type: [Release, Debug]
py-version: [3.7.13]
py-version: [3.10.16]

# Environmental variables
env:
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/bacio
key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key
key: cache-bacio-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install bacio library v2.4.1
if: steps.cache-bacio-fortran.outputs.cache-hit != 'true'
Expand All @@ -89,7 +89,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/NCEPLIBS-sp
key: cache-sp-fortran-${{matrix.fortran-compiler}}-key
key: cache-sp-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install SP-library v2.3.3
if: steps.cache-sp-fortran.outputs.cache-hit != 'true'
Expand All @@ -106,7 +106,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/myw3emc
key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key
key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install w3emc library v2.9.2
if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true'
Expand All @@ -126,7 +126,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/netcdf-fortran
key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key
key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install NetCDF Fortran library
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
Expand All @@ -151,7 +151,7 @@ jobs:
cd ${SCM_ROOT}
./contrib/get_all_static_data.sh
./contrib/get_thompson_tables.sh

- name: Configure build with CMake (Release)
if: contains(matrix.build-type, 'Release')
run: |
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/ci_run_scm_rts.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

name: CI test to build and run SCM regression tests
name: build and run SCM regression tests

on: [pull_request, workflow_dispatch]

jobs:
run_scm_rts:

# The type of runner that the job will run on
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
fortran-compiler: [gfortran-11]
build-type: [Release, Debug, SinglePrecision]
py-version: [3.9.12]
py-version: [3.10.16]

# Environmental variables
env:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/bacio
key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key
key: cache-bacio-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install bacio library v2.4.1
if: steps.cache-bacio-fortran.outputs.cache-hit != 'true'
Expand All @@ -95,7 +95,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/NCEPLIBS-sp
key: cache-sp-fortran-${{matrix.fortran-compiler}}-key
key: cache-sp-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install SP-library v2.3.3
if: steps.cache-sp-fortran.outputs.cache-hit != 'true'
Expand All @@ -112,7 +112,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/myw3emc
key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key
key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install w3emc library v2.9.2
if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true'
Expand All @@ -132,7 +132,7 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/netcdf-fortran
key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key
key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-${{matrix.build-type}}-key

- name: Install NetCDF Fortran library
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -217,7 +217,17 @@ jobs:
cd ${SCM_ROOT}/test
./cmp_rt2bl.py --dir_rt ${dir_rt} --dir_bl ${dir_bl}

- name: Check if SCM RT plots exist
id: check_files
run: |
if [ -n "$(ls -A /home/runner/work/ccpp-scm/ccpp-scm/test/scm_rt_out 2>/dev/null)" ]; then
echo "files_exist=true" >> "$GITHUB_ENV"
else
echo "files_exist=false" >> "$GITHUB_ENV"
fi

- name: Upload plots of SCM Baselines/RTs as GitHub Artifact.
if: env.files_exist == 'true'
uses: actions/upload-artifact@v4
with:
name: rt-plots-${{matrix.build-type}}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci_run_scm_ufs_replay.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: CI test to create SCM UFS-replay cases from UWM regression tests
name: create SCM UFS-replay cases from UWM regression tests

on: [pull_request,workflow_dispatch]

jobs:
run_scm_ufs_replay:

# The type of runner that the job will run on
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
Expand Down Expand Up @@ -45,6 +45,7 @@ jobs:
use-only-tar-bz2: true
auto-activate-base: true
auto-update-conda: true
conda-remove-defaults: "true"

#######################################################################################
# Create UFS-replay case for SCM using UWM Regression Tests
Expand Down
Loading
Loading