Skip to content

Commit 2001f7a

Browse files
committed
Try to fix Github Actions
1 parent ab28724 commit 2001f7a

File tree

3 files changed

+136
-165
lines changed

3 files changed

+136
-165
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "Build and Test GEOSldas"
2+
description: "Build and test GEOSldas"
3+
4+
# Define the inputs for this action
5+
inputs:
6+
fortran-compiler:
7+
description: "The Fortran compiler to use"
8+
required: true
9+
cmake-build-type:
10+
description: "The CMake build type"
11+
required: true
12+
cmake-generator:
13+
description: "The CMake generator to use"
14+
required: true
15+
extra-cmake-args:
16+
description: "Extra CMake arguments"
17+
required: false
18+
19+
runs:
20+
using: "composite"
21+
22+
steps:
23+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
24+
- name: Delete huge unnecessary tools folder
25+
shell: bash
26+
run: rm -rf /opt/hostedtoolcache
27+
28+
- name: Set all directories as git safe
29+
shell: bash
30+
run: |
31+
git config --global --add safe.directory '*'
32+
33+
- name: Versions etc.
34+
shell: bash
35+
run: |
36+
${{ inputs.fortran-compiler }} --version
37+
mpirun --version
38+
echo $BASEDIR
39+
40+
- name: Mepo clone external repos
41+
shell: bash
42+
run: |
43+
mepo clone --partial blobless
44+
mepo status
45+
46+
- name: Update other branches
47+
shell: bash
48+
if:
49+
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
50+
run: |
51+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
52+
mepo status
53+
54+
- name: CMake
55+
shell: bash
56+
run: |
57+
cmake -B build -DCMAKE_Fortran_COMPILER=${{ inputs.fortran-compiler }} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} -DUSE_F2PY=OFF -G "${{ inputs.cmake-generator }}" "${{ inputs.extra-cmake-args }}"
58+
59+
- name: Build
60+
shell: bash
61+
run: |
62+
cmake --build build --parallel 4
63+
cmake --install build

.github/workflows/spack-ci.yml

Lines changed: 0 additions & 116 deletions
This file was deleted.

.github/workflows/workflow.yml

Lines changed: 73 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,69 +10,93 @@ on:
1010
- "**.sh"
1111
- "**.perl"
1212
- ".github/CODEOWNERS"
13-
14-
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
13+
- ".github/PULL_REQUEST_TEMPLATE.md"
14+
- ".editorconfig"
15+
- ".codebuild/**"
16+
- ".circleci/**"
1717

1818
jobs:
19-
build_ldas:
20-
name: Build GEOSldas
21-
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
22-
runs-on: ubuntu-24.04
19+
build_test_ldas_gnu:
20+
name: gfortran / ${{ matrix.cmake-build-type }} / ${{ matrix.cmake-generator }}
21+
runs-on: ubuntu-latest
2322
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-
23+
image: gmao/ubuntu24-geos-env-mkl:v7.32.0-openmpi_5.0.5-gcc_14.2.0
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
cmake-build-type: [Debug, Release]
28+
cmake-generator: [Unix Makefiles]
3229
env:
3330
OMPI_ALLOW_RUN_AS_ROOT: 1
3431
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
3532
OMPI_MCA_btl_vader_single_copy_mechanism: none
36-
3733
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 LDAS
34+
- name: Checkout
4335
uses: actions/checkout@v4
4436
with:
4537
fetch-depth: 1
4638
filter: blob:none
4739
repository: GEOS-ESM/GEOSldas
4840

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
41+
- name: Build and Test GEOSldas
42+
uses: ./.github/actions/ci-build
43+
with:
44+
cmake-build-type: ${{ matrix.cmake-build-type }}
45+
cmake-generator: ${{ matrix.cmake-generator }}
46+
fortran-compiler: gfortran
47+
extra-cmake-args: -DMPIEXEC_PREFLAGS='--oversubscribe'
6348

64-
- name: Update other branches
65-
if:
66-
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
67-
run: |
68-
mepo checkout-if-exists ${GITHUB_HEAD_REF}
69-
mepo status
49+
build_test_geosldas_ifort:
50+
name: ifort / ${{ matrix.cmake-build-type }} / ${{ matrix.cmake-generator }}
51+
runs-on: ubuntu-latest
52+
container:
53+
image: gmao/ubuntu24-geos-env:v7.32.0-intelmpi_2021.13-ifort_2021.13
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
cmake-build-type: [Debug, Release]
58+
cmake-generator: [Unix Makefiles]
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v4
62+
with:
63+
fetch-depth: 1
64+
filter: blob:none
65+
repository: GEOS-ESM/GEOSldas
7066

71-
- name: CMake
72-
run: |
73-
cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF
67+
- name: Build and Test GEOSldas
68+
uses: ./.github/actions/ci-build
69+
with:
70+
cmake-build-type: ${{ matrix.cmake-build-type }}
71+
cmake-generator: ${{ matrix.cmake-generator }}
72+
fortran-compiler: ifort
7473

75-
- name: Build
76-
run: |
77-
cmake --build build -j 4
78-
cmake --install build
74+
# We cannot currently test with ifx because HDF4 Fortran interface
75+
# cannot be compiled with ifx. The HDF4 Fortran interface is required
76+
# for the GEOSldas
77+
################################################################################
78+
# build_test_geosldas_ifx: #
79+
# name: ifx / ${{ matrix.cmake-build-type }} / ${{ matrix.cmake-generator }} #
80+
# runs-on: ubuntu-latest #
81+
# container: #
82+
# image: gmao/ubuntu24-geos-env:v7.32.0-intelmpi_2021.14-ifx_2025.0 #
83+
# strategy: #
84+
# fail-fast: false #
85+
# matrix: #
86+
# cmake-build-type: [Debug, Release] #
87+
# cmake-generator: [Unix Makefiles] #
88+
# steps: #
89+
# - name: Checkout #
90+
# uses: actions/checkout@v4 #
91+
# with: #
92+
# fetch-depth: 1 #
93+
# filter: blob:none #
94+
# repository: GEOS-ESM/GEOSldas #
95+
# #
96+
# - name: Build and Test GEOSldas #
97+
# uses: ./.github/actions/ci-build #
98+
# with: #
99+
# cmake-build-type: ${{ matrix.cmake-build-type }} #
100+
# cmake-generator: ${{ matrix.cmake-generator }} #
101+
# fortran-compiler: ifx #
102+
################################################################################

0 commit comments

Comments
 (0)