-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
135 lines (124 loc) · 4.05 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
### Prototype build jobs ###
.build_script: &build_script
- mkdir -p build/
- cd build/
- $CMAKE_CMD
- ninja
.test_script: &test_script
- ctest -V
.build:
variables:
EXTRA_CMAKE_FLAGS: ""
before_script:
- export CMAKE_CMD="cmake -GNinja $EXTRA_CMAKE_FLAGS .."
script:
- *build_script
.build_and_test:
extends: .build
script:
- *build_script
- *test_script
.build_and_test_linux:
extends: .build_and_test
variables:
APT_PACKAGES: "build-essential cmake ninja-build git"
BACKPORTS_TARGET: ""
BACKPORTS_PACKAGES: ""
before_script:
- |
apt update
apt install -y $APT_PACKAGES
[ ! -z "$BACKPORTS_TARGET" ] && [ ! -z "$BACKPORTS_PACKAGES" ] && apt -t $BACKPORTS_TARGET install -y $BACKPORTS_PACKAGES
export CMAKE_CMD="cmake -GNinja $EXTRA_CMAKE_FLAGS .."
### Tests ###
test:debian:bullseye:
extends: .build_and_test_linux
stage: test
needs: []
image: debian:bullseye-backports
variables:
APT_PACKAGES: "build-essential ninja-build git"
BACKPORTS_TARGET: "bullseye-backports"
BACKPORTS_PACKAGES: "cmake"
EXTRA_CMAKE_FLAGS: "-DSMGL_BUILD_TESTS=ON"
test:debian:bullseye:boost:
extends: .build_and_test_linux
stage: test
needs: []
image: debian:bullseye-backports
variables:
APT_PACKAGES: "build-essential ninja-build git libboost-filesystem-dev"
BACKPORTS_TARGET: "bullseye-backports"
BACKPORTS_PACKAGES: "cmake"
EXTRA_CMAKE_FLAGS: "-DSMGL_BUILD_TESTS=ON -DSMGL_USE_BOOSTFS=ON"
test:ubuntu:22.04:
extends: .build_and_test_linux
stage: test
needs: []
image: ubuntu:22.04
variables:
APT_PACKAGES: "build-essential curl ninja-build git"
EXTRA_CMAKE_FLAGS: "-DSMGL_BUILD_TESTS=ON"
before_script:
- |
apt update
apt install -y $APT_PACKAGES
[ ! -z "$BACKPORTS_TARGET" ] && [ ! -z "$BACKPORTS_PACKAGES" ] && apt -t $BACKPORTS_TARGET install -y $BACKPORTS_PACKAGES
curl -o install_cmake.sh -L https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh
/bin/sh install_cmake.sh --skip-license --prefix=/usr/local
export CMAKE_CMD="cmake -GNinja $EXTRA_CMAKE_FLAGS .."
test:ubuntu:22.04:boost:
extends: .build_and_test_linux
stage: test
needs: []
image: ubuntu:22.04
variables:
APT_PACKAGES: "build-essential curl ninja-build git libboost-filesystem-dev"
EXTRA_CMAKE_FLAGS: "-DSMGL_BUILD_TESTS=ON -DSMGL_USE_BOOSTFS=ON"
before_script:
- |
apt update
apt install -y $APT_PACKAGES
[ ! -z "$BACKPORTS_TARGET" ] && [ ! -z "$BACKPORTS_PACKAGES" ] && apt -t $BACKPORTS_TARGET install -y $BACKPORTS_PACKAGES
curl -o install_cmake.sh -L https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh
/bin/sh install_cmake.sh --skip-license --prefix=/usr/local
export CMAKE_CMD="cmake -GNinja $EXTRA_CMAKE_FLAGS .."
test:macos:
extends: .build_and_test
stage: test
needs: []
variables:
EXTRA_CMAKE_FLAGS: "-DSMGL_BUILD_TESTS=ON"
tags:
- macos
- test
test:macos:boost:
extends: .build_and_test
stage: test
needs: []
variables:
CMAKE_PREFIX_PATH: "/usr/local/educelab/vc-deps-1.7-static-release"
EXTRA_CMAKE_FLAGS: "-DSMGL_BUILD_TESTS=ON -DSMGL_USE_BOOSTFS=ON"
tags:
- macos
- test
### Docs ###
pages:
stage: deploy
needs: []
image: debian:bullseye-backports
before_script:
- apt-get update
- apt-get install -y build-essential doxygen graphviz texlive ghostscript
- apt-get -t bullseye-backports install -y cmake
script:
- mkdir -p build/
- mkdir -p public/
- cmake -S . -B build/ -DSMGL_BUILD_DOCS=ON
- cmake --build build/ --target docs
- mv build/docs/html/ public/docs/
artifacts:
paths:
- public
only:
- main