-
-
Notifications
You must be signed in to change notification settings - Fork 27
250 lines (183 loc) · 5.15 KB
/
Copy pathci.yml
File metadata and controls
250 lines (183 loc) · 5.15 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
name: ci
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
on:
push:
paths:
- "**.c"
- "**.cpp"
- "**.f90"
- "**.F90"
- "**/CMakeLists.txt"
- "**.cmake"
- "CMakePresets.json"
- ".github/workflows/**"
- "!memcheck.cmake"
- "!coverage.cmake"
- "!scripts/**"
workflow_dispatch:
# avoid wasted runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-unix:
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- &checkout
uses: actions/checkout@v7
- &gcc-macos
name: GCC (macOS)
if: runner.os == 'macos'
run: |
echo "CC=gcc-15" >> $GITHUB_ENV
echo "FC=gfortran-15" >> $GITHUB_ENV
- name: Build HDF5, h5fortran and test h5fortran
run: cmake --workflow default
- name: Upload log failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: main-${{ runner.os }}-CMakeConfigureLog.yaml
path: build/CMakeFiles/CMakeConfigureLog.yaml
- name: install package
run: cmake --install build
- name: example workflow
working-directory: example
run: cmake --workflow default
- name: Upload log failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: example-${{ runner.os }}-CMakeConfigureLog.yaml
path: example/build/CMakeFiles/CMakeConfigureLog.yaml
gcc-linux:
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest]
gcc: [9, 10, 11, 12, 13, 14]
include:
- os: macos-latest
gcc: 15
- os: ubuntu-26.04
gcc: 15
runs-on: ${{ matrix.os }}
env:
CC: gcc-${{ matrix.gcc }}
FC: gfortran-${{ matrix.gcc }}
steps:
- *checkout
- &pkg
uses: ./.github/workflows/composite-pkg
- name: GCC APT (Ubuntu 24.04)
if: ${{ runner.os == 'Linux' && matrix.gcc < 12 }}
run: sudo apt install -y --no-install-recommends gfortran-${{ matrix.gcc }}
- &unix
uses: ./.github/workflows/composite-unix
shared:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- *checkout
- *gcc-macos
- name: Build shared library
run: cmake --workflow shared
- name: install package
run: cmake --install build-shared
- name: example workflow
working-directory: example
run: cmake --workflow default
linux-flang:
runs-on: ubuntu-26.04
timeout-minutes: 15
strategy:
matrix:
llvm-version: [22]
env:
CC: clang-${{ matrix.llvm-version }}
FC: flang-${{ matrix.llvm-version }}
steps:
# - name: Apt LLVM
# run: |
# wget https://apt.llvm.org/llvm.sh
# chmod +x llvm.sh
# sudo ./llvm.sh ${{ matrix.llvm-version }}
# sudo apt-get update
- name: install Flang
run: sudo apt install --no-install-recommends flang-${{ matrix.llvm-version }}
- *checkout
- name: CMake build & test
run: cmake --workflow default
# not a meaningful need for this in a pure fortran program
valgrind-memory:
if: false
runs-on: ubuntu-latest
needs: gcc-linux
timeout-minutes: 10
steps:
- name: install valgrind
run: |
sudo apt update
sudo apt install --no-install-recommends valgrind libhdf5-dev
- *checkout
- run: ctest -Dexclude_label="deflate|python" -S memcheck.cmake -VV
# issue with python loading writer.inc
linux-coverage:
if: false
needs: gcc-linux
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- *checkout
- uses: actions/setup-python@v7
with:
python-version: '3.x'
- name: install hdf5
run: |
sudo apt update
sudo apt install --no-install-recommends libhdf5-dev
- name: install Gcovr
run: pip install gcovr
- run: cmake --preset coverage
- run: cmake --build --parallel --preset coverage
- name: Code coverage
run: cmake --build --parallel --preset run-coverage
- uses: actions/upload-artifact@v7
with:
name: coverage-report-html
path: build-coverage/coverage/
cmake-older:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
cmake_version: ["3.25.3"]
steps:
- *checkout
- name: prereqs
run: |
sudo apt-get update
sudo apt install --no-install-recommends libhdf5-dev
- uses: ./.github/workflows/composite-cmake
- name: configure
run: $CMAKE -Bbuild --install-prefix=${{ github.workspace }}/build/local --debug-find-pkg=HDF5
- name: build
run: $CMAKE --build build
- name: test
run: $CTEST --test-dir build
- name: install package
run: $CMAKE --install build
- name: example workflow
run: cmake -S example -B example/build -DCMAKE_PREFIX_PATH=${{ github.workspace }}/build/local
- name: Build examples
run: cmake --build example/build
- name: Test examples
run: ctest --test-dir example/build -V