forked from libnegf/libnegf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
49 lines (45 loc) · 1.12 KB
/
.gitlab-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
.setup:
parallel:
matrix:
- DISTRO: [debian, rockylinux]
MPI: [mpich, openmpi]
DEVICE: [cpu]
- DISTRO: [debian]
MPI: [mpich, openmpi]
DEVICE: [gpu]
tags:
- public-docker
image: $CI_REGISTRY/nexgf/libnegf/$DISTRO/$MPI-$DEVICE
variables:
BUILD_DIR: build-$DISTRO-$MPI-$DEVICE
CFLAGS: -Wextra -Wall -pedantic
CXXFLAGS: -Wextra -Wall -pedantic
LDFLAGS: -Wl,-z,defs
MALLOC_CHECK_: 3
MALLOC_PERTURB_: 1
build:
extends: .setup
stage: build
script:
- mkdir "$BUILD_DIR"
- WITH_GPU="$( [ "$DEVICE" = 'gpu' ] && echo ON || echo OFF )"
- cmake
-DCMAKE_BUILD_TYPE=Debug
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_RULE_MESSAGES:BOOL=OFF
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DWITH_TRANSPORT_GPU="$WITH_GPU"
-B "$BUILD_DIR"
-S .
- num_cpus="$(getconf _NPROCESSORS_ONLN)"
- echo "Building on $num_cpus CPU cores"
- cmake --build "$BUILD_DIR" --parallel "$num_cpus"
artifacts:
paths:
- $BUILD_DIR
test:
extends: .setup
stage: test
script:
- cd "$BUILD_DIR"
- ctest --output-on-failure