forked from vengi-voxel/vengi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
82 lines (73 loc) · 1.49 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
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
image: registry.gitlab.com/mgerhardy/engine-docker:master
stages:
- build
- test
- analyse
variables:
CCACHE_BASEDIR: ${CI_PROJECT_DIR}
CCACHE_DIR: ${CI_PROJECT_DIR}/ccache
BUILD_DIR: ${CI_PROJECT_DIR}/build
cache:
paths:
- ccache/
- build/
build-unity:
stage: build
script:
- cmake -H. -B${BUILD_DIR}/default
- make -j 4 all -C ${BUILD_DIR}/default
artifacts:
paths:
- build/compile_commands.json
build-non-unity:
stage: build
script:
- cmake -H. -B${BUILD_DIR}/non-unity -DDISABLE_UNITY=On
- make -j 4 all -C ${BUILD_DIR}/non-unity
artifacts:
paths:
- build/compile_commands.json
.test:
variables:
POSTGRES_DB: enginetest
POSTGRES_USER: engine
POSTGRES_PASSWORD: engine
DB_HOST: postgres
DB_USER: engine
DB_PASSWORD: engine
DB_NAME: enginetest
services:
- postgres:latest
stage: test
dependencies:
- build
script:
- make -j 4 tests-run
artifacts:
reports:
junit: build/*/gtest.xml
.analyse:cppcheck:
stage: analyse
script:
- cppcheck --xml-version=2 -j 4 --enable=all --config-exclude=contrib/libs/ --project=build/compile_commands.json src 2> cppcheck.xml
artifacts:
paths:
- cppcheck.xml
.analyse:valgrind:
stage: analyse
dependencies:
- build
script:
- make -j 4 tests-memcheck
artifacts:
paths:
- build/memcheck*.xml
.pages:
script:
- make doc
- mv build/html/ public/
artifacts:
paths:
- public
only:
- master