forked from parcio/julea
-
Notifications
You must be signed in to change notification settings - Fork 0
510 lines (507 loc) · 18.1 KB
/
ci.yml
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# JULEA - Flexible storage framework
# Copyright (C) 2019-2024 Michael Kuhn
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
name: CI
on: [push, pull_request]
jobs:
style:
name: Style
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Check format
run: |
./scripts/format.sh
- name: Check shell scripts
run: |
./scripts/check.sh
# dependencies:
# name: Dependencies
# runs-on: ${{ matrix.os.dist }}
# timeout-minutes: 180
# strategy:
# fail-fast: false
# matrix:
# os:
# - dist: ubuntu-24.04
# compiler: gcc
# compiler_version: 13.2.0
# - dist: ubuntu-24.04
# compiler: clang
# compiler_version: 18.1.3
# - dist: ubuntu-22.04
# compiler: gcc
# compiler_version: 11.4.0
# - dist: ubuntu-22.04
# compiler: clang
# compiler_version: 14.0.0
# - dist: ubuntu-20.04
# compiler: gcc
# compiler_version: 9.4.0
# - dist: ubuntu-20.04
# compiler: clang
# compiler_version: 11.0.0
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
# show-progress: false
# - name: Cache dependencies
# id: cache
# uses: actions/cache@v4
# with:
# path: dependencies
# key: ${{ matrix.os.dist }}-${{ matrix.os.compiler }}-${{ matrix.os.compiler_version }}-${{ hashFiles('scripts/spack', 'scripts/install-dependencies.sh') }}
# - name: Install dependencies
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
# env:
# JULEA_SPACK_COMPILER: ${{ matrix.os.compiler }}@${{ matrix.os.compiler_version }}
# run: |
# ./scripts/install-dependencies.sh
# dependencies-containers:
# name: Dependencies (Containers)
# runs-on: ubuntu-24.04
# container: ${{ matrix.os.registry }}/${{ matrix.os.image }}
# timeout-minutes: 180
# strategy:
# fail-fast: false
# matrix:
# os:
# - image: ubuntu:24.04
# registry: docker.io/library
# compiler: gcc
# compiler_version: 13.2.0
# - image: ubuntu:24.04
# registry: docker.io/library
# compiler: clang
# compiler_version: 18.1.3
# - image: ubuntu:22.04
# registry: docker.io/library
# compiler: gcc
# compiler_version: 11.4.0
# - image: ubuntu:22.04
# registry: docker.io/library
# compiler: clang
# compiler_version: 14.0.0
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
# show-progress: false
# - name: Install packages
# if: ${{ matrix.os.image == 'ubuntu:24.04' || matrix.os.image == 'ubuntu:22.04' }}
# run: |
# apt update
# apt --yes --no-install-recommends install build-essential zstd
# apt --yes --no-install-recommends install ca-certificates git gnupg patchelf python3 unzip
# if test "${{ matrix.os.compiler }}" = 'clang'
# then
# apt --yes --no-install-recommends install clang
# if test "${{ matrix.os.image }}" = 'ubuntu:24.04'
# then
# apt --yes --no-install-recommends install libclang-rt-dev
# fi
# fi
# - name: Cache dependencies
# id: cache
# uses: actions/cache@v4
# with:
# path: /dependencies
# key: ${{ matrix.os.image }}-${{ matrix.os.compiler }}-${{ matrix.os.compiler_version }}-${{ hashFiles('scripts/spack', 'scripts/install-dependencies.sh') }}
# - name: Install dependencies
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
# env:
# JULEA_SPACK_COMPILER: ${{ matrix.os.compiler }}@${{ matrix.os.compiler_version }}
# JULEA_SPACK_DIR: /dependencies
# run: |
# ./scripts/install-dependencies.sh
# build:
# name: Build
# needs: dependencies
# runs-on: ${{ matrix.os.dist }}
# timeout-minutes: 60
# strategy:
# fail-fast: false
# matrix:
# os:
# - dist: ubuntu-24.04
# compiler: gcc
# compiler_version: 13.2.0
# - dist: ubuntu-24.04
# compiler: clang
# compiler_version: 18.1.3
# - dist: ubuntu-22.04
# compiler: gcc
# compiler_version: 11.4.0
# - dist: ubuntu-22.04
# compiler: clang
# compiler_version: 14.0.0
# - dist: ubuntu-20.04
# compiler: gcc
# compiler_version: 9.4.0
# - dist: ubuntu-20.04
# compiler: clang
# compiler_version: 11.0.0
# dependencies: [system, spack]
# exclude:
# # libfabric is too old on Ubuntu 20.04
# - os:
# dist: ubuntu-20.04
# dependencies: system
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
# show-progress: false
# - name: Clean up system packages
# # We need to remove glib-network, otherwise libproxy might cause crashes.
# run: |
# sudo apt --yes purge glib-networking
# sudo apt --yes --purge autoremove
# sudo aa-remove-unknown || true
# - name: Install dependencies
# if: ${{ matrix.dependencies == 'system' }}
# run: |
# sudo apt update || true
# sudo apt --yes --no-install-recommends install ninja-build pkgconf libglib2.0-dev libbson-dev libfabric-dev libgdbm-dev liblmdb-dev libsqlite3-dev libleveldb-dev libmongoc-dev libmariadb-dev librocksdb-dev libfuse3-dev libopen-trace-format-dev librados-dev
# if test "${{ matrix.os.dist }}" != 'ubuntu-20.04'
# then
# sudo apt --yes --no-install-recommends install meson
# else
# sudo apt --yes --no-install-recommends install python3 python3-pip python3-setuptools python3-wheel
# sudo pip3 install meson
# fi
# - name: Cache dependencies
# id: cache
# if: ${{ matrix.dependencies == 'spack' }}
# uses: actions/cache/restore@v4
# with:
# path: dependencies
# key: ${{ matrix.os.dist }}-${{ matrix.os.compiler }}-${{ matrix.os.compiler_version }}-${{ hashFiles('scripts/spack', 'scripts/install-dependencies.sh') }}
# - name: Check dependencies
# if: ${{ matrix.dependencies == 'spack' && steps.cache.outputs.cache-hit != 'true' }}
# run: |
# exit 1
# - name: Configure, build and install
# env:
# CC: ${{ matrix.os.compiler }}
# run: |
# ./scripts/ci/build.sh release "${{ matrix.dependencies }}"
dependencies:
uses: ./.github/workflows/containers.yml
tests:
name: Tests
needs: dependencies
runs-on: ubuntu-latest
container: ghcr.io/finnhering/julea-${{ matrix.dependencies }}:${{ matrix.os.dist }}-${{ matrix.os.compiler }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os:
- dist: ubuntu-24-04
compiler: gcc
compiler_version: 13.2.0
- dist: ubuntu-24-04
compiler: clang
compiler_version: 18.1.3
- dist: ubuntu-22-04
compiler: gcc
compiler_version: 11.4.0
- dist: ubuntu-22-04
compiler: clang
compiler_version: 14.0.0
- dist: ubuntu-20-04
compiler: gcc
compiler_version: 9.4.0
- dist: ubuntu-20-04
compiler: clang
compiler_version: 11.0.0
dependencies: [system, spack]
julea:
# Default
- object: posix
kv: lmdb
db: sqlite
# Object backends
- object: gio
kv: lmdb
db: sqlite
# KV backends
- object: posix
kv: gdbm
db: sqlite
- object: posix
kv: mongodb
db: sqlite
- object: posix
kv: leveldb
db: sqlite
- object: posix
kv: rocksdb
db: sqlite
- object: posix
kv: sqlite
db: sqlite
# DB backends
- object: posix
kv: lmdb
db: mysql
db-server: mysql
- object: posix
kv: lmdb
db: mysql
db-server: mariadb
exclude:
# libfabric is too old on Ubuntu 20.04
- os:
dist: ubuntu-20.04
dependencies: system
services:
mariadb:
image: ${{ matrix.julea.db == 'mysql' && matrix.julea.db-server == 'mariadb' && 'docker.io/library/mariadb' || '' }}
env:
MARIADB_RANDOM_ROOT_PASSWORD: yes
MARIADB_DATABASE: juleadb
MARIADB_USER: julea
MARIADB_PASSWORD: aeluj
ports:
- 3306:3306
mongodb:
image: ${{ matrix.julea.kv == 'mongodb' && 'docker.io/library/mongo' || '' }}
ports:
- 27017:27017
mysql:
image: ${{ matrix.julea.db == 'mysql' && matrix.julea.db-server == 'mysql' && 'docker.io/library/mysql' || '' }}
env:
MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_DATABASE: juleadb
MYSQL_USER: julea
MYSQL_PASSWORD: aeluj
ports:
- 3306:3306
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Fix mmap_rnd_bits
if: ${{ matrix.os.dist == 'ubuntu-22-04' }}
# FIXME https://github.com/actions/runner-images/issues/9491
run: |
sudo sysctl vm.mmap_rnd_bits=28
# - name: Clean up system packages
# # We need to remove glib-network, otherwise libproxy might cause crashes.
# # FIXME https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263
# # Ubuntu 20.04 and 22.04 have MySQL 8.0
# run: |
# sudo apt --yes purge glib-networking mysql-client mysql-client-8.0 mysql-server mysql-server-8.0
# sudo apt --yes --purge autoremove
# sudo aa-remove-unknown || true
# sudo rm --recursive --force /var/lib/mysql
# - name: Install dependencies
# if: ${{ matrix.dependencies == 'system' }}
# run: |
# sudo apt update || true
# sudo apt --yes --no-install-recommends install ninja-build pkgconf libglib2.0-dev libbson-dev libfabric-dev libgdbm-dev liblmdb-dev libsqlite3-dev libleveldb-dev libmongoc-dev libmariadb-dev librocksdb-dev libfuse3-dev libopen-trace-format-dev librados-dev
# if test "${{ matrix.os.dist }}" != 'ubuntu-20.04'
# then
# sudo apt --yes --no-install-recommends install meson
# else
# sudo apt --yes --no-install-recommends install python3 python3-pip python3-setuptools python3-wheel
# sudo pip3 install meson
# fi
# - name: Cache dependencies
# id: cache
# if: ${{ matrix.dependencies == 'spack' }}
# uses: actions/cache/restore@v4
# with:
# path: dependencies
# key: ${{ matrix.os.dist }}-${{ matrix.os.compiler }}-${{ matrix.os.compiler_version }}-${{ hashFiles('scripts/spack', 'scripts/install-dependencies.sh') }}
# - name: Check dependencies
# if: ${{ matrix.dependencies == 'spack' && steps.cache.outputs.cache-hit != 'true' }}
# run: |
# exit 1
- name: Configure and build
env:
CC: ${{ matrix.os.compiler }}
run: |
./scripts/ci/build.sh debug "${{ matrix.dependencies }}"
- name: Create configuration
# FIXME We need to use 127.0.0.1 because localhost tries to use the socket (/tmp/mysql.sock), which does not exist.
run: |
. scripts/environment.sh
JULEA_KV_PATH="/tmp/julea/kv/${{ matrix.julea.kv }}"
if test "${{ matrix.julea.kv }}" = 'mongodb'; then JULEA_KV_PATH='127.0.0.1:juleadb'; fi
JULEA_DB_PATH="/tmp/julea/db/${{ matrix.julea.db }}"
if test "${{ matrix.julea.db }}" = 'mysql'; then JULEA_DB_PATH='127.0.0.1:juleadb:julea:aeluj'; fi
julea-config --user --object-servers="$(hostname)" --kv-servers="$(hostname)" --db-servers="$(hostname)" --object-backend="${{ matrix.julea.object }}" --object-path="/tmp/julea/object/${{ matrix.julea.object }}" --kv-backend="${{ matrix.julea.kv }}" --kv-path="${JULEA_KV_PATH}" --db-backend="${{ matrix.julea.db }}" --db-path="${JULEA_DB_PATH}"
- name: Tests
run: |
. scripts/environment.sh
./scripts/setup.sh start
./scripts/test.sh
sleep 10
./scripts/test.sh
./scripts/setup.sh stop
- name: HDF5 Tests
env:
LSAN_OPTIONS: exitcode=0
run: |
. scripts/environment.sh
./scripts/setup.sh start
export HDF5_VOL_CONNECTOR=julea-kv
./scripts/test.sh -r /hdf5
sleep 10
./scripts/test.sh -r /hdf5
sleep 10
export HDF5_VOL_CONNECTOR=julea-db
./scripts/test.sh -r /hdf5
sleep 10
./scripts/test.sh -r /hdf5
./scripts/setup.sh stop
- name: Benchmarks
if: ${{ matrix.julea.object == 'posix' && matrix.julea.kv == 'lmdb' && matrix.julea.db == 'sqlite' }}
run: |
. scripts/environment.sh
./scripts/setup.sh start
./scripts/benchmark.sh --duration=0
sleep 10
./scripts/benchmark.sh --duration=0
./scripts/setup.sh stop
doxygen:
name: Doxygen
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Install dependencies
run: |
sudo apt update || true
sudo apt --yes --no-install-recommends install doxygen
- name: Generate documentation
run: |
doxygen
- name: Upload doxygen
uses: actions/upload-artifact@v4
with:
name: doxygen
path: html
coverage:
# FIXME Reduce redundancies
# FIXME Increase coverage (currently, only one configuration runs)
name: Coverage
needs: dependencies
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Fix mmap_rnd_bits
# FIXME https://github.com/actions/runner-images/issues/9491
run: |
sudo sysctl vm.mmap_rnd_bits=28
- name: Cache dependencies
id: cache
uses: actions/cache/restore@v4
with:
path: dependencies
key: ubuntu-24.04-gcc-13.2.0-${{ hashFiles('scripts/spack', 'scripts/install-dependencies.sh') }}
- name: Check dependencies
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
exit 1
- name: Configure and build
env:
CC: gcc
run: |
./scripts/ci/build.sh coverage spack
- name: Create configuration
run: |
. scripts/environment.sh
julea-config --user --object-servers="$(hostname)" --kv-servers="$(hostname)" --db-servers="$(hostname)" --object-backend=posix --object-path=/tmp/julea/object/posix --kv-backend=lmdb --kv-path=/tmp/julea/kv/lmdb --db-backend=sqlite --db-path=/tmp/julea/db/sqlite
- name: Tests
env:
HDF5_VOL_CONNECTOR: julea-db
LSAN_OPTIONS: exitcode=0
run: |
. scripts/environment.sh
./scripts/setup.sh start
./scripts/test.sh
./scripts/setup.sh stop
- name: Generate coverage
run: |
. scripts/environment.sh
ninja -C bld coverage
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: bld/meson-logs/coveragereport
publish:
name: Publish
needs: [doxygen, coverage]
runs-on: ubuntu-24.04
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/master' }}
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
path: pages
show-progress: false
- name: Download doxygen
uses: actions/download-artifact@v4
with:
name: doxygen
path: doxygen
- name: Download coverage
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage
- name: Prepare
run: |
rsync --archive --human-readable --verbose --delete --exclude=.git doxygen/. pages
mkdir pages/coverage
rsync --archive --human-readable --verbose --delete --exclude=.git coverage/. pages/coverage
touch pages/.nojekyll
- name: Commit
run: |
cd pages
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add --all .
git commit --amend --reset-author --message='Pages for ${{ github.sha }}'
git push --force