from invoke import task
from invoke.exceptions import Failure, UnexpectedExit
+import json
import os
import sys
import time
auth_backend_ip_addr = os.getenv('AUTH_BACKEND_IP_ADDR', '127.0.0.1')
clang_version = os.getenv('CLANG_VERSION', '13')
-quiche_version = '0.20.1'
-quiche_hash = '9c460d8ecf6c80c06bf9b42f91201ef33f912e2615a871ff2d0e50197b901c71'
all_build_deps = [
'ccache',
@task
def ci_install_rust(c, repo):
- c.sudo(f'{repo}/builder-support/helpers/install_rust.sh')
+ with c.cd(f'{repo}/builder-support/helpers/'):
+ c.run('sudo sh install_rust.sh')
def install_libdecaf(c, product):
c.run('git clone https://git.code.sf.net/p/ed448goldilocks/code /tmp/libdecaf')
@task
-def ci_rec_configure(c):
+def ci_rec_configure(c, features):
unittests = get_unit_tests()
- configure_cmd = " ".join([
- get_base_configure_cmd(),
- "--enable-nod",
- "--prefix=/opt/pdns-recursor",
- "--with-lua=luajit",
- "--with-libcap",
- "--with-net-snmp",
- "--enable-dns-over-tls",
- "--enable-verbose-logging",
- unittests,
- ])
+ if features == 'full':
+ configure_cmd = " ".join([
+ get_base_configure_cmd(),
+ "--prefix=/opt/pdns-recursor",
+ "--enable-option-checking",
+ "--enable-verbose-logging",
+ "--enable-dns-over-tls",
+ "--enable-nod",
+ "--with-libcap",
+ "--with-lua=luajit",
+ "--with-net-snmp",
+ unittests,
+ ])
+ else:
+ configure_cmd = " ".join([
+ get_base_configure_cmd(),
+ "--prefix=/opt/pdns-recursor",
+ "--enable-option-checking",
+ "--enable-verbose-logging",
+ "--disable-dns-over-tls",
+ "--disable-dnstap",
+ "--disable-nod",
+ "--disable-systemd",
+ "--with-lua=luajit",
+ "--without-libcap",
+ "--without-libcurl",
+ "--without-libdecaf",
+ "--without-libsodium",
+ "--without-net-snmp",
+ unittests,
+ ])
res = c.run(configure_cmd, warn=True)
if res.exited != 0:
c.run('cat config.log')
https://scan.coverity.com/builds?project={project}', hide=True)
@task
-def ci_build_and_install_quiche(c):
+def ci_build_and_install_quiche(c, repo):
+ with open(f'{repo}/builder-support/helpers/quiche.json') as quiche_json:
+ quiche_data = json.load(quiche_json)
+ quiche_version = quiche_data['version']
+ quiche_hash = quiche_data['SHA256SUM']
+
# we have to pass -L because GitHub will do a redirect, sadly
c.run(f'curl -L -o quiche-{quiche_version}.tar.gz https://github.com/cloudflare/quiche/archive/{quiche_version}.tar.gz')
# Line below should echo two spaces between digest and name