Skip to content

Commit

Permalink
Merge remote-tracking branch 'alex/fix/gh_ci' into fix/gh_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Dec 30, 2024
2 parents 737c6b8 + 6c4d035 commit 8b3ab0b
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 18 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ defaults:

env:
cache_key: gcc
CC: gcc-10
FC: gfortran-10
CXX: g++-10
CC: gcc-13
FC: gfortran-13
CXX: g++-13

# The jobs are split into:
# 1. a dependency build step (setup), and
Expand All @@ -34,7 +34,7 @@ jobs:
# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
spack
Expand All @@ -43,19 +43,18 @@ jobs:

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
# if: steps.cache-env.outputs.cache-hit != 'true'
run: |
sudo apt-get install cmake
rm -rf spack
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create gsi-env gsi/ci/spack.yaml
spack env create gsi-env gsi/ci/spack_gcc.yaml
spack env activate gsi-env
spack compiler find
sudo apt install cmake
spack external find
spack add [email protected]
spack concretize
spack install -v --fail-fast --dirty
spack install --fail-fast --dirty
spack clean -a
gsi:
Expand All @@ -70,7 +69,7 @@ jobs:

- name: cache-env
id: cache-env
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
spack
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
DOCKER_IMGS=$(docker image ls -aq)
if [[ ! -z "${DOCKER_IMGS}" ]]; then docker rmi ${DOCKER_IMGS}; fi
df -h
# Checkout the GSI to get the ci/spack.yaml file
- name: checkout
Expand All @@ -52,9 +54,10 @@ jobs:
spack
~/.spack
/opt/intel
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi/ci/spack.yaml') }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi/ci/spack.yaml') }}-1

- name: install-intel-compilers
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
Expand All @@ -70,16 +73,15 @@ jobs:
run: |
sudo mv /usr/local/ /usr_local_mv
sudo apt-get install cmake
rm -rf spack
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create gsi-env gsi/ci/spack.yaml
spack env create gsi-env gsi/ci/spack_intel.yaml
spack env activate gsi-env
spack compiler find
sudo apt install cmake
spack external find
spack add intel-oneapi-mpi
spack concretize
spack install -v --fail-fast --dirty
spack install --fail-fast --dirty
spack clean -a
gsi:
Expand Down Expand Up @@ -108,6 +110,8 @@ jobs:

- name: build
run: |
sudo mv /usr/local/ /usr_local_mv
sudo apt-get install cmake libblas-dev liblapack-dev
source spack/share/spack/setup-env.sh
spack env activate gsi-env
cd gsi
Expand Down
30 changes: 30 additions & 0 deletions ci/spack_gcc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Spack environment file to build GSI dependencies
spack:
packages:
all:
providers:
blas: [openblas]
lapack: [openblas]
mpi: [mpich]
compiler:
- gcc@13
specs:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
view: true
concretizer:
unify: true
6 changes: 4 additions & 2 deletions ci/spack.yaml → ci/spack_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
spack:
packages:
all:
providers:
mpi: [intel-oneapi-mpi]
compiler:
- intel
- gcc@10:10
specs:
- [email protected]
- [email protected] ~blosc build_system=cmake
- [email protected]
- [email protected]
- [email protected]
Expand All @@ -20,6 +21,7 @@ spack:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
view: true
concretizer:
unify: true

0 comments on commit 8b3ab0b

Please sign in to comment.