-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
215 lines (201 loc) · 4.87 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#---------------
# Windows Builds
#---------------
.job_template: &build-windows
stage: build
script:
- set TARGET_PLATFORM=%CI_JOB_NAME%
- set TOOLCHAIN=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake
- rd /s /q "%CI_PROJECT_DIR%/build/%TARGET_PLATFORM%"
- mkdir "%CI_PROJECT_DIR%/build/%TARGET_PLATFORM%"
- cd "%CI_PROJECT_DIR%/build/%TARGET_PLATFORM%"
- cmake "%CI_PROJECT_DIR%" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_TOOLCHAIN_FILE=%TOOLCHAIN% -DVCPKG_TARGET_TRIPLET=%TRIPLET% -DCMAKE_GENERATOR_PLATFORM=%ARCH%
- cmake --build . --target INSTALL --config %BUILD_TYPE%
cache:
untracked: true
policy: push
artifacts:
untracked: true
expire_in: 1 week
build-x64-windows-release:
<<: *build-windows
tags:
- windows
- release
before_script:
- set ARCH=x64
- set BUILD_TYPE=Release
- set TRIPLET=x64-windows
cache:
key: build-x64-windows-release
paths:
- build/build-x64-windows-release/bin/
- build/build-x64-windows-release/data/
artifacts:
paths:
- build/build-x64-windows-release/bin/*.dll
- build/build-x64-windows-release/include/*.h
build-x64-windows-debug:
<<: *build-windows
tags:
- windows
- debug
before_script:
- set ARCH=x64
- set BUILD_TYPE=Debug
- set TRIPLET=x64-windows
cache:
key: build-x64-windows-debug
paths:
- build/build-x64-windows-debug/bin/
- build/build-x64-windows-debug/data/
artifacts:
paths:
- build/build-x64-windows-debug/bin/*.dll
- build/build-x64-windows-debug/include/*.h
#---------------
# Windows Tests
#---------------
.job_template: &test-windows
tags:
- windows
before_script:
- set GDAL_DATA=%VCPKG_ROOT%\installed\x64-windows\share\gdal
- set PROJ_LIB=%VCPKG_ROOT%\installed\x64-windows\share\proj4
stage: test
cache:
policy: pull
test-x64-windows-release:
<<: *test-windows
dependencies:
- build-x64-windows-release
script:
- cd %VCPKG_ROOT%/installed/x64-windows/bin
- copy proj_4_9.dll proj.dll
- "%CI_PROJECT_DIR%/build/build-x64-windows-release/bin/test_pdalc"
cache:
key: build-x64-windows-release
paths:
- build/build-x64-windows-release/bin/
test-x64-windows-debug:
<<: *test-windows
dependencies:
- build-x64-windows-debug
script:
- cd %VCPKG_ROOT%/installed/x64-windows/debug/bin
- copy proj_4_9_d.dll proj.dll
- "%CI_PROJECT_DIR%/build/build-x64-windows-debug/bin/test_pdalcd"
cache:
key: build-x64-windows-debug
paths:
- build/build-x64-windows-debug/bin/
#--------------
# Linux Builds
#--------------
#
.job_template: &build-linux
stage: build
script:
- export TARGET_PLATFORM=$CI_JOB_NAME
- echo "Building $CI_PROJECT_NAME ($CI_COMMIT_REF_NAME branch) for $TARGET_PLATFORM"
- rm -rf "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
- mkdir -p "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
- cd "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPDALC_GCC_PARAM_GGC_MIN_HEAPSIZE=8192 "$CI_PROJECT_DIR"
- make
- make install
variables:
GIT_STRATEGY: clone
cache:
untracked: true
key: "$CI_JOB_NAME"
policy: push
paths:
- build/$CI_JOB_NAME/bin/
- build/$CI_JOB_NAME/lib/
- build/$CI_JOB_NAME/data/
artifacts:
untracked: true
expire_in: 1 week
paths:
- build/$CI_JOB_NAME/lib/
- build/$CI_JOB_NAME/include/*.h
build-x64-linux-release-ubuntu:
<<: *build-linux
tags:
- linux
- pdal
- docker
- release
- ubuntu
before_script:
- export BUILD_TYPE=Release
build-x64-linux-debug-ubuntu:
<<: *build-linux
tags:
- linux
- pdal
- docker
- debug
- ubuntu
before_script:
- export BUILD_TYPE=Debug
build-x64-linux-release-alpine:
<<: *build-linux
tags:
- linux
- pdal
- docker
- release
- alpine
before_script:
- export BUILD_TYPE=Release
build-x64-linux-debug-alpine:
<<: *build-linux
tags:
- linux
- pdal
- docker
- debug
- alpine
before_script:
- export BUILD_TYPE=Debug
#---------------
# Linux Tests
#---------------
.job_template: &test-linux
stage: test
script:
- rm -rf coverage_pdalc
- make coverage_pdalc
cache:
key: "$CI_JOB_NAME"
policy: pull
test-x64-linux-release-alpine:
<<: *test-linux
tags:
- linux
- pdal
- release
- alpine
dependencies:
- build-x64-linux-release-alpine
before_script:
- cd build/build-x64-linux-release-alpine
artifacts:
paths:
- build/build-x64-linux-release-alpine/coverage_pdalc
test-x64-linux-debug-alpine:
<<: *test-linux
tags:
- linux
- pdal
- debug
- alpine
dependencies:
- build-x64-linux-debug-alpine
before_script:
- cd build/build-x64-linux-debug-alpine
artifacts:
paths:
- build/build-x64-linux-debug-alpine/coverage_pdalc