-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
71 lines (63 loc) · 2.28 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:
- test
- sonar
build-linux:
tags:
- linux
- docker
- x64
image: ubuntu:24.04
stage: test
before_script:
- export TZ=Europe/Dublin
- ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- apt -y update && apt -y install gcc g++ cmake make git ssh
- apt -y install libboost1.83-all-dev libssl-dev rapidjson-dev libicu-dev libcurl4-openssl-dev libgtest-dev
script:
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release
-DTMDB_API_KEY=$TMDB_KEY
-DBUILD_TEST=ON
-DBUILD_STATIC=ON
-DBUILD_SHARED=OFF
..
- make
- ctest -V
build-windows:
tags:
- windows
- native
- x64
stage: test
script:
- cmd /c build-windows.bat
sonar-linux:
stage: sonar
image: ubuntu:24.04
tags:
- linux
- docker
- x64
allow_failure: true
before_script:
- export TZ=Europe/Dublin
- ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- apt -y update && apt -y install gcc g++ cmake make git ssh
- apt -y install libboost1.83-all-dev libssl-dev rapidjson-dev libicu-dev libcurl4-openssl-dev libgtest-dev
- apt -y install unzip curl wget
- mkdir -p .sonar/bw-output
- curl -sSLo build-wrapper-linux-x86.zip $SONAR_HOST_URL/static/cpp/build-wrapper-linux-x86.zip
- unzip -o build-wrapper-linux-x86.zip -d .sonar
- curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.1.0.4477-linux-x64.zip
- export kkey=sonar-scanner-6.1.0.4477-linux-x64
- unzip -o sonar-scanner.zip -d .sonar
script:
- cmake -DCMAKE_BUILD_TYPE=Release
-DTMDB_API_KEY=$TMDB_KEY -DBUILD_TEST=ON -DBUILD_STATIC=ON -DBUILD_SHARED=OFF .
- .sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir .sonar/bw-output make
- .sonar/$kkey/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=.sonar/bw-output
-Dsonar.host.url="${SONAR_HOST_URL}" -Dsonar.token="${SONAR_TOKEN}"
cache:
paths:
- .sonar
- .gcov