-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
50 lines (43 loc) · 961 Bytes
/
.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
50
image: alpine:edge
stages:
- build
- test
.build:
stage: build
before_script:
- apk add --no-cache build-base cmake gtest gtest-dev ${COMPILER_PACKAGE}
- mkdir -p buildir && cd buildir
script:
- cmake -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
- cmake --build .
artifacts:
paths:
- buildir
.unit_tests:
stage: test
before_script:
# We need gtest and ctest.
- apk add --no-cache cmake gtest
script:
- cd buildir
- ctest -V -R 'unit:.*'
build-gcc-release:
extends: .build
variables:
CMAKE_CXX_COMPILER: g++
COMPILER_PACKAGE: gcc
test-gcc-release:
extends: .unit_tests
needs:
- job: build-gcc-release
artifacts: true
build-clang-release:
extends: .build
variables:
CMAKE_CXX_COMPILER: clang++
COMPILER_PACKAGE: clang
test-clang-release:
extends: .unit_tests
needs:
- job: build-clang-release
artifacts: true