Skip to content

Commit

Permalink
sync up against develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbk2004 committed Jan 18, 2024
2 parents bcdc9a2 + 68980ad commit 274032a
Show file tree
Hide file tree
Showing 145 changed files with 9,850 additions and 7,777 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/GCC.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This is a CI workflow for the fv3atm project.
#
# This workflow builds and tests the fv3atm library using GCC, and it tests
# different CMake build options.
#
# Alex Richert, 6 Dec 2023

name: GCC
on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
GCC:
runs-on: ubuntu-latest

strategy:
matrix:
cmake_opts: ["-D32BIT=ON", "-D32BIT=OFF"]
gcc_ver: ["11"]
mpi: ["mpich"]

steps:

- name: checkout-fv3atm
uses: actions/checkout@v3
with:
path: ${{ github.workspace }}/fv3atm
submodules: recursive

- name: cache-spack
id: cache-spack
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack-develop
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-2

# Building dependencies takes 40+ min
- name: spack-install
if: steps.cache-spack.outputs.cache-hit != 'true'
run: |
wget --no-verbose https://github.com/spack/spack/archive/refs/heads/develop.zip
unzip develop.zip -d ${GITHUB_WORKSPACE}/ &> unzip.out
. ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh
spack env create gcc${{ matrix.gcc_ver }} ${GITHUB_WORKSPACE}/fv3atm/ci/spack.yaml
spack env activate gcc${{ matrix.gcc_ver }}
spack compiler find | grep gcc@${{ matrix.gcc_ver }}
spack external find gmake cmake git git-lfs perl python ${{ matrix.mpi }}
spack config add "packages:all:require:['%gcc@${{ matrix.gcc_ver }}']"
spack config add "packages:mpi:require:'${{ matrix.mpi }}'"
spack concretize |& tee ${SPACK_ENV}/log.concretize
spack install -j2 --fail-fast
- name: cache-save
uses: actions/cache/save@v3
if: ${{ always() }}
with:
path: ${{ github.workspace }}/spack-develop
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-2

- name: build-fv3atm
run: |
. ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh
spack env activate gcc${{ matrix.gcc_ver }}
spack load $(spack find --format "{name}")
cd ${GITHUB_WORKSPACE}/fv3atm
git clone https://github.com/NOAA-EMC/CMakeModules
git clone --recurse-submodules https://github.com/NOAA-PSL/stochastic_physics stochastic_physics_repo
mkdir ${GITHUB_WORKSPACE}/build
cd ${GITHUB_WORKSPACE}/build
cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }}
make -j2
- name: debug-artifacts
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: ccpp_prebuild_logs
path: ${{ github.workspace }}/build/ccpp/ccpp_prebuild.*
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Enable CI build & unit testing:
if(BUILD_TESTING)
cmake_minimum_required(VERSION 3.19)
project(fv3atm VERSION 1.0 LANGUAGES C CXX Fortran)
include(ci/CMakeLists.txt)
endif()

###############################################################################
### CCPP
Expand Down Expand Up @@ -85,9 +91,13 @@ add_library(fv3atm
cpl/module_block_data.F90
cpl/module_cplfields.F90
cpl/module_cap_cpl.F90
io/clm_lake_io.F90
io/FV3GFS_io.F90
io/FV3GFS_restart_io.F90
io/fv3atm_common_io.F90
io/fv3atm_clm_lake_io.F90
io/fv3atm_rrfs_sd_io.F90
io/fv3atm_sfc_io.F90
io/fv3atm_oro_io.F90
io/fv3atm_history_io.F90
io/fv3atm_restart_io.F90
io/module_write_netcdf.F90
io/module_write_restart_netcdf.F90
io/module_fv3_io_def.F90
Expand Down
123 changes: 66 additions & 57 deletions atmos_model.F90

Large diffs are not rendered by default.

Loading

0 comments on commit 274032a

Please sign in to comment.