From: Fred Morcos Date: Fri, 8 Apr 2022 09:15:28 +0000 (+0200) Subject: auth: Build and test with libdecaf included in Github Actions X-Git-Tag: auth-4.8.0-alpha0~139^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11518%2Fhead;p=thirdparty%2Fpdns.git auth: Build and test with libdecaf included in Github Actions Co-authored-by: Peter van Dijk --- diff --git a/tasks.py b/tasks.py index 49dccd727f..d3ebe20b25 100644 --- a/tasks.py +++ b/tasks.py @@ -132,9 +132,25 @@ def install_clang_runtime(c): # this gives us the symbolizer, for symbols in asan/ubsan traces c.sudo('apt-get -qq -y --no-install-recommends install clang-12') +def install_libdecaf(c, product): + c.run('git clone https://git.code.sf.net/p/ed448goldilocks/code /tmp/libdecaf') + with c.cd('/tmp/libdecaf'): + c.run('git checkout 41f349') + c.run('cmake -B build ' + '-DCMAKE_INSTALL_PREFIX=/usr/local ' + '-DCMAKE_INSTALL_LIBDIR=lib ' + '-DENABLE_STATIC=OFF ' + '-DENABLE_TESTS=OFF ' + '-DCMAKE_C_FLAGS="-Wno-sizeof-array-div -Wno-array-parameter" .') + c.run('make -C build') + c.run('sudo make -C build install') + c.sudo(f'mkdir -p /opt/{product}/libdecaf') + c.sudo(f'cp /usr/local/lib/libdecaf.so* /opt/{product}/libdecaf/.') + @task def install_auth_build_deps(c): c.sudo('apt-get install -qq -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + auth_build_deps)) + install_libdecaf(c, 'pdns-auth') def setup_authbind(c): c.sudo('touch /etc/authbind/byport/53') @@ -171,6 +187,10 @@ def install_auth_test_deps(c, backend): # FIXME: rename this, we do way more tha # FIXME we may want to start a background recursor here to make ALIAS tests more robust setup_authbind(c) + # Copy libdecaf out + c.sudo('mkdir -p /usr/local/lib') + c.sudo('cp /opt/pdns-auth/libdecaf/libdecaf.so* /usr/local/lib/.') + @task def install_rec_bulk_deps(c): # FIXME: rename this, we do way more than apt-get c.sudo('apt-get --no-install-recommends -qq -y install ' + ' '.join(rec_bulk_deps)) @@ -238,6 +258,8 @@ def ci_auth_configure(c): ./configure \ CC='clang-12' \ CXX='clang++-12' \ + CPPFLAGS='-I/usr/local/include/decaf' \ + LDFLAGS='-L/usr/local/lib -Wl,-rpath,/usr/local/lib' \ --enable-option-checking=fatal \ --with-modules='bind geoip gmysql godbc gpgsql gsqlite3 ldap lmdb lua2 pipe remote tinydns' \ --enable-systemd \ @@ -249,6 +271,7 @@ def ci_auth_configure(c): --enable-remotebackend-zeromq \ --with-lmdb=/usr \ --with-libsodium \ + --with-libdecaf \ --prefix=/opt/pdns-auth \ --enable-ixfrdist \ --enable-asan \