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