-
Notifications
You must be signed in to change notification settings - Fork 15
/
.gitlab-ci.yml
99 lines (90 loc) · 1.98 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# @file .gitlab-ci.yml
# @author Ignacio Vizzo [[email protected]]
#
# Copyright (c) 2019 Ignacio Vizzo, all rights reserved
#
# Use this file wisely: You can add more stuff on it if you want. This template
# will allow you to build your project every time you push changes to the git
# server. If you have any error the gitlab server will send you a notification
# to your email.
# You could also provide tests to your project and add a testing
# stage for the CI, this will allow you to run tests for every change you make
# in the code. This is the defacto standard in industry nowadays. Ask google for
# more information if you are curious.
# Template for all jobs
default:
image: some.url.of.yours
artifacts:
expire_in: 1 h
untracked: true
paths:
- build/
before_script:
- export TERM=xterm
- export SHELL=/bin/bash
tags:
- docker
stages:
- configure
- analyse
- build
- test
- deploy
configure:
stage: configure
script:
- cmake -Bbuild/ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release
clang-format:
stage: analyse
dependencies:
- configure
allow_failure: true
script:
- cd build/
- make clang-format
clang-tidy:
stage: analyse
allow_failure: true
dependencies:
- configure
script:
- cd build/
- make clang-tidy
build:
stage: build
dependencies:
- configure
script:
- cd build/
- make -j$(nproc --all) all
test:
stage: test
dependencies:
- build
script:
- cd build/
- ctest -vv
coverage:
stage: test
dependencies:
- build
script:
- cd build/
- cmake -DENABLE_COVERAGE=ON ..
- make clean
- make -j$(nproc --all) all
- make test-coverage
coverage: '/TOTAL.*\s+(\S+\%)/'
deploy:
stage: deploy
dependencies:
- build
script:
- echo "Build succeeded, archiving artifacts..."
- cd build/
- make -j$(nproc --all) install
artifacts:
name: bow_artifacts
expire_in: 1 week
paths:
- results/