-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
70 lines (59 loc) · 1.65 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
image: ubuntu:latest
---
variables:
SAST_IMAGE_SUFFIX: "-fips"
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
stages:
- test
.setup_linux: &setup_linux |
DEBIAN_FRONTEND=noninteractive
# set time-zone
TZ=Canada/Pacific
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# for downloading
apt-get update -qq
apt-get install -y --no-install-recommends curl gnupg ca-certificates
# keys used by apt
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
.setup_cpp: &setup_cpp |
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.15.0/setup_cpp_linux"
chmod +x setup_cpp_linux
./setup_cpp_linux --compiler $compiler --cmake true --ninja true --conan true --ccache true --clangtidy true --clangformat true --cppcheck true
source ~/.profile
.test: &test |
# Build and Test
cmake -S . -B ./build -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
cmake --build ./build --config RelWithDebInfo
test_linux_llvm:
stage: test
variables:
compiler: llvm
script:
- *setup_linux
- *setup_cpp
- *test
- gtest.exe --gtest_output="xml:report.xml"
artifacts:
when: always
reports:
junit: report.xml
test_linux_gcc:
stage: test
variables:
compiler: gcc
script:
- *setup_linux
- *setup_cpp
- *test
cpp:
stage: test
script:
- gtest.exe --gtest_output="xml:report.xml"
artifacts:
when: always
reports:
junit: report.xml