From f0ecc86add7163979e117c61b93afce22d8ecefa Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 22 Jan 2024 17:04:44 +0100 Subject: [PATCH] dnsdist: Hopefully fix building with/without XDP in CI --- .github/workflows/build-and-test-all.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/misc-dailies.yml | 2 +- tasks.py | 11 ++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index 7528f78352efe..2b97fd36f302e 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -626,7 +626,7 @@ jobs: name: dnsdist-full-${{ matrix.sanitizers }}-${{ env.normalized-branch-name }} path: /opt/dnsdist - run: inv install-clang-runtime - - run: inv install-dnsdist-test-deps 'with-xdp' + - run: inv install-dnsdist-test-deps - run: inv test-dnsdist - run: inv generate-coverage-info /opt/dnsdist/bin/dnsdist $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ea0493e72900a..3a76bef498412 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -147,7 +147,7 @@ jobs: - name: Install dependencies for dnsdist if: matrix.product == 'dnsdist' run: | - inv install-dnsdist-build-deps --skipXDP=True + inv install-dnsdist-build-deps --skipXDP - name: Autoreconf dnsdist if: matrix.product == 'dnsdist' working-directory: ./pdns/dnsdistdist/ diff --git a/.github/workflows/misc-dailies.yml b/.github/workflows/misc-dailies.yml index 90b84a94c5044..ea31204d8ee21 100644 --- a/.github/workflows/misc-dailies.yml +++ b/.github/workflows/misc-dailies.yml @@ -81,7 +81,7 @@ jobs: submodules: recursive - run: build-scripts/gh-actions-setup-inv-no-dist-upgrade - run: inv install-clang - - run: inv install-dnsdist-build-deps + - run: inv install-dnsdist-build-deps --skipXDP - run: inv install-coverity-tools dnsdist - run: inv coverity-clang-configure - run: inv ci-autoconf diff --git a/tasks.py b/tasks.py index d8f54a91b05fb..bb7c08af9f1a6 100644 --- a/tasks.py +++ b/tasks.py @@ -297,8 +297,8 @@ def install_rec_test_deps(c): # FIXME: rename this, we do way more than apt-get time.sleep(5) c.sudo('chmod 755 /var/agentx') -@task -def install_dnsdist_test_deps(c, xdp=True): # FIXME: rename this, we do way more than apt-get +@task(optional=['skipXDP']) +def install_dnsdist_test_deps(c, skipXDP=False): # FIXME: rename this, we do way more than apt-get deps = 'libluajit-5.1-2 \ libboost-all-dev \ libcap2 \ @@ -317,8 +317,9 @@ def install_dnsdist_test_deps(c, xdp=True): # FIXME: rename this, we do way more patch \ protobuf-compiler \ python3-venv snmpd prometheus' - if xdp: - deps = deps + 'libbpf1 \ + if not skipXDP: + deps = deps + '\ + libbpf1 \ libxdp1' c.sudo(f'apt-get install -y {deps}') @@ -333,7 +334,7 @@ def install_rec_build_deps(c): @task(optional=['skipXDP']) def install_dnsdist_build_deps(c, skipXDP=False): - c.sudo('apt-get install -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + dnsdist_build_deps + dnsdist_xdp_build_deps if not skipXDP else [])) + c.sudo('apt-get install -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + dnsdist_build_deps + (dnsdist_xdp_build_deps if not skipXDP else []))) @task def ci_autoconf(c):