Skip to content

Commit 4ab1f4d

Browse files
authored
Merge branch 'develop' into feature/mathomp4/remove-sles15-detection
2 parents 32bf1fe + 9d90d0b commit 4ab1f4d

File tree

3 files changed

+206
-1
lines changed

3 files changed

+206
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ workflows:
4545
- docker-hub-creds
4646
matrix:
4747
parameters:
48-
compiler: [gfortran, ifort]
48+
compiler: [ifort]
4949
requires:
5050
- build-GEOSgcm-on-<< matrix.compiler >>
5151
repo: GEOSgcm

.github/workflows/spack-ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Spack CI GCC Build
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
# Do not run if the only files changed cannot affect the build
7+
paths-ignore:
8+
- "**.md"
9+
- "**.pro"
10+
- "**.sh"
11+
- "**.perl"
12+
- ".github/CODEOWNERS"
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18+
19+
jobs:
20+
build_gcm:
21+
name: Spack CI GCC Build
22+
runs-on: ubuntu-24.04
23+
steps:
24+
25+
- name: Checkout GCM
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
29+
filter: blob:none
30+
repository: GEOS-ESM/GEOSgcm
31+
32+
- name: Set all directories as git safe
33+
run: |
34+
git config --global --add safe.directory '*'
35+
36+
- name: Setup Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.13'
40+
41+
- name: Pip install mepo
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install mepo
45+
mepo --version
46+
47+
- name: Mepo clone external repos
48+
run: |
49+
ls
50+
mepo clone --partial blobless
51+
mepo status
52+
53+
- name: Mepo develop usual suspects
54+
run: |
55+
ls
56+
mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared GEOS_Util
57+
mepo status
58+
59+
- name: Update other branches
60+
if:
61+
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
62+
run: |
63+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
64+
mepo status
65+
66+
- name: Set up Spack
67+
uses: spack/setup-spack@v2
68+
with:
69+
ref: develop # Spack version (examples: develop, releases/v0.21)
70+
color: true # Force color output (SPACK_COLOR=always)
71+
path: spack # Where to clone Spack
72+
buildcache: false # Do not use the spack buildcache
73+
74+
- name: Find compilers
75+
shell: spack-bash {0}
76+
run: |
77+
spack compiler find
78+
79+
- name: Set default compiler and target
80+
shell: spack-bash {0}
81+
run: |
82+
spack config add 'packages:all:compiler:[[email protected]]'
83+
spack config add 'packages:all:require:target=x86_64_v3'
84+
85+
- name: Create Spack environment
86+
shell: spack-bash {0}
87+
run: |
88+
spack env create spack-env
89+
spack env activate spack-env
90+
91+
- name: Login
92+
shell: spack-bash {0}
93+
run: |
94+
spack -e spack-env mirror add geos-buildcache oci://ghcr.io/GEOS-ESM/geos-buildcache
95+
spack -e spack-env mirror set --oci-username ${{ github.actor }} --oci-password "${{ secrets.BUILDCACHE_TOKEN }}" geos-buildcache
96+
spack -e spack-env mirror list
97+
spack -e spack-env buildcache update-index geos-buildcache
98+
spack -e spack-env buildcache list --allarch
99+
100+
- name: Concretize
101+
shell: spack-bash {0}
102+
run: |
103+
spack -e spack-env concretize
104+
105+
- name: Install
106+
shell: spack-bash {0}
107+
run: |
108+
spack -e spack-env install --add --no-check-signature --use-buildcache only \
109+
esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas
110+
111+
- name: Build with Cmake
112+
shell: spack-bash {0}
113+
run: |
114+
spack env activate spack-env
115+
spack load \
116+
esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas
117+
spack find --loaded
118+
FC=gfortran-14 CC=gcc-14 CXX=g++-14
119+
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}
120+
cmake --build build -j 4
121+
cmake --install build
122+

.github/workflows/workflow.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Build Tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
# Do not run if the only files changed cannot affect the build
7+
paths-ignore:
8+
- "**.md"
9+
- "**.pro"
10+
- "**.sh"
11+
- "**.perl"
12+
- ".github/CODEOWNERS"
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
17+
18+
jobs:
19+
build_gcm:
20+
name: Build GEOSgcm
21+
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
22+
runs-on: ubuntu-24.04
23+
container:
24+
image: gmao/ubuntu24-geos-env:v7.32.0-intelmpi_2021.13-ifort_2021.13
25+
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
26+
# It seems like we might not need secrets on GitHub Actions which is good for forked
27+
# pull requests
28+
#credentials:
29+
#username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
#password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
32+
env:
33+
OMPI_ALLOW_RUN_AS_ROOT: 1
34+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
35+
OMPI_MCA_btl_vader_single_copy_mechanism: none
36+
37+
steps:
38+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
39+
- name: Delete huge unnecessary tools folder
40+
run: rm -rf /opt/hostedtoolcache
41+
42+
- name: Checkout GCM
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 1
46+
filter: blob:none
47+
repository: GEOS-ESM/GEOSgcm
48+
49+
- name: Set all directories as git safe
50+
run: |
51+
git config --global --add safe.directory '*'
52+
53+
- name: Versions etc.
54+
run: |
55+
ifort --version
56+
mpirun --version
57+
echo $BASEDIR
58+
59+
- name: Mepo clone external repos
60+
run: |
61+
mepo clone --partial blobless
62+
mepo status
63+
64+
- name: Mepo develop usual suspects
65+
run: |
66+
mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared GEOS_Util
67+
mepo status
68+
69+
- name: Update other branches
70+
if:
71+
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
72+
run: |
73+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
74+
mepo status
75+
76+
- name: CMake
77+
run: |
78+
cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF
79+
80+
- name: Build
81+
run: |
82+
cmake --build build -j 4
83+
cmake --install build

0 commit comments

Comments
 (0)