Skip to content

Commit

Permalink
Split GCC.yml workflow into two jobs, build_spack and build_fv3atm
Browse files Browse the repository at this point in the history
  • Loading branch information
DusanJovic-NOAA committed Mar 20, 2024
1 parent a46d3e6 commit b2e1223
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/GCC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,16 @@ on:
- develop

jobs:
GCC:
build_spack:
runs-on: ubuntu-latest

strategy:
matrix:
cmake_opts: ["-D32BIT=ON", "-D32BIT=OFF"]
gcc_ver: ["12"]
mpi: ["openmpi"]

steps:

- name: install-doxygen
run: |
sudo apt-get install doxygen graphviz
- name: checkout-fv3atm
uses: actions/checkout@v3
with:
Expand All @@ -41,7 +36,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack-develop
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}-${{ matrix.cmake_opts }}
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}

# Building dependencies takes 40+ min
- name: spack-install
Expand All @@ -60,6 +55,35 @@ jobs:
spack install -j2 --fail-fast
spack clean --all
build_fv3atm:
needs: build_spack
runs-on: ubuntu-latest

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

steps:

- name: install-doxygen
run: |
sudo apt-get install doxygen graphviz
- 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 }}-${{ matrix.mpi }}

- name: build-fv3atm
run: |
. ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh
Expand Down

0 comments on commit b2e1223

Please sign in to comment.