-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
187 lines (170 loc) · 5.83 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/viaduck/ci
variables:
GIT_SUBMODULE_STRATEGY: recursive
ANDROID_PLATFORM: "android-29"
stages:
- build
- lint
- test
- coverage
- documentation
build:linux:x86_64:full:
stage: build
script:
- mkdir build
- cd build
- cmake -GNinja ../ -DPREBUILT_BRANCH=x86_64-linux -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
artifacts:
expire_in: 2h
paths:
- build/
lint:linux:x86_64:full:
stage: lint
script:
- vd-lint Commons $PWD
needs:
- job: build:linux:x86_64:full
artifacts: false
test:linux:x86_64:full:
variables:
GIT_STRATEGY: none
stage: test
script:
- cd build
- test/commons_test
needs:
- build:linux:x86_64:full
build:linux:x86_64:full:system-openssl:
stage: build
script:
- mkdir build
- cd build
- cmake -GNinja ../ -DSYSTEM_OPENSSL=ON -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
artifacts:
expire_in: 2h
paths:
- build/
test:linux:x86_64:full:system-openssl:
variables:
GIT_STRATEGY: none
stage: test
script:
- cd build
- test/commons_test
needs:
- build:linux:x86_64:full:system-openssl
build:linux:x86_64:base-only:
stage: build
script:
- mkdir build
- cd build
- cmake -GNinja ../ -DCOMMONS_BASE_ONLY=ON -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
artifacts:
expire_in: 2h
paths:
- build/
test:linux:x86_64:base-only:
variables:
GIT_STRATEGY: none
stage: test
script:
- cd build
- test/commons_test
needs:
- build:linux:x86_64:base-only
coverage:linux:x86_64:
stage: coverage
script:
- cd build
- cmake . -DCMAKE_BUILD_TYPE=Debug -DVIADUCK_COVERAGE=ON
- ninja commons_test_coverage
artifacts:
paths:
- build/commons_test_coverage/
needs:
- build:linux:x86_64:full
documentation:linux:x86_64:
stage: documentation
script:
- cd build
- ninja commons_doc
artifacts:
paths:
- build/doc/html/
needs:
- build:linux:x86_64:full
build:windows:x86_64:full:
image: viaduck/ci:mingw
stage: build
script:
- update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix # fix c++11 threading support on debian
- update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
- mkdir build-windows-x86_64
- cd build-windows-x86_64
- cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../external/secure_memory/cmake-modules/toolchains/mingw64-x86_64.cmake -DPREBUILT_BRANCH=x86_64-w64-mingw32 -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/ ../
- ninja
- peldd -p "external/openssl-cmake/openssl-prefix/src/openssl/usr/local/bin" test/commons_test.exe | grep -vE '\.exe$' | xargs cp -t .
artifacts:
expire_in: 2h
paths:
- build-windows-x86_64/
build:windows:x86_64:base-only:
image: viaduck/ci:mingw
stage: build
script:
- update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix # fix c++11 threading support on debian
- update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
- mkdir build-windows-x86_64
- cd build-windows-x86_64
- cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../external/secure_memory/cmake-modules/toolchains/mingw64-x86_64.cmake -DCOMMONS_BASE_ONLY=ON -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/ ../
- ninja
test:windows:x86_64:full:
variables:
GIT_STRATEGY: none
stage: test
script:
- cd build-windows-x86_64
- test\commons_test.exe
needs:
- build:windows:x86_64:full
tags:
- windows
build:android:arm64-v8a:full:
image: viaduck/ci:android
stage: build
script:
- mkdir build-android-arm64-v8a
- cd build-android-arm64-v8a
- cmake -GNinja -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=arm64-v8a -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=$ANDROID_NDK -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DPREBUILT_BRANCH=arm64-v8a-android -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/ ../
- ninja
artifacts:
expire_in: 2h
paths:
- build-android-arm64-v8a/
build:android:armeabi-v7a:full:
image: viaduck/ci:android
stage: build
script:
- mkdir build-android-armeabi-v7a
- cd build-android-armeabi-v7a
- cmake -GNinja -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=armeabi-v7a -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=$ANDROID_NDK -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DPREBUILT_BRANCH=armeabi-v7a-android -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/ ../
- ninja
artifacts:
expire_in: 2h
paths:
- build-android-armeabi-v7a/
build:android:x86_64:full:
image: viaduck/ci:android
stage: build
script:
- mkdir build-android-x86_64
- cd build-android-x86_64
- cmake -GNinja -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=x86_64 -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=$ANDROID_NDK -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DPREBUILT_BRANCH=x86_64-android -DCOMMONS_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/ ../
- ninja
artifacts:
expire_in: 2h
paths:
- build-android-x86_64/