Skip to content

Commit

Permalink
use a common spack.yaml and do sed stuff in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul committed Aug 16, 2023
1 parent ddaf1fe commit 499fb1a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 31 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/macos_clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ jobs:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack_macOS.yaml') }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create ufs_utils-env ufs_utils/ci/spack_macOS.yaml
sed "s/\[intel, gcc@10:10, apple-clang@14\]/\[apple-clang@14\]/g" ufs_utils/ci/spack.yaml > spack_ci.yaml
spack env create ufs_utils-env spack_ci.yaml
spack env activate ufs_utils-env
spack external find
spack add openmpi@4.1.5
Expand All @@ -73,7 +74,7 @@ jobs:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack_macOS.yaml') }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

- name: build
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu_gcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
run: |
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create ufs_utils-env ufs_utils/ci/spack.yaml
sed "s/\[intel, gcc@10:10, apple-clang@14\]/\[gcc@10:10\]/g" ufs_utils/ci/spack.yaml > spack_ci.yaml
spack env create ufs_utils-env spack_ci.yaml
spack env activate ufs_utils-env
sudo apt install cmake
spack external find
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:
run: |
git clone -c feature.manyFiles=true https://github.com/NOAA-EMC/spack.git
source spack/share/spack/setup-env.sh
spack env create ufs_utils-env ufs_utils/ci/spack.yaml
sed "s/\[intel, gcc@10:10, apple-clang@14\]/\[intel\]/g" ufs_utils/ci/spack.yaml > spack_ci.yaml
spack env create ufs_utils-env spack_ci.yaml
spack env activate ufs_utils-env
spack compiler find
sudo apt install cmake
Expand Down
4 changes: 1 addition & 3 deletions ci/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
spack:
packages:
all:
compiler:
- intel
- gcc@10:10
compiler: [intel, gcc@10:10, apple-clang@14]
specs:
- netcdf-c@4.7.4
- netcdf-fortran@4.5.3
Expand Down
23 changes: 0 additions & 23 deletions ci/spack_macOS.yaml

This file was deleted.

0 comments on commit 499fb1a

Please sign in to comment.