-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
52 lines (44 loc) · 1.1 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
workflow:
name: 'Pipeline for branch: $CI_COMMIT_BRANCH'
default:
image: ubuntu:25.04
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
CONAN_HOME: "$CI_PROJECT_DIR/.conan2"
cache:
key: all
paths:
- .cache/pip
- .conan2
- build
stages:
- build
- test
- package
before_script:
- apt update && DEBIAN_FRONTEND=noninteractive apt install -y cmake ninja-build rpm file
build:
stage: build
script:
- DEBIAN_FRONTEND=noninteractive apt install -y build-essential git python3-venv python3-pip
- python3 -m venv venv && source ./venv/bin/activate
- pip install conan
- conan profile detect -f
- mkdir -p build && cd build
- conan install ../Chapter10/customer --build=missing -s build_type=Release -s compiler=gcc -s compiler.cppstd=gnu20 -of .
- cmake -GNinja -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release ../Chapter10/customer
- cmake --build .
test:
stage: test
script:
- cd build
- ctest .
package:
stage: package
script:
- cd build
- cpack .
artifacts:
paths:
- build/Customer*.deb
- build/Customer*.rpm