option-tester: Add many changes
[ntpsec.git] / .gitlab-ci.yml
blob4e4f09f58061893e94b8a01941658f4df6c851e8
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   artifacts:
13     paths:
14        - public
15   tags:
16     - gitlab-org
18 include:
19   - template: Code-Quality.gitlab-ci.yml
20   - template: SAST.gitlab-ci.yml
21   - local: '.gitlab-opttest-ci.yml'
22   - local: '.gitlab-docker-ci.yml'
24 .job_template: &job_definition
25   stage: build
26   rules:
27     - if: '$CI_PIPELINE_SOURCE != "schedule"'
28   tags:
29     - gitlab-org
31 alpine-basic:
32   <<: *job_definition
33   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
34   script:
35     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
36     - python3 ./waf install
37     - python3 ./waf uninstall
39 alpine-refclocks:
40   <<: *job_definition
41   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
42   script:
43     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
45 alpine-edge-basic:
46   allow_failure: true
47   <<: *job_definition
48   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge
49   script:
50     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
51     - python3 ./waf install
52     - python3 ./waf uninstall
54 alpine-edge-refclocks:
55   allow_failure: true
56   <<: *job_definition
57   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge
58   script:
59     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
61 AsciiDoc-3-Fedora:
62   <<: *job_definition
63   image: fedora
64   script:
65     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel wget libxslt docbook-style-xsl
66     - mkdir asciidoc3
67     - wget https://asciidoc3.org/asciidoc3-3.2.3.tar.gz
68     - tar -xpvf asciidoc3-3.2.3.tar.gz -C asciidoc3
69     - ln -sv a2x3.py asciidoc3/a2x3
70     - ln -sv asciidoc3.py asciidoc3/asciidoc3
71     - asciidoc3/asciidoc3 --version || echo -n
72     - PATH="$PWD/asciidoc3:$PATH" python3 ./waf configure --enable-doc --enable-manpage build
74 AsciiDoc-py3-Alpine:
75   <<: *job_definition
76   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
77   script:
78     - apk update && apk add python3-dev asciidoc
79     - python3 ./waf configure --enable-doc --enable-manpage build
81 AsciiDoc-no:
82   <<: *job_definition
83   image: alpine
84   script:
85     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev pythonispython3
86     - python ./waf configure --disable-doc --disable-manpage build
88 AsciiDoc-classic3-Debian-Old:
89   <<: *job_definition
90   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
91   script:
92     - apt-get update
93     - DEBIAN_FRONTEND="noninteractive" apt-get install -y python3-dev asciidoc-base
94     - python3 ./waf configure --enable-doc --enable-manpage build --disable-nts
96 AsciiDoc-classic2-Debian-Old:
97   <<: *job_definition
98   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
99   script:
100     - apt-get update
101     - DEBIAN_FRONTEND="noninteractive" apt-get install -y python2-dev asciidoc-base
102     - python2 ./waf configure --enable-doc --enable-manpage build --disable-nts
104 debian-oldstable-basic:
105   <<: *job_definition
106   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
107   script:
108     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build --pyshebang "/usr/bin/env python3"
109     - python3 ./waf install
110     - python3 ./waf uninstall
112 debian-oldstable-refclocks:
113   <<: *job_definition
114   image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
115   script:
116     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
118 debian-stable-basic:
119   <<: *job_definition
120   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
121   script:
122     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
123     - python3 ./waf install
124     - python3 ./waf uninstall
126 debian-stable-refclocks:
127   <<: *job_definition
128   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
129   script:
130     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
132 debian-testing-basic:
133   <<: *job_definition
134   image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
135   script:
136     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
137     - python3 ./waf install
138     - python3 ./waf uninstall
140 debian-testing-refclocks:
141   <<: *job_definition
142   image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
143   script:
144     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
146 debian-unstable-basic:
147   allow_failure: true
148   <<: *job_definition
149   image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable
150   script:
151     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
152     - python3 ./waf install
153     - python3 ./waf uninstall
155 debian-unstable-refclocks:
156   allow_failure: true
157   <<: *job_definition
158   image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable
159   script:
160     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
162 ubuntu-latest-basic:
163   <<: *job_definition
164   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
165   script:
166     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
167     - python3 ./waf install
168     - python3 ./waf uninstall
170 ubuntu-latest-refclocks:
171   <<: *job_definition
172   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
173   script:
174     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
176 ubuntu-devel-basic:
177   <<: *job_definition
178   allow_failure: true
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
187   allow_failure: true
188   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel
189   script:
190     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
192 ubuntu-rolling-basic:
193   <<: *job_definition
194   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
195   script:
196     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
197     - python3 ./waf install
198     - python3 ./waf uninstall
200 ubuntu-rolling-refclocks:
201   <<: *job_definition
202   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
203   script:
204     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
206 freebsd-basic:
207   <<: *job_definition
208   script:
209     - python ./waf configure --disable-doc --disable-manpage build
210     - DESTDIR=build/prison python ./waf install
211     - DESTDIR=./prison python ./waf install
212     - DESTDIR=../prison python ./waf install
213     - rm -rvf build/prison ./prison ../prison
214   tags:
215     - freebsd
216   rules:
217     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
219 freebsd-refclocks:
220   <<: *job_definition
221   script:
222     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
223   tags:
224     - freebsd
225   rules:
226     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
228 centos-latest-basic:
229   <<: *job_definition
230   image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
231   script:
232     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
233     - python3 ./waf install
234     - python3 ./waf uninstall
236 centos-latest-refclocks:
237   <<: *job_definition
238   image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
239   script:
240     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
242 fedora-latest-basic:
243   <<: *job_definition
244   image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
245   script:
246     - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
247     - python3 ./waf install
248     - python3 ./waf uninstall
250 fedora-latest-refclocks:
251   <<: *job_definition
252   image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
253   script:
254     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
256 python3:
257   <<: *job_definition
258   image: $CI_REGISTRY/ntpsec/ntpsec/python3
259   script:
260     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
262 python-coverage:
263   <<: *job_definition
264   script:
265     - apt-get update -qq && apt-get install -y -qq netbase bison python-dev-is-python3 python3-coverage
266     - python ./waf configure --disable-doc --disable-manpage build
267     - for i in build/main/tests/pylib/test_*; do python3-coverage run -a --source build/main/pylib "$i"; done
268     - python3-coverage report
270 clang-basic:
271   <<: *job_definition
272   image: $CI_REGISTRY/ntpsec/ntpsec/clang
273   script:
274     - python3 ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang build --pyshebang "/usr/bin/env python3"
275     - python3 ./waf install
276     - python3 ./waf uninstall
278 clang-refclocks:
279   <<: *job_definition
280   image: $CI_REGISTRY/ntpsec/ntpsec/clang
281   script:
282     - python3 ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang --refclock=all build
284 openSUSE-leap-basic:
285   <<: *job_definition
286   image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
287   script:
288     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build  --pyshebang "/usr/bin/env python3"
289     - python3 ./waf install
290     - python3 ./waf uninstall
292 openSUSE-leap-refclocks:
293   <<: *job_definition
294   image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
295   script:
296     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
298 # debian-stable-basic-32bit:
299 #   <<: *job_definition
300 #   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-i386
301 #   script:
302 #     - python ./waf configure --disable-doc --disable-manpage build
304 # debian-stable-refclocks-32bit:
305 #   <<: *job_definition
306 #   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-i386
307 #   script:
308 #     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
310 debian-stable-mDNS-basic:
311   <<: *job_definition
312   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
313   script:
314     - python3 ./waf configure --disable-doc --disable-manpage build
316 debian-stable-mDNS-refclocks:
317   <<: *job_definition
318   image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
319   script:
320     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
322 cross-armhf-build:
323   allow_failure: true
324   <<: *job_definition
325   image: $CI_REGISTRY/ntpsec/ntpsec/cross-armhf
326   script:
327     - pyver=$(python3 -c 'import sys;print(f"{sys.version_info.major}.{sys.version_info.minor}")')
328     - 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
329     - 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
330   tags:
332 gentoo-basic:
333   <<: *job_definition
334   image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
335   script:
336     - python ./waf configure --disable-doc --disable-manpage build
337     - DESTDIR=build/prison python ./waf install
338     - DESTDIR=./prison python ./waf install
339     - DESTDIR=../prison python ./waf install
340     - python ./waf install
341     - python ./waf uninstall
342     - rm -rvf build/prison ./prison ../prison
344 gentoo-refclocks:
345   <<: *job_definition
346   image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
347   script:
348     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
350 coverity-scan:
351   image: $CI_REGISTRY/ntpsec/ntpsec/coverity
352   script:
353     - curl -o /tmp/cov-analysis-linux64.tgz --form project=ntpsec --form token="${COVERITY_TOKEN}" https://scan.coverity.com/download/linux64
354     - tar zxf /tmp/cov-analysis-linux64.tgz
355     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all
356     - cov-analysis-linux64-*/bin/cov-build --dir cov-int python3 ./waf build
357     - tar czf ntpsec_coverity.tgz cov-int
358     - 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
359   tags:
360     - gitlab-org
361   rules:
362     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
364 macos-basic:
365   <<: *job_definition
366   script:
367     - PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
368     - DESTDIR=build/prison python ./waf install
369     - DESTDIR=./prison python ./waf install
370     - DESTDIR=../prison python ./waf install
371     - sudo python ./waf install
372     - sudo python ./waf uninstall
373     - rm -rvf build/prison ./prison ../prison
374   tags:
375     - saas-macos-medium-m1
376   rules:
377     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
379 macos-refclocks:
380   <<: *job_definition
381   script:
382     - PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build || cat build/config.log
383   tags:
384     - saas-macos-medium-m1
385   rules:
386     - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
388 feature-attic:
389   <<: *job_definition
390   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
391   script:
392     - python3 ./waf configure --disable-doc --disable-manpage --enable-attic build
394 feature-classic-mode:
395   <<: *job_definition
396   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
397   script:
398     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-classic-mode build
400 feature-seccomp:
401   <<: *job_definition
402   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-seccomp
403   script:
404     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-seccomp build
406 feature-debug:
407   <<: *job_definition
408   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
409   script:
410     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug build
412 feature-disable-debug-gdb:
413   <<: *job_definition
414   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
415   script:
416     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-debug-gdb build
418 feature-debug-timing:
419   <<: *job_definition
420   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
421   script:
422     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-timing build
424 feature-disable-droproot:
425   <<: *job_definition
426   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
427   script:
428     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-droproot build
430 feature-early-droproot:
431   <<: *job_definition
432   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
433   script:
434     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-early-droproot build
436 feature-leap-smear:
437   <<: *job_definition
438   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
439   script:
440     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-leap-smear build
442 feature-mssntp:
443   <<: *job_definition
444   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
445   script:
446     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-mssntp build