add v14 bcs and change topo path #101
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Spack CI GCC Build | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| # Do not run if the only files changed cannot affect the build | |
| paths-ignore: | |
| - "**.md" | |
| - "**.pro" | |
| - "**.sh" | |
| - "**.perl" | |
| - ".github/CODEOWNERS" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| build_gcm: | |
| name: Spack CI GCC Build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout GCM | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| filter: blob:none | |
| repository: GEOS-ESM/GEOSgcm | |
| ref: feature/sdrabenh/gcm_v12 | |
| - name: Set all directories as git safe | |
| run: | | |
| git config --global --add safe.directory '*' | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Pip install mepo | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install mepo | |
| mepo --version | |
| - name: Mepo clone external repos | |
| run: | | |
| ls | |
| mepo clone --partial blobless | |
| mepo status | |
| # DO NOT DO THIS FOR v12 | |
| #- name: Mepo develop usual suspects | |
| #run: | | |
| #ls | |
| #mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared GEOS_Util | |
| #mepo status | |
| - name: Debug PR branch | |
| run: echo "PR is coming from ${{ github.event.pull_request.head.ref }}" | |
| - name: Update other branches | |
| if: ${{ github.event.pull_request.head.ref != 'main' && github.event.pull_request.head.ref != 'develop' }} | |
| run: | | |
| mepo checkout-if-exists ${GITHUB_HEAD_REF} | |
| mepo status | |
| - name: Set up Spack | |
| uses: spack/setup-spack@v2 | |
| with: | |
| ref: develop # Spack version (examples: develop, releases/v0.21) | |
| color: true # Force color output (SPACK_COLOR=always) | |
| path: spack # Where to clone Spack | |
| buildcache: false # Do not use the spack buildcache | |
| - name: Find compilers | |
| shell: spack-bash {0} | |
| run: | | |
| spack compiler find | |
| - name: Set default compiler and target | |
| shell: spack-bash {0} | |
| run: | | |
| spack config add 'packages:all:require:target=x86_64_v3' | |
| - name: Create Spack environment | |
| shell: spack-bash {0} | |
| run: | | |
| spack env create spack-env | |
| spack env activate spack-env | |
| - name: Login | |
| shell: spack-bash {0} | |
| run: | | |
| spack -e spack-env mirror add geos-buildcache oci://ghcr.io/GEOS-ESM/geos-buildcache | |
| spack -e spack-env mirror set --oci-username ${{ github.actor }} --oci-password "${{ secrets.BUILDCACHE_TOKEN }}" geos-buildcache | |
| spack -e spack-env mirror list | |
| spack -e spack-env buildcache update-index geos-buildcache | |
| spack -e spack-env buildcache list --allarch | |
| - name: Concretize | |
| shell: spack-bash {0} | |
| run: | | |
| spack clean -m | |
| spack -e spack-env concretize | |
| - name: Install | |
| shell: spack-bash {0} | |
| run: | | |
| spack clean -m | |
| spack -e spack-env install --add --no-check-signature --use-buildcache only \ | |
| esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas fms | |
| - name: Build with Cmake | |
| shell: spack-bash {0} | |
| run: | | |
| spack env activate spack-env | |
| spack load \ | |
| esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas fms | |
| spack find --loaded | |
| FC=gfortran-14 CC=gcc-14 CXX=g++-14 | |
| cmake -B build -S . -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} | |
| cmake --build build -j 4 | |
| cmake --install build | |