-
Notifications
You must be signed in to change notification settings - Fork 18
/
.gitlab-ci.yml
283 lines (264 loc) · 8.98 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
cache:
key: "${CI_JOB_NAME}"
paths:
- .ccache/
variables:
USE_CCACHE: "true"
CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
CCACHE_DIR: "${CI_PROJECT_DIR}/.ccache"
CCACHE_COMPILERCHECK: "content"
DEBIAN_FRONTEND: 'noninteractive'
.when_push:
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: always
- when: never
.when_sched:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
- when: never
.debian_build:
script:
- apt update && apt -y install --no-install-recommends eatmydata
- eatmydata -- apt -y dist-upgrade
- eatmydata -- apt -y install --no-install-recommends ${PACKAGES}
- if [ -n "${EXPERIMENTAL_PACKAGES}" ]; then
apt -y install --no-install-recommends
-t experimental ${EXPERIMENTAL_PACKAGES}; fi
- eatmydata -- .ci-build/build.sh
extends: .when_push
alpine-3:
image: alpine:3
stage: .pre
script:
- apk update
- apk add scons python3-dev libcap-dev ncurses-dev build-base bash linux-headers musl-dev ccache
- .ci-build/build.sh
extends: .when_sched
debian-experimental:gcc:
allow_failure: true
image: debian:experimental
variables:
SCONSOPTS: 'qt=yes xgps=yes'
PACKAGES: 'bc build-essential ccache
libbluetooth-dev libdbus-1-dev libglib2.0-dev libncurses-dev
libqt5network5t64 libusb-1.0-0-dev pps-tools
python3-all python-is-python3 python3-setuptools
qtbase5-dev scons'
EXPERIMENTAL_PACKAGES: 'gcc g++'
extends: .debian_build
debian-unstable:clang:
allow_failure: true
image: debian:unstable
variables:
SCONSOPTS: 'qt=yes xgps=yes'
CC: 'clang'
CXX: 'clang++'
PACKAGES: 'bc build-essential ccache clang
libbluetooth-dev libdbus-1-dev libglib2.0-dev
libncurses-dev libqt5network5t64 libusb-1.0-0-dev
pps-tools python3-all python-is-python3
python3-setuptools qtbase5-dev scons'
extends: .debian_build
debian-experimental:clang:
# FIXME!
allow_failure: true
image: debian:experimental
variables:
SCONSOPTS: 'qt=yes xgps=yes'
CC: 'clang'
CXX: 'clang++'
PACKAGES: 'bc build-essential ccache
libbluetooth-dev libdbus-1-dev libglib2.0-dev libncurses-dev
libqt5network5t64 libusb-1.0-0-dev pps-tools
python3-all python-is-python3 python3-setuptools
qtbase5-dev scons'
EXPERIMENTAL_PACKAGES: 'clang'
extends: .debian_build
debian-unstable:minimal:
image: debian:unstable
stage: .pre
variables:
SCONSOPTS: 'aivdm=no ashtech=no bluez=no control_socket=no
controlsend=no coveraging=no dbus_export=no debug=no
earthmate=no evermore=no force_global=no fury=no fv18=no
garmin=no garmintxt=no geostar=no gpsclock=no gpsdclients=no
greis=no implicit_link=no isync=no itrax=no leapfetch=no
libgpsmm=no magic_hat=no manbuild=no minimal=no mtk3301=no
navcom=no ncurses=no netfeed=no nmea0183=no nmea2000=no
nostrip=no ntrip=no oncore=no oscillator=no passthrough=no
profiling=no python=no qt=no reconfigure=no shared=no
shm_export=no sirf=no skytraq=no slow=no socket_export=yes
squelch=no superstar2=no systemd=no timeservice=no tnt=no
tripmate=no tsip=no usb=no xgps=no'
NOCHECK: 'true'
PACKAGES: 'asciidoctor build-essential ccache python-is-python3 python3-all
python3-setuptools scons'
extends: .debian_build
fedora-latest:
allow_failure: true
image: fedora:latest
variables:
SCONSOPTS: 'qt=yes xgps=yes'
script:
- dnf install -y eatmydata
- eatmydata -- dnf install -y ccache diffutils
bluez-libs-devel dbus-devel gcc-c++ ncurses-devel
python3-setuptools qt5-qtbase-devel scons pps-tools-devel
- eatmydata .ci-build/build.sh
extends: .when_push
alma-8-minimal:
allow_failure: true
interruptible: true
image: almalinux:8
variables:
SCONSOPTS: 'qt=yes xgps=yes'
script:
- dnf -y install epel-release
- dnf -y install -y eatmydata # Should be early but after EPEL
- eatmydata -- dnf -y install dnf-plugins-core
- eatmydata -- dnf config-manager --set-enabled powertools
- eatmydata -- dnf -y install diffutils python3-scons bc ncurses-devel
qt5-qtbase-devel pps-tools-devel libnsl2-devel bluez-libs-devel
platform-python-devel dbus-devel libusbx-devel gtk3-devel python3-pyserial
python3-cairo python3-gobject-base ccache python3
- eatmydata -- ln -sv scons-3 /usr/bin/scons&&ln -sv python3 /usr/bin/python
- eatmydata -- .ci-build/build.sh
extends: .when_push
# to avoid failed builds on MRs/forks where no builder with the
# tag `freebsd` is available, run this job only if
# $HAVE_FREEBSD == "true"
# set this in your CI environment settings in gitlab.
freebsd:
# FreeBSD jobe keeps timing out
allow_failure: true
rules:
- if: '$HAVE_FREEBSD != "true"'
when: never
variables:
# 1 Oct 20, 0.01250, 0.02, are too short
WRITE_PAD: '0.05'
tags:
- freebsd
script:
- .ci-build/build.sh
timeout: 2 h
extends: .when_sched
# to avoid failed builds on MRs/forks where no builder with the
# tag `sparc64` is available, run this job only if
# $HAVE_SPARC64_LINUX == "true"
# set this in your CI environment settings in gitlab.
sparc64-linux:
# sparc64 gitlab-runner broken 7 Nov 2020
# fatal: unable to access 'https://gitlab.com/gpsd/gpsd.git/':
# gnutls_handshake() failed: The TLS connection was non-properly terminated.
allow_failure: true
rules:
- if: '$HAVE_SPARC64_LINUX != "true"'
when: never
tags:
- sparc64
- linux
script:
- .ci-build/build.sh
timeout: 1 h 10m
extends: .when_sched
# to avoid failed builds on MRs/forks where no builder with the
# tag `mips64le` is available, run this job only if
# $HAVE_MIPS64LE_LINUX == "true"
# set this in your CI environment settings in gitlab.
mips64le-linux:
rules:
- if: '$HAVE_MIPS64LE_LINUX != "true"'
when: never
tags:
- mips64le
- linux
script:
- .ci-build/build.sh
extends: .when_sched
scan-build:
allow_failure: true
image: debian:unstable
variables:
SCONSOPTS: 'qt=yes xgps=yes'
SCAN_BUILD: 'scan-build -o scan_build'
NOCHECK: 'true'
PACKAGES: 'bc build-essential clang clang-tools
libbluetooth-dev libdbus-1-dev libglib2.0-dev
libncurses-dev libqt5network5t64 libusb-1.0-0-dev
pps-tools python3-all python3-setuptools
qtbase5-dev scons'
artifacts:
paths:
- scan_build
expire_in: 1 week
extends: .debian_build
# https://www.synopsys.com/blogs/software-security/integrating-coverity-scan-with-gitlab-ci/
coverity:
allow_failure: true
image: debian:latest
variables:
SCONSOPTS: 'qt=yes xgps=yes'
SCAN_BUILD: 'cov-analysis-linux64-*/bin/cov-build --dir cov-int'
NOCHECK: 'true'
PACKAGES: 'bc build-essential ca-certificates clang clang-tools curl git
libbluetooth-dev libdbus-1-dev libglib2.0-dev
libncurses-dev libqt5network5 libusb-1.0-0-dev
pps-tools python-is-python3 python3-all python3-setuptools
qtbase5-dev scons'
script:
- \[ -n "$COVERITY_SCAN_PROJECT_NAME" ] || return 1
- \[ -n "$COVERITY_SCAN_TOKEN" ] || return 1
- \[ -n "$COVERITY_USER_EMAIL" ] || return 1
- apt update
- apt -y install --no-install-recommends eatmydata
- eatmydata -- apt -y install --no-install-recommends ${PACKAGES}
- eatmydata -- curl -o /tmp/cov-analysis-linux64.tgz -D -
https://scan.coverity.com/download/linux64
--form project=$COVERITY_SCAN_PROJECT_NAME
--form token=$COVERITY_SCAN_TOKEN
- eatmydata -- tar xfz /tmp/cov-analysis-linux64.tgz
- eatmydata -- .ci-build/build.sh
- eatmydata -- tar cfz cov-int.tar.gz cov-int
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
--form token=$COVERITY_SCAN_TOKEN --form email=$COVERITY_USER_EMAIL
-D - --form [email protected]
--form version="`git describe --tags`"
--form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
artifacts:
paths:
- cov-int
# extends: .when_sched
# temporarily run every push
extends: .when_push
# as long as sconstruct has so many options, this does not make sense
# needs a better / faster way to test
#
#test-options:
# image: debian:unstable
# needs: ["debian-unstable:gcc"]
# variables:
# DEBIAN_FRONTEND: 'noninteractive'
# when: manual
# script:
# - apt update && apt -y install build-essential debhelper
# po-debconf python3-all-dev python3-all-dbg libncurses-dev
# libusb-1.0-0-dev libdbus-1-dev libglib2.0-dev makedev
# libbluetooth-dev qtbase5-dev libqt5network5 lsb-release
# bc dpkg-dev scons chrpath dh-buildinfo pps-tools
# - .ci-build/test_options.sh
#
pages:
image: alpine:latest
script:
- apk update && apk add python3 asciidoctor scons rsync musl-dev gcc
- gem install rouge
- mkdir .pages; WEBSITE=.public scons website=.pages website; mv .public public
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
- ls -lR public
artifacts:
paths:
- public
extends: .when_sched