ntp.util: Fix rpeers mode in PeerSummary.summary
[ntpsec.git] / .gitlab-ci.yml
blobdb8ff588ae764abfa0b2ad90236d40c6a653fae3
1 pages:
2   stage: build
3   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-pages
4   script:
5     - python3 ./waf configure --prefix=/tmp/docbot-local --htmldir=`pwd`/public/latest/ --enable-doc --disable-manpage build install
6     - cp www/favicon.ico public
7     - cp docs/top.html.in public/index.html
8     - cp docs/top-asciidoc.css public/asciidoc.css
9     - mv public/latest/404.html public/404.html
10     - sed -i -E -e 's!\./(asciidoc\.(js|css))!\./latest/\1!g' public/404.html
11     - find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
12   allow_failure: true
13   artifacts:
14     paths:
15        - public
16   tags:
17     - gitlab-org
19 include:
20   - template: Code-Quality.gitlab-ci.yml
21   - template: SAST.gitlab-ci.yml
22   - local: '.gitlab-opttest-ci.yml'
23   - local: '.gitlab-docker-ci.yml'
25 .job_template: &job_definition
26   stage: build
27   rules:
28     - if: '$CI_PIPELINE_SOURCE != "schedule"'
29   tags:
30     - gitlab-org
32 .job_template_allow_failure: &job_definition_allow_failure
33   <<: *job_definition
34   allow_failure: true
36 alpine-basic:
37   <<: *job_definition
38   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
39   script:
40     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
41     - python3 ./waf install
42     - python3 ./waf uninstall
44 alpine-refclocks:
45   <<: *job_definition
46   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
47   script:
48     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
50 alpine-edge-basic:
51   <<: *job_definition_allow_failure
52   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge
53   script:
54     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
55     - python3 ./waf install
56     - python3 ./waf uninstall
58 alpine-edge-refclocks:
59   <<: *job_definition_allow_failure
60   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge
61   script:
62     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
64 AsciiDoc-3-Fedora:
65   <<: *job_definition_allow_failure
66   image: fedora
67   script:
68     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel wget libxslt docbook-style-xsl
69     - mkdir asciidoc3
70     - wget https://asciidoc3.org/asciidoc3-3.2.3.tar.gz
71     - tar -xpvf asciidoc3-3.2.3.tar.gz -C asciidoc3
72     - ln -sv a2x3.py asciidoc3/a2x3
73     - ln -sv asciidoc3.py asciidoc3/asciidoc3
74     - asciidoc3/asciidoc3 --version || echo -n
75     - PATH="$PWD/asciidoc3:$PATH" python3 ./waf configure --enable-doc --enable-manpage build
77 AsciiDoc-py3-Alpine:
78   <<: *job_definition
79   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
80   script:
81     - apk update && apk add python3-dev asciidoc
82     - python3 ./waf configure --enable-doc --enable-manpage build
84 AsciiDoc-no:
85   <<: *job_definition
86   image: alpine
87   script:
88     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev pythonispython3
89     - python ./waf configure --disable-doc --disable-manpage build
91 AsciiDoc-classic3-Debian-Old:
92   <<: *job_definition
93   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
94   script:
95     - apt-get update
96     - DEBIAN_FRONTEND="noninteractive" apt-get install -y python3-dev asciidoc-base
97     - python3 ./waf configure --enable-doc --enable-manpage build --disable-nts
99 AsciiDoc-classic2-Debian-Old:
100   <<: *job_definition
101   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
102   script:
103     - apt-get update
104     - DEBIAN_FRONTEND="noninteractive" apt-get install -y python2-dev asciidoc-base
105     - python2 ./waf configure --enable-doc --enable-manpage build --disable-nts
107 debian-oldstable-basic:
108   <<: *job_definition
109   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
110   script:
111     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build --pyshebang "/usr/bin/env python3"
112     - python3 ./waf install
113     - python3 ./waf uninstall
115 debian-oldstable-refclocks:
116   <<: *job_definition
117   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
118   script:
119     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
121 debian-stable-basic:
122   <<: *job_definition
123   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
124   script:
125     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
126     - python3 ./waf install
127     - python3 ./waf uninstall
129 debian-stable-refclocks:
130   <<: *job_definition
131   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
132   script:
133     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
135 debian-testing-basic:
136   <<: *job_definition
137   image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
138   script:
139     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
140     - python3 ./waf install
141     - python3 ./waf uninstall
143 debian-testing-refclocks:
144   <<: *job_definition
145   image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
146   script:
147     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
149 debian-unstable-basic:
150   <<: *job_definition_allow_failure
151   image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable
152   script:
153     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
154     - python3 ./waf install
155     - python3 ./waf uninstall
157 debian-unstable-refclocks:
158   <<: *job_definition_allow_failure
159   image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable
160   script:
161     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
163 ubuntu-latest-basic:
164   <<: *job_definition
165   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
166   script:
167     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
168     - python3 ./waf install
169     - python3 ./waf uninstall
171 ubuntu-latest-refclocks:
172   <<: *job_definition
173   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
174   script:
175     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
177 ubuntu-devel-basic:
178   <<: *job_definition_allow_failure
179   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel
180   script:
181     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
182     - python3 ./waf install
183     - python3 ./waf uninstall
185 ubuntu-devel-refclocks:
186   <<: *job_definition_allow_failure
187   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel
188   script:
189     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
191 ubuntu-rolling-basic:
192   <<: *job_definition
193   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
194   script:
195     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
196     - python3 ./waf install
197     - python3 ./waf uninstall
199 ubuntu-rolling-refclocks:
200   <<: *job_definition
201   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
202   script:
203     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
205 freebsd-basic:
206   <<: *job_definition
207   script:
208     - python ./waf configure --disable-doc --disable-manpage build
209     - DESTDIR=build/prison python ./waf install
210     - DESTDIR=./prison python ./waf install
211     - DESTDIR=../prison python ./waf install
212     - rm -rvf build/prison ./prison ../prison
213   tags:
214     - freebsd
215   rules:
216     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
218 freebsd-refclocks:
219   <<: *job_definition
220   script:
221     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
222   tags:
223     - freebsd
224   rules:
225     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
227 centos-latest-basic:
228   <<: *job_definition
229   image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
230   script:
231     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
232     - python3 ./waf install
233     - python3 ./waf uninstall
235 centos-latest-refclocks:
236   <<: *job_definition
237   image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
238   script:
239     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
241 fedora-latest-basic:
242   <<: *job_definition
243   image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
244   script:
245     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
246     - python3 ./waf install
247     - python3 ./waf uninstall
249 fedora-latest-refclocks:
250   <<: *job_definition
251   image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
252   script:
253     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
255 python3:
256   <<: *job_definition_allow_failure
257   image: $CI_REGISTRY/ntpsec/ntpsec/python3
258   script:
259     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
261 python-coverage:
262   <<: *job_definition
263   script:
264     - apt-get update -qq && apt-get install -y -qq netbase bison python-dev-is-python3 python3-coverage
265     - python ./waf configure --disable-doc --disable-manpage build
266     - for i in build/main/tests/pylib/test_*; do python3-coverage run -a --source build/main/pylib "$i"; done
267     - python3-coverage report
269 clang-basic:
270   <<: *job_definition
271   image: $CI_REGISTRY/ntpsec/ntpsec/clang
272   script:
273     - python3 ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang build --pyshebang "/usr/bin/env python3"
274     - python3 ./waf install
275     - python3 ./waf uninstall
277 clang-refclocks:
278   <<: *job_definition
279   image: $CI_REGISTRY/ntpsec/ntpsec/clang
280   script:
281     - python3 ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang --refclock=all build
283 openSUSE-leap-basic:
284   <<: *job_definition
285   image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
286   script:
287     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build  --pyshebang "/usr/bin/env python3"
288     - python3 ./waf install
289     - python3 ./waf uninstall
291 openSUSE-leap-refclocks:
292   <<: *job_definition
293   image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
294   script:
295     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
297 # debian-stable-basic-32bit:
298 #   <<: *job_definition
299 #   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-i386
300 #   script:
301 #     - python ./waf configure --disable-doc --disable-manpage build
303 # debian-stable-refclocks-32bit:
304 #   <<: *job_definition
305 #   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-i386
306 #   script:
307 #     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
309 debian-stable-mDNS-basic:
310   <<: *job_definition
311   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
312   script:
313     - python3 ./waf configure --disable-doc --disable-manpage build
315 debian-stable-mDNS-refclocks:
316   <<: *job_definition
317   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
318   script:
319     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
321 cross-build:
322   <<: *job_definition_allow_failure
323   script:
324     - PYTHON_VERSION=2.7 PYTAG=cpython27 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --disable-doc --disable-manpage --disable-nts --cross-compiler=arm-linux-gnueabihf-gcc-5 --cross-cflags '-I/srv/arm-local/include -I/srv/arm-local/include/python2.7' --cross-ldflags '-L/srv/arm-local/lib' --pythondir=/srv/arm-local/lib/python2.7/dist-packages --pythonarchdir=/srv/arm-local/lib/python2.7/dist-packages build
325   tags:
326     - ubuntu-1604-lts
327   rules:
328     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
330 cross-armhf-build:
331   <<: *job_definition_allow_failure
332   image: $CI_REGISTRY/ntpsec/ntpsec/cross-armhf
333   script:
334     - pyver=$(python3 -c 'import sys;print(f"{sys.version_info.major}.{sys.version_info.minor}")')
335     - PYTHON_VERSION=${pyver} PYTAG=cpython3 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --disable-doc --disable-manpage --disable-nts --cross-compiler=arm-linux-gnueabihf-gcc --cross-cflags "-I/usr/include/ -I/usr/include/python${pyver}" --cross-ldflags '-L/usr/libhf' --pythondir=/usr/libhf/python${pyver}/dist-packages --pythonarchdir=/usr/libhf/python${pyver}/dist-packages build --enable-pylib=ffi
336     - PYTHON_VERSION=${pyver} PYTAG=cpython3 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --disable-doc --disable-manpage --disable-nts --cross-compiler=arm-linux-gnueabihf-gcc --cross-cflags "-I/usr/include/ -I/usr/include/python${pyver}" --cross-ldflags '-L/usr/libhf' --pythondir=/usr/libhf/python${pyver}/dist-packages --pythonarchdir=/usr/libhf/python${pyver}/dist-packages build --enable-pylib=ext
337   tags:
339 gentoo-basic:
340   <<: *job_definition
341   image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
342   script:
343     - python ./waf configure --disable-doc --disable-manpage build
344     - DESTDIR=build/prison python ./waf install
345     - DESTDIR=./prison python ./waf install
346     - DESTDIR=../prison python ./waf install
347     - python ./waf install
348     - python ./waf uninstall
349     - rm -rvf build/prison ./prison ../prison
351 gentoo-refclocks:
352   <<: *job_definition
353   image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
354   script:
355     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
357 coverity-scan:
358   image: $CI_REGISTRY/ntpsec/ntpsec/coverity
359   script:
360     - curl -o /tmp/cov-analysis-linux64.tgz --form project=ntpsec --form token="${COVERITY_TOKEN}" https://scan.coverity.com/download/linux64
361     - tar zxf /tmp/cov-analysis-linux64.tgz
362     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all
363     - cov-analysis-linux64-*/bin/cov-build --dir cov-int python3 ./waf build
364     - tar czf ntpsec_coverity.tgz cov-int
365     - curl --form token="${COVERITY_TOKEN}" --form email=security@ntpsec.org --form file=@ntpsec_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=ntpsec
366   tags:
367     - gitlab-org
368   rules:
369     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
371 macos-basic:
372   <<: *job_definition
373   image: macos-12-xcode-14
374   script:
375     - PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
376     - DESTDIR=build/prison python ./waf install
377     - DESTDIR=./prison python ./waf install
378     - DESTDIR=../prison python ./waf install
379     - sudo python ./waf install
380     - sudo python ./waf uninstall
381     - rm -rvf build/prison ./prison ../prison
382   tags:
383     - saas-macos-medium-m1
384   rules:
385     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
387 macos-refclocks:
388   <<: *job_definition
389   image: macos-12-xcode-14
390   script:
391     - PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build || cat build/config.log
392   tags:
393     - saas-macos-medium-m1
394   rules:
395     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
397 feature-attic:
398   <<: *job_definition
399   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
400   script:
401     - python3 ./waf configure --disable-doc --disable-manpage --enable-attic build
403 feature-classic-mode:
404   <<: *job_definition
405   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
406   script:
407     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-classic-mode build
409 feature-seccomp:
410   <<: *job_definition
411   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-seccomp
412   script:
413     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-seccomp build
415 feature-debug:
416   <<: *job_definition
417   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
418   script:
419     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug build
421 feature-disable-debug-gdb:
422   <<: *job_definition
423   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
424   script:
425     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-debug-gdb build
427 feature-debug-timing:
428   <<: *job_definition
429   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
430   script:
431     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-timing build
433 feature-disable-droproot:
434   <<: *job_definition
435   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
436   script:
437     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-droproot build
439 feature-early-droproot:
440   <<: *job_definition
441   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
442   script:
443     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-early-droproot build
445 feature-leap-smear:
446   <<: *job_definition
447   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
448   script:
449     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-leap-smear build
451 feature-mssntp:
452   <<: *job_definition
453   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
454   script:
455     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-mssntp build