Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GH CI #61

Merged
merged 7 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 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

# A note on flushing Action cache and relevance to "cache_key" above.
# There is no way to flush the Action cache, and hence a number (#) is appended
Expand Down Expand Up @@ -44,10 +44,11 @@ jobs:
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
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

- name: checkout # This is for getting spack.yaml
- name: checkout # This is for getting spack.yml
if: steps.cache-env.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
Expand All @@ -56,28 +57,27 @@ jobs:
# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack_gcc.yaml') }}

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
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 gsiutils-env gsi-utils/ci/spack.yaml
spack env create gsiutils-env gsi-utils/ci/spack_gcc.yaml
spack env activate gsiutils-env
spack compiler find
sudo apt install cmake
spack external find
spack add [email protected]
spack concretize
spack install -v --fail-fast --dirty
spack clean --all
spack install --fail-fast --dirty
spack clean -a

gsi-utils:
needs: setup
Expand All @@ -91,12 +91,12 @@ jobs:

- name: cache-env
id: cache-env
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack_gcc.yaml') }}

- name: build
run: |
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
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

- name: checkout # This is for getting spack.yaml
- name: checkout # This is for getting spack.yml
if: steps.cache-env.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
Expand All @@ -66,9 +67,10 @@ jobs:
spack
~/.spack
/opt/intel
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack_intel.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 @@ -84,17 +86,16 @@ 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 gsiutils-env gsi-utils/ci/spack.yaml
spack env create gsiutils-env gsi-utils/ci/spack_intel.yaml
spack env activate gsiutils-env
spack compiler find
sudo apt install cmake
spack external find
spack add intel-oneapi-mpi
spack concretize
spack install --dirty --fail-fast -v
spack clean --all
spack install --fail-fast --dirty
spack clean -a

gsi-utils:
needs: setup
Expand All @@ -118,10 +119,12 @@ jobs:
spack
~/.spack
/opt/intel
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack_intel.yaml') }}

- 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 gsiutils-env
cd gsi-utils
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-utils 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
10 changes: 7 additions & 3 deletions ci/spack.yaml → ci/spack_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
spack:
packages:
all:
compiler: [intel, gcc@10:10]
providers:
mpi: [intel-oneapi-mpi]
compiler:
- intel
specs:
- [email protected]
- [email protected] ~blosc build_system=cmake
- [email protected]
- [email protected]
- [email protected]
Expand All @@ -21,6 +24,7 @@ spack:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
view: true
concretizer:
unify: when_possible
unify: true
Loading