Skip to content

Commit

Permalink
Fix CI builds (#45)
Browse files Browse the repository at this point in the history
* Update GCC CI to match the GSI.

* Update cmake version.  Update Intel CI to match GSI.

* Let the OS install cmake instead of spack

* Update Intel MPI compiler names

* Force clean dependency installs
  • Loading branch information
DavidHuber-NOAA committed May 29, 2024
1 parent bb03e17 commit 7b05931
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ jobs:
df -h
- name: checkout # This is for getting spack.yaml
uses: actions/checkout@v3
if: steps.cache-env.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
path: gsi-utils

Expand All @@ -70,19 +71,21 @@ jobs:
source spack/share/spack/setup-env.sh
spack env create gsiutils-env gsi-utils/ci/spack.yaml
spack env activate gsiutils-env
spack compiler find
sudo apt install cmake
spack external find
spack add mpich@3.4.2
spack concretize
spack install -v --fail-fast --dirty
spack clean --all
gsi-monitor:
gsi-utils:
needs: setup
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: gsi-utils

Expand All @@ -99,10 +102,11 @@ jobs:
run: |
source spack/share/spack/setup-env.sh
spack env activate gsiutils-env
export CC=mpicc
export FC=mpif90
cd gsi-utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON ..
make -j2 VERBOSE=1
make install
env:
CC: mpicc
FC: mpif90
21 changes: 14 additions & 7 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ env:

jobs:
setup:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
# Free up disk space
- name: free-disk-spack
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo rm -rf /swapfile
sudo rm -rf /usr_local_mv
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
Expand All @@ -51,7 +52,8 @@ jobs:
df -h
- name: checkout # This is for getting spack.yaml
uses: actions/checkout@v3
if: steps.cache-env.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
path: gsi-utils

Expand All @@ -73,17 +75,21 @@ jobs:
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1
sudo apt-get clean
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
sudo mv /usr/local/ /usr_local_mv
sudo apt-get install cmake
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 activate gsiutils-env
spack compiler find
sudo apt install cmake
spack external find
spack add intel-oneapi-mpi
spack concretize
Expand All @@ -92,15 +98,15 @@ jobs:
gsi-utils:
needs: setup
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: install-intel
run: |
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
- name: checkout-gsiutils
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: gsi-utils

Expand All @@ -118,10 +124,11 @@ jobs:
run: |
source spack/share/spack/setup-env.sh
spack env activate gsiutils-env
export CC=mpiicc
export FC=mpiifort
cd gsi-utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON ..
make -j2 VERBOSE=1
make install
env:
CC: mpiicc
FC: mpiifort
1 change: 0 additions & 1 deletion ci/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spack:
- crtm@2.4.0.1
- ncio@1.1.2
- gsi-ncdiag@1.1.2
- cmake@3.20.1
view: true
concretizer:
unify: when_possible

0 comments on commit 7b05931

Please sign in to comment.