From 7b05931a3dcdca8c4deecaf5cd86f6c685ce9bc4 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Wed, 29 May 2024 17:19:10 +0000 Subject: [PATCH] Fix CI builds (#45) * 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 --- .github/workflows/gcc.yml | 14 +++++++++----- .github/workflows/intel.yml | 21 ++++++++++++++------- ci/spack.yaml | 1 - 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 71e318d9..cf35f4c5 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 6f32d723..3f1ca198 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -33,7 +33,7 @@ env: jobs: setup: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: # Free up disk space @@ -41,7 +41,8 @@ jobs: 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" @@ -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 @@ -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 @@ -92,7 +98,7 @@ jobs: gsi-utils: needs: setup - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: install-intel @@ -100,7 +106,7 @@ jobs: echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile - name: checkout-gsiutils - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: gsi-utils @@ -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 diff --git a/ci/spack.yaml b/ci/spack.yaml index 2b28fec7..0c8d4f79 100644 --- a/ci/spack.yaml +++ b/ci/spack.yaml @@ -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