]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
chore(dnsdist): remove autotools things from tasks.py
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 19 Mar 2026 11:27:43 +0000 (12:27 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 28 May 2026 12:02:52 +0000 (14:02 +0200)
.github/workflows/build-and-test-all.yml
.github/workflows/codeql-analysis.yml
tasks.py

index 5ff2ed38becbf2930188ab19dd7e1bf14523aa70..8bf53994a1a2817248a48635a534c9857783829e 100644 (file)
@@ -216,15 +216,12 @@ jobs:
     needs: get-runner-container-image
     strategy:
       matrix:
-        builder: [autotools, meson]
         sanitizers: [asan+ubsan, tsan]
         features: [least, full]
         architecture_suffix: ${{ contains(needs.get-runner-container-image.outputs.id, 'debian-11') && fromJson('[""]') || fromJson('["", "-arm"]') }}
         exclude:
           - sanitizers: tsan
             features: least
-          - architecture_suffix: '-arm'
-            builder: autotools
           - architecture_suffix: '-arm'
             features: least
           - architecture_suffix: '-arm'
@@ -254,7 +251,7 @@ jobs:
       - name: set up build
         uses: ./.github/actions/cache
         with:
-          cache-key-base: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-${{ matrix.builder}}${{ matrix.architecture_suffix }}-ccache
+          cache-key-base: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-meson${{ matrix.architecture_suffix }}-ccache
       - name: install pip build dependencies
         uses: ./.github/actions/pip-build-dependencies
         with:
@@ -271,24 +268,15 @@ jobs:
       - run: ${{ env.INV_CMD }} ci-build-and-install-quiche ${REPO_HOME}
         if: ${{ matrix.features != 'least' }}
         working-directory: ./pdns/dnsdistdist/
-      - run: ${{ env.INV_CMD }} ci-autoconf
-        if: ${{ matrix.builder == 'autotools' }}
-        working-directory: ./pdns/dnsdistdist/
-      - run: ${{ env.INV_CMD }} ci-dnsdist-configure ${{ matrix.features }} ${{ matrix.builder }} dnsdist-${{ env.BUILDER_VERSION }}
+      - run: ${{ env.INV_CMD }} ci-dnsdist-configure ${{ matrix.features }} dnsdist-${{ env.BUILDER_VERSION }}
         working-directory: ./pdns/dnsdistdist/
-        if: ${{ matrix.builder != 'autotools' }}
-      - run: |
-          mkdir dnsdist-${{ env.BUILDER_VERSION }}
-        if: ${{ matrix.builder == 'autotools' }}
+      - run: ${{ env.INV_CMD }} ci-dnsdist-run-ninja dnsdist-${{ env.BUILDER_VERSION }}
         working-directory: ./pdns/dnsdistdist/
-      - run: ${{ env.INV_CMD }} ci-dnsdist-configure ${{ matrix.features }} ${{ matrix.builder }} dnsdist-${{ env.BUILDER_VERSION }}
-        if: ${{ matrix.builder == 'autotools' }}
-      - run: ${{ env.INV_CMD }} ci-dnsdist-make-bear ${{ matrix.builder }}
-      - run: ${{ env.INV_CMD }} ci-dnsdist-run-unit-tests ${{ matrix.builder }}
+      - run: ${{ env.INV_CMD }} ci-dnsdist-run-unit-tests
       - run: ${{ env.INV_CMD }} generate-coverage-info ./testrunner 'dnsdist' $GITHUB_WORKSPACE
-        if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' && matrix.builder == 'meson'}}
+        if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }}
       - name: Coveralls Parallel dnsdist unit
-        if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' && matrix.builder == 'meson' }}
+        if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }}
         uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e
         with:
           flag-name: dnsdist-unit-${{ matrix.features }}-${{ matrix.sanitizers }}
@@ -296,20 +284,17 @@ jobs:
           parallel: true
           allow-empty: true
           fail-on-error: false
-      - run: ${{ env.INV_CMD }} ci-dnsdist-install ${{ matrix.builder == 'meson' && '--meson' || '' }}
+      - run: ${{ env.INV_CMD }} ci-dnsdist-install
       - run: ccache -s
       - uses: ./.github/actions/normalize-branch-name
-        if: ${{ matrix.builder == 'meson' }}
       - name: Prepare binaries folder
-        if: ${{ matrix.builder == 'meson' }}
         run: |
           mkdir -p /opt/dnsdist/bin
           for i in $(find . -maxdepth 1 -type f -executable); do cp ${i} /opt/dnsdist/bin/; done
       - name: Store the binaries
-        if: ${{ matrix.builder == 'meson' }}
         uses: actions/upload-artifact@v7 # this takes 30 seconds, maybe we want to tar
         with:
-          name: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-${{ matrix.builder}}${{ matrix.architecture_suffix }}-${{ env.normalized-branch-name }}
+          name: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-meson${{ matrix.architecture_suffix }}-${{ env.normalized-branch-name }}
           path: /opt/dnsdist
           retention-days: 1
 
index bbc96c84370116aac72f2233370aed8d6e9eeb8f..d985cd3a52fd5a0305c27f8115eef39bbad45296 100644 (file)
@@ -156,11 +156,6 @@ jobs:
     - name: Install python yaml
       run: |
         pip install pyyaml
-    - name: Autoreconf dnsdist
-      if: matrix.product == 'dnsdist'
-      working-directory: ./pdns/dnsdistdist/
-      run: |
-        inv ci-autoconf
     - run: inv ci-install-rust $REPO_HOME
       if: matrix.product == 'dnsdist'
       working-directory: ./pdns/dnsdistdist/
@@ -171,12 +166,12 @@ jobs:
       if: matrix.product == 'dnsdist'
       working-directory: ./pdns/dnsdistdist/
       run: |
-        inv ci-dnsdist-configure full autotools ''
+        inv ci-dnsdist-configure full build
     - name: Build dnsdist
       if: matrix.product == 'dnsdist'
       working-directory: ./pdns/dnsdistdist/
       run: |
-        inv ci-dnsdist-make-bear autotools
+        inv ci-dnsdist-run-ninja build
     - run: ln -s ../../.clang-tidy.full .clang-tidy
       if: matrix.product == 'dnsdist'
       working-directory: ./pdns/dnsdistdist/
index ebdb3773325bf33cdc61d62c4f9bebc37b0f739b..23ac3dd8f2cc0a4428050533fa61000cd690d645 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -1022,7 +1022,7 @@ DNSDIST_CONFIGURE_CXXFLAGS_LEAST = " ".join(
 
 
 @task
-def ci_dnsdist_configure(c, features, builder, build_dir):
+def ci_dnsdist_configure(c, features, build_dir):
     additional_flags = ""
     additional_ld_flags = ""
     if is_compiler_clang():
@@ -1031,12 +1031,8 @@ def ci_dnsdist_configure(c, features, builder, build_dir):
     if features == "least":
         additional_flags = DNSDIST_CONFIGURE_CXXFLAGS_LEAST
 
-    if builder == "meson":
-        cmd = ci_dnsdist_configure_meson(c, features, additional_flags, additional_ld_flags, build_dir)
-        logfile = "meson-logs/meson-log.txt"
-    else:
-        cmd = ci_dnsdist_configure_autotools(features, additional_flags, additional_ld_flags, build_dir)
-        logfile = "config.log"
+    cmd = ci_dnsdist_configure_meson(c, features, additional_flags, additional_ld_flags, build_dir)
+    logfile = "meson-logs/meson-log.txt"
 
     res = c.run(cmd, warn=True)
     if res.exited != 0:
@@ -1044,64 +1040,6 @@ def ci_dnsdist_configure(c, features, builder, build_dir):
         raise UnexpectedExit(res)
 
 
-def ci_dnsdist_configure_autotools(features, additional_flags, additional_ld_flags, build_dir):
-    if features == "full":
-        features_set = "--enable-dnstap \
-                      --enable-dnscrypt \
-                      --enable-dns-over-tls \
-                      --enable-dns-over-https \
-                      --enable-dns-over-quic \
-                      --enable-dns-over-http3 \
-                      --enable-ipcrypt2 \
-                      --enable-systemd \
-                      --enable-yaml \
-                      --prefix=/opt/dnsdist \
-                      --with-gnutls \
-                      --with-libsodium \
-                      --with-lua=luajit \
-                      --with-libcap \
-                      --with-net-snmp \
-                      --with-nghttp2 \
-                      --with-re2"
-    else:
-        features_set = "--disable-dnstap \
-                      --disable-dnscrypt \
-                      --disable-ipcipher \
-                      --disable-ipcrypt2 \
-                      --disable-systemd \
-                      --without-cdb \
-                      --without-ebpf \
-                      --without-gnutls \
-                      --without-libedit \
-                      --without-libsodium \
-                      --without-lmdb \
-                      --without-net-snmp \
-                      --without-nghttp2 \
-                      --without-re2"
-    unittests = get_unit_tests()
-    fuzztargets = get_fuzzing_targets()
-    tools = f"""AR=llvm-ar-{clang_version} RANLIB=llvm-ranlib-{clang_version}""" if is_compiler_clang() else ""
-    out_of_tree_build = build_dir != ""
-    return " ".join(
-        [
-            tools,
-            get_base_configure_cmd(
-                additional_c_flags="",
-                additional_cxx_flags=additional_flags,
-                additional_ld_flags=additional_ld_flags,
-                enable_systemd=False,
-                enable_sodium=False,
-                out_of_tree_build=out_of_tree_build,
-            ),
-            features_set,
-            unittests,
-            fuzztargets,
-            "--enable-lto=thin",
-            "--prefix=/opt/dnsdist",
-        ]
-    )
-
-
 DNSDIST_CONFIGURE_MESON_FEATURE_SET_FULL = " ".join(
     [
         "-D cdb=enabled",
@@ -1308,22 +1246,8 @@ def ci_rec_build(c, meson=False):
 
 
 @task
-def ci_dnsdist_make(c):
-    c.run(f"make -j{get_build_concurrency(4)} -k V=1")
-
-
-def ci_dnsdist_run_ninja(c):
-    c.run(f". {repo_home}/.venv/bin/activate && ninja -j{get_build_concurrency(4)} --verbose")
-
-
-@task
-def ci_dnsdist_make_bear(c, builder):
-    if builder == "meson":
-        ci_dnsdist_run_ninja(c)
-        return
-
-    # Assumed to be running under ./pdns/dnsdistdist/
-    c.run(f"bear --append -- make -j{get_build_concurrency(4)} -k V=1")
+def ci_dnsdist_run_ninja(c, build_dir):
+    c.run(f". {repo_home}/.venv/bin/activate && meson compile -C {build_dir} -j{get_build_concurrency(4)} --verbose")
 
 
 @task
@@ -1364,14 +1288,11 @@ def ci_rec_run_unit_tests(c, meson=False):
 
 
 @task
-def ci_dnsdist_run_unit_tests(c, builder):
-    if builder == "meson":
-        suite_timeout_sec = 120
-        logfile = "meson-logs/testlog.txt"
-        res = c.run(f". {repo_home}/.venv/bin/activate && meson test --verbose -t {suite_timeout_sec}", warn=True)
-    else:
-        logfile = "test-suite.log"
-        res = c.run("make check", warn=True)
+def ci_dnsdist_run_unit_tests(c):
+    suite_timeout_sec = 120
+    logfile = "meson-logs/testlog.txt"
+    res = c.run(f". {repo_home}/.venv/bin/activate && meson test --verbose -t {suite_timeout_sec}", warn=True)
+
     if res.exited != 0:
         c.run(f"cat {logfile}", warn=True)
         raise UnexpectedExit(res)
@@ -1398,11 +1319,8 @@ def ci_rec_install(c, meson=False):
 
 
 @task
-def ci_dnsdist_install(c, meson=False):
-    if meson:
-        c.sudo(f"bash -c 'source {repo_home}/.venv/bin/activate && meson install'")
-    else:
-        c.run("make install")
+def ci_dnsdist_install(c):
+    c.sudo(f"bash -c 'source {repo_home}/.venv/bin/activate && meson install'")
 
 
 @task