This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
87 lines (77 loc) · 1.73 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
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0
---
variables:
GIT_DEPTH: 0
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE_DEV: villas/common-dev
stages:
- prepare
- build
- test
# Stage: prepare
# Build docker image which is used to build & test VILLAScommon
docker-dev:
stage: prepare
image: docker:19.03
script:
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
tags:
- docker
# Stage: build
build:source:
stage: build
script:
- mkdir build && cd build && cmake .. && make -j8
artifacts:
expire_in: 1 week
name: ${CI_PROJECT_NAME}-${CI_BUILD_REF}
paths:
- build/
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
# Stage: test
test:unit:
stage: test
dependencies:
- build:source
script:
- build/tests/unit/unit-tests-common
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
test:cppcheck:
stage: test
script:
- cppcheck -j $(nproc)
--max-configs=32
--error-exitcode=1
--quiet
--inline-suppr
--enable=warning,performance,portability,information,missingInclude
--suppress=noValidConfiguration
--std=c++11
-I include
lib/
tests/unit/ | tee cppcheck.log
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
dependencies:
- build:source
tags:
- docker
artifacts:
when: on_failure
paths:
- cppcheck.log
expose_as: cppcheck
test:reuse:
stage: test
image:
name: fsfe/reuse:latest
entrypoint: [""]
script:
- reuse lint
tags:
- docker