This repository has been archived by the owner on Mar 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
71 lines (62 loc) · 1.67 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
stages:
- compilation
- testing
- formatting
variables:
GIT_SUBMODULE_STRATEGY: recursive
CC: gcc-7
CXX: g++-7
before_script:
- apt-get update -qq && apt-get install -y -qq software-properties-common clang-tools-5.0 clang-format-5.0 cppcheck python-pygments
- add-apt-repository ppa:ubuntu-toolchain-r/test
- apt-get update -qq && apt-get install -y -qq cmake ninja-build libncurses5-dev python3-all-dev gcc-7 g++-7 libcurl4-openssl-dev
#######################
# Compilation targets #
#######################
cmp:gcc:
stage: compilation
image: ubuntu
script:
- mkdir build && cd build
- cmake -DCURSES_LIBRARY=/usr/lib/x86_64-linux-gnu/libcurses.so -DCURSES_INCLUDE_PATH=/usr/include -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so -DCMAKE_BUILD_TYPE=Debug -G Ninja ..
- ninja
artifacts:
paths:
- build
expire_in: 3 hour
##############
# Unit tests #
##############
core:gcc:
stage: testing
image: ubuntu
dependencies:
- cmp:gcc
script:
- cd build
- ctest --output-on-failure
##############
# Formatting #
##############
fmt:gcc:
stage: formatting
image: ubuntu
dependencies:
- cmp:gcc
script:
- cd build
- ninja check-format
allow_failure: true
fmt:cppcheck:
stage: formatting
image: ubuntu
dependencies:
- cmp:gcc
script:
- cd build
- ninja cppcheck
- ninja cppcheck-html
artifacts:
paths:
- build/cppcheck_results
expire_in: 72 hour