-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
101 lines (95 loc) · 3.03 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
100
101
# ------------------------------------------------------------
# This file is the main CMakeLists of memtool of headcode.space
#
# The 'LICENSE.txt' file in the project root holds the software license.
# Copyright (C) 2020-2021 headcode.space e.U.
# Oliver Maurhart <info@headcode.space>, https://www.headcode.space
# ------------------------------------------------------------
stages:
- build
- package
build:
stage: build
image: registry.gitlab.com/headcode.space/memtool:ubuntu-focal
script:
- git submodule init
- git submodule update
- rm -rf build &> /dev/null
- mkdir -p build
- cd build
- cmake -GNinja -DBUILD_TESTING=On -DCMAKE_BUILD_TYPE=Debug -DPROFILING_MODE_ENABLED:Bool=On ..
- ninja
- ctest -VV -F --timeout 10.0
- ninja run-gcovr
- ninja package_source
- cd ${CI_PROJECT_DIR}
#- sonar-scanner -Dsonar.host.url=${SONAR_HOST} -Dsonar.login=${SONAR_LOGIN} --> BROKEN!
artifacts:
paths:
- build/*.tar.gz
- build/gcovr-report.xml
name: ${CI_PROJECT_NAME}-sources
coverage: '/^TOTAL.*\s+(\d+\%)$/'
package-debian-buster:
stage: package
image: registry.gitlab.com/headcode.space/memtool:debian-buster
script:
- git submodule init
- git submodule update
- rm -rf build &> /dev/null
- mkdir -p build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB -DCPACK_SYSTEM_NAME=debian-buster -DCI_JOB_TOKEN=$CI_JOB_TOKEN ..
- ninja
- ninja package
- ninja gitlab_push_package
artifacts:
paths:
- build/*.deb
name: ${CI_PROJECT_NAME}-debian-buster
package-ubuntu-focal:
stage: package
image: registry.gitlab.com/headcode.space/memtool:ubuntu-focal
script:
- git submodule init
- git submodule update
- rm -rf build &> /dev/null
- mkdir -p build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB -DCPACK_SYSTEM_NAME=ubuntu-focal -DCI_JOB_TOKEN=$CI_JOB_TOKEN ..
- ninja
- ninja package
- ninja gitlab_push_package
artifacts:
paths:
- build/*.deb
name: ${CI_PROJECT_NAME}-ubuntu-focal
package-fedora32:
stage: package
image: registry.gitlab.com/headcode.space/memtool:fedora32
script:
- git submodule init
- git submodule update
- rm -rf build &> /dev/null
- mkdir -p build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=RPM -DCPACK_SYSTEM_NAME=fedora32 -DCI_JOB_TOKEN=$CI_JOB_TOKEN ..
- ninja
- ninja package
- ninja gitlab_push_package
artifacts:
paths:
- build/*.rpm
name: ${CI_PROJECT_NAME}-fedora32
package-conan:
stage: package
image: registry.gitlab.com/headcode.space/memtool:ubuntu-focal
script:
- git submodule init
- git submodule update
- rm -rf build &> /dev/null
- mkdir -p build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCONAN_USER=headcode.space+memtool -DCONAN_CHANNEL=stable -DCONAN_REMOTE=gitlab ..
- ninja conan
- CONAN_LOGIN_USERNAME=ci_user CONAN_PASSWORD=${CI_JOB_TOKEN} ninja conan_upload