Skip to content

Commit 4ef2eac

Browse files
Split GCC.yml workflow into two jobs, build_spack and build_fv3atm
1 parent a46d3e6 commit 4ef2eac

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

.github/workflows/GCC.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,16 @@ on:
1515
- develop
1616

1717
jobs:
18-
GCC:
18+
build_spack:
1919
runs-on: ubuntu-latest
2020

2121
strategy:
2222
matrix:
23-
cmake_opts: ["-D32BIT=ON", "-D32BIT=OFF"]
2423
gcc_ver: ["12"]
2524
mpi: ["openmpi"]
2625

2726
steps:
2827

29-
- name: install-doxygen
30-
run: |
31-
sudo apt-get install doxygen graphviz
32-
3328
- name: checkout-fv3atm
3429
uses: actions/checkout@v3
3530
with:
@@ -41,7 +36,7 @@ jobs:
4136
uses: actions/cache@v3
4237
with:
4338
path: ${{ github.workspace }}/spack-develop
44-
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}-${{ matrix.cmake_opts }}
39+
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}
4540

4641
# Building dependencies takes 40+ min
4742
- name: spack-install
@@ -60,6 +55,35 @@ jobs:
6055
spack install -j2 --fail-fast
6156
spack clean --all
6257
58+
build_fv3atm:
59+
needs: build_spack
60+
runs-on: ubuntu-latest
61+
62+
strategy:
63+
matrix:
64+
cmake_opts: ["-D32BIT=ON", "-D32BIT=OFF"]
65+
gcc_ver: ["12"]
66+
mpi: ["openmpi"]
67+
68+
steps:
69+
70+
- name: install-doxygen
71+
run: |
72+
sudo apt-get install doxygen graphviz
73+
74+
- name: checkout-fv3atm
75+
uses: actions/checkout@v3
76+
with:
77+
path: ${{ github.workspace }}/fv3atm
78+
submodules: recursive
79+
80+
- name: cache-spack
81+
id: cache-spack
82+
uses: actions/cache@v3
83+
with:
84+
path: ${{ github.workspace }}/spack-develop
85+
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}
86+
6387
- name: build-fv3atm
6488
run: |
6589
. ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh

0 commit comments

Comments
 (0)