3 image: $CI_REGISTRY/ntpsec/ntpsec/alpine-pages
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 {} \;
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
28 - if: '$CI_PIPELINE_SOURCE != "schedule"'
32 .job_template_allow_failure: &job_definition_allow_failure
38 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
40 - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
41 - python3 ./waf install
42 - python3 ./waf uninstall
46 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
48 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
51 <<: *job_definition_allow_failure
52 image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge
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
62 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
65 <<: *job_definition_allow_failure
68 - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel wget libxslt docbook-style-xsl
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
79 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
81 - apk update && apk add python3-dev asciidoc
82 - python3 ./waf configure --enable-doc --enable-manpage build
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:
93 image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
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:
101 image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
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:
109 image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
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:
117 image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
119 - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
123 image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
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:
131 image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
133 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
135 debian-testing-basic:
137 image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
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:
145 image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
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
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
161 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
165 image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
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:
173 image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
175 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
178 <<: *job_definition_allow_failure
179 image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel
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
189 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
191 ubuntu-rolling-basic:
193 image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
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:
201 image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
203 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
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
216 - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
221 - python ./waf configure --disable-doc --disable-manpage --refclock=all build
225 - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
229 image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
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:
237 image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
239 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
243 image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
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:
251 image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
253 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
256 <<: *job_definition_allow_failure
257 image: $CI_REGISTRY/ntpsec/ntpsec/python3
259 - python ./waf configure --disable-doc --disable-manpage --refclock=all build
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
271 image: $CI_REGISTRY/ntpsec/ntpsec/clang
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
279 image: $CI_REGISTRY/ntpsec/ntpsec/clang
281 - python3 ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang --refclock=all build
285 image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
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:
293 image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
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
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
307 # - python ./waf configure --disable-doc --disable-manpage --refclock=all build
309 debian-stable-mDNS-basic:
311 image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
313 - python3 ./waf configure --disable-doc --disable-manpage build
315 debian-stable-mDNS-refclocks:
317 image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
319 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
322 <<: *job_definition_allow_failure
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
328 - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
331 <<: *job_definition_allow_failure
332 image: $CI_REGISTRY/ntpsec/ntpsec/cross-armhf
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
341 image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
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
353 image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
355 - python ./waf configure --disable-doc --disable-manpage --refclock=all build
358 image: $CI_REGISTRY/ntpsec/ntpsec/coverity
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
369 - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
373 image: macos-12-xcode-14
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
383 - saas-macos-medium-m1
385 - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
389 image: macos-12-xcode-14
391 - PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build || cat build/config.log
393 - saas-macos-medium-m1
395 - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
399 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
401 - python3 ./waf configure --disable-doc --disable-manpage --enable-attic build
403 feature-classic-mode:
405 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
407 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-classic-mode build
411 image: $CI_REGISTRY/ntpsec/ntpsec/alpine-seccomp
413 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-seccomp build
417 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
419 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug build
421 feature-disable-debug-gdb:
423 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
425 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-debug-gdb build
427 feature-debug-timing:
429 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
431 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-timing build
433 feature-disable-droproot:
435 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
437 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-droproot build
439 feature-early-droproot:
441 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
443 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-early-droproot build
447 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
449 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-leap-smear build
453 image: $CI_REGISTRY/ntpsec/ntpsec/alpine
455 - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-mssntp build