Skip to content

Commit 27e2e92

Browse files
Add Github Actions CI (#86)
2 parents 9d304a0 + cc295ba commit 27e2e92

File tree

2 files changed

+131
-1
lines changed

2 files changed

+131
-1
lines changed

.github/workflows/workflow.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
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+
- ".circleci/config.yml"
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18+
19+
jobs:
20+
build_ldas_ifort:
21+
name: Build GEOSldas with ifort
22+
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
23+
runs-on: ubuntu-24.04
24+
container:
25+
image: gmao/ubuntu24-geos-env:v7.32.0-intelmpi_2021.13-ifort_2021.13
26+
27+
env:
28+
OMPI_ALLOW_RUN_AS_ROOT: 1
29+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
30+
OMPI_MCA_btl_vader_single_copy_mechanism: none
31+
32+
steps:
33+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
34+
- name: Delete huge unnecessary tools folder
35+
run: rm -rf /opt/hostedtoolcache
36+
37+
- name: Checkout LDAS
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 1
41+
filter: blob:none
42+
repository: GEOS-ESM/GEOSldas
43+
44+
- name: Set all directories as git safe
45+
run: |
46+
git config --global --add safe.directory '*'
47+
48+
- name: Versions etc.
49+
run: |
50+
ifort --version
51+
mpirun --version
52+
echo $BASEDIR
53+
54+
- name: Mepo clone external repos
55+
run: |
56+
mepo clone --partial blobless
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: CMake
67+
run: |
68+
cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF
69+
70+
- name: Build
71+
run: |
72+
cmake --build build -j 4
73+
cmake --install build
74+
75+
76+
build_ldas_gfortran:
77+
name: Build GEOSldas with gfortran
78+
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
79+
runs-on: ubuntu-24.04
80+
container:
81+
image: gmao/ubuntu24-geos-env-mkl:v7.32.0-openmpi_5.0.5-gcc_14.2.0
82+
83+
env:
84+
OMPI_ALLOW_RUN_AS_ROOT: 1
85+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
86+
OMPI_MCA_btl_vader_single_copy_mechanism: none
87+
88+
steps:
89+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
90+
- name: Delete huge unnecessary tools folder
91+
run: rm -rf /opt/hostedtoolcache
92+
93+
- name: Checkout LDAS
94+
uses: actions/checkout@v4
95+
with:
96+
fetch-depth: 1
97+
filter: blob:none
98+
repository: GEOS-ESM/GEOSldas
99+
100+
- name: Set all directories as git safe
101+
run: |
102+
git config --global --add safe.directory '*'
103+
104+
- name: Versions etc.
105+
run: |
106+
gfortran --version
107+
mpirun --version
108+
echo $BASEDIR
109+
110+
- name: Mepo clone external repos
111+
run: |
112+
mepo clone --partial blobless
113+
mepo status
114+
115+
- name: Update other branches
116+
if:
117+
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
118+
run: |
119+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
120+
mepo status
121+
122+
- name: CMake
123+
run: |
124+
cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF
125+
126+
- name: Build
127+
run: |
128+
cmake --build build -j 4
129+
cmake --install build

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- New update_type for joint 3d soil moisture and 1d snow analysis (Tb+sfmc+sfds+SCF obs).
1515
- Added CYGNSS soil moisture reader.
1616
- Added M21C surface met forcing.
17+
- Add Github Actions workflow for testing and building GEOSldas_GridComp.
1718

1819
### Changed
1920

20-
- Updated subroutine read_obs_sm_ASCAT_EUMET() to work with both original and revised file name templates.
21+
- Updated subroutine read_obs_sm_ASCAT_EUMET() to work with both original and revised file name templates.
2122
- Updated subroutines read_obs_sm_ASCAT_EUMET(), read_obs_SMAP_halforbit_Tb(), read_obs_SMOS() and read_obs_MODIS_SCF() with hardcoded time ranges for when observations are available and should be read.
2223
- Revised variable names (SHORT_NAME) and descriptions (LONG_NAME) to match M21C file specs.
2324
- Renamed tilecoord%pfaf to %pfaf_index; added matlab tile file reader.

0 commit comments

Comments
 (0)