From: romeroalx Date: Wed, 29 Jan 2025 12:47:20 +0000 (+0100) Subject: build-and-test-all.yml: use venv for executing tasks X-Git-Tag: dnsdist-2.0.0-alpha1~107^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79fd9fe49d1531c2a0667651d54781a210f95ce8;p=thirdparty%2Fpdns.git build-and-test-all.yml: use venv for executing tasks --- diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index a54902792f..5fb0b63e17 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -31,6 +31,7 @@ env: COVERAGE: ${{ github.repository == 'PowerDNS/pdns' && 'yes' || 'no' }} LLVM_PROFILE_FILE: "/tmp/code-%p.profraw" OPTIMIZATIONS: yes + INV_CMD: ". ${REPO_HOME}/.venv/bin/activate && inv" jobs: get-runner-container-image: @@ -90,20 +91,25 @@ jobs: - name: set sanitizers run: echo "SANITIZERS=${{ matrix.builder == 'meson' && 'address,undefined' || 'asan+ubsan' }}" >> "$GITHUB_ENV" working-directory: . - - run: inv install-auth-build-deps + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + working-directory: . + - run: ${{ env.INV_CMD }} install-auth-build-deps working-directory: . - - run: inv ci-autoconf ${{ matrix.builder == 'meson' && '--meson' || '' }} + - run: ${{ env.INV_CMD }} ci-autoconf ${{ matrix.builder == 'meson' && '--meson' || '' }} working-directory: . - - run: inv ci-auth-configure ${{ matrix.builder == 'meson' && '--meson' || '' }} -b pdns-${{ env.BUILDER_VERSION }} + - run: ${{ env.INV_CMD }} ci-auth-configure ${{ matrix.builder == 'meson' && '--meson' || '' }} -b pdns-${{ env.BUILDER_VERSION }} working-directory: . - - run: inv ci-auth-build ${{ matrix.builder == 'meson' && '--meson' || '' }} # This runs under pdns-$BUILDER_VERSION/pdns/ for make bear - - run: inv ci-auth-install-remotebackend-test-deps + - run: ${{ env.INV_CMD }} ci-auth-build ${{ matrix.builder == 'meson' && '--meson' || '' }} # This runs under pdns-$BUILDER_VERSION/pdns/ for make bear + - run: ${{ env.INV_CMD }} ci-auth-install-remotebackend-test-deps - if: ${{ matrix.builder == 'meson' }} - run: inv install-auth-test-deps-only -b geoip - - run: inv ci-auth-run-unit-tests ${{ matrix.builder == 'meson' && '--meson' || '' }} + run: ${{ env.INV_CMD }} install-auth-test-deps-only -b geoip + - run: ${{ env.INV_CMD }} ci-auth-run-unit-tests ${{ matrix.builder == 'meson' && '--meson' || '' }} env: PDNS_BUILD_PATH: ../pdns-${{ env.BUILDER_VERSION }} - - run: inv generate-coverage-info ./testrunner $GITHUB_WORKSPACE + - run: ${{ env.INV_CMD }} generate-coverage-info ./testrunner $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.builder != 'meson' }} working-directory: ./pdns-${{ env.BUILDER_VERSION }}/pdns - name: Coveralls Parallel auth unit @@ -115,7 +121,7 @@ jobs: parallel: true allow-empty: true fail-on-error: false - - run: inv ci-auth-install ${{ matrix.builder == 'meson' && '--meson' || '' }} + - run: ${{ env.INV_CMD }} ci-auth-install ${{ matrix.builder == 'meson' && '--meson' || '' }} - run: ccache -s - if: ${{ matrix.builder != 'meson' }} run: echo "normalized-branch-name=${{ inputs.branch-name || github.ref_name }}" | tr "/" "-" >> "$GITHUB_ENV" @@ -172,17 +178,22 @@ jobs: path: ~/.ccache key: recursor-ccache-${{ matrix.builder }}-${{ matrix.features }}-${{ matrix.sanitizers }}-${{ steps.get-stamp.outputs.stamp }} restore-keys: recursor-ccache-${{ matrix.builder }}-${{ matrix.features }}-${{ matrix.sanitizers }} - - run: inv install-rec-build-deps ${{ matrix.builder == 'meson' && '--meson' || '' }} + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + working-directory: . + - run: ${{ env.INV_CMD }} install-rec-build-deps working-directory: ./pdns/recursordist/ - - run: inv ci-install-rust ${{ env.REPO_HOME }} + - run: ${{ env.INV_CMD }} ci-install-rust ${{ env.REPO_HOME }} working-directory: ./pdns/recursordist/ - - run: inv ci-autoconf ${{ matrix.builder == 'meson' && '--meson' || '' }} + - run: ${{ env.INV_CMD }} ci-autoconf ${{ matrix.builder == 'meson' && '--meson' || '' }} working-directory: ./pdns/recursordist/ - - run: inv ci-rec-configure -f ${{ matrix.features }} -b pdns-recursor-${{ env.BUILDER_VERSION }} ${{ matrix.builder == 'meson' && '--meson' || '' }} + - run: ${{ env.INV_CMD }} ci-rec-configure -f ${{ matrix.features }} -b pdns-recursor-${{ env.BUILDER_VERSION }} ${{ matrix.builder == 'meson' && '--meson' || '' }} working-directory: ./pdns/recursordist/ - - run: inv ci-rec-build ${{ matrix.builder == 'meson' && '--meson' || '' }} - - run: inv ci-rec-run-unit-tests ${{ matrix.builder == 'meson' && '--meson' || '' }} - - run: inv generate-coverage-info ./testrunner $GITHUB_WORKSPACE + - run: ${{ env.INV_CMD }} ci-rec-build ${{ matrix.builder == 'meson' && '--meson' || '' }} + - run: ${{ env.INV_CMD }} ci-rec-run-unit-tests ${{ matrix.builder == 'meson' && '--meson' || '' }} + - run: ${{ env.INV_CMD }} generate-coverage-info ./testrunner $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' && matrix.builder != 'meson' }} - name: Coveralls Parallel rec unit if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' && matrix.builder != 'meson' }} @@ -193,7 +204,7 @@ jobs: parallel: true allow-empty: true fail-on-error: false - - run: inv ci-rec-install ${{ matrix.builder == 'meson' && '--meson' || '' }} + - run: ${{ env.INV_CMD }} ci-rec-install ${{ matrix.builder == 'meson' && '--meson' || '' }} - run: ccache -s - if: ${{ matrix.builder != 'meson' }} run: echo "normalized-branch-name=${{ inputs.branch-name || github.ref_name }}" | tr "/" "-" >> "$GITHUB_ENV" @@ -251,28 +262,30 @@ jobs: path: ~/.ccache key: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-${{ matrix.builder}}-ccache-${{ steps.get-stamp.outputs.stamp }} restore-keys: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-${{ matrix.builder}}-ccache- - - run: inv install-lld-linker-if-needed - working-directory: ./pdns/dnsdistdist/ - - run: inv ci-install-meson - if: ${{ matrix.builder == 'meson' }} + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + working-directory: . + - run: ${{ env.INV_CMD }} install-lld-linker-if-needed working-directory: ./pdns/dnsdistdist/ - - run: inv ci-install-rust ${{ env.REPO_HOME }} + - run: ${{ env.INV_CMD }} ci-install-rust ${{ env.REPO_HOME }} working-directory: ./pdns/dnsdistdist/ - - run: inv ci-build-and-install-quiche ${{ env.REPO_HOME }} + - run: ${{ env.INV_CMD }} ci-build-and-install-quiche ${{ env.REPO_HOME }} working-directory: ./pdns/dnsdistdist/ - - run: inv ci-autoconf + - run: ${{ env.INV_CMD }} ci-autoconf if: ${{ matrix.builder == 'autotools' }} working-directory: ./pdns/dnsdistdist/ - - run: inv ci-dnsdist-configure ${{ matrix.features }} ${{ matrix.builder }} dnsdist-${{ env.BUILDER_VERSION }} + - run: ${{ env.INV_CMD }} ci-dnsdist-configure ${{ matrix.features }} ${{ matrix.builder }} dnsdist-${{ env.BUILDER_VERSION }} working-directory: ./pdns/dnsdistdist/ - - run: inv ci-make-distdir + - run: ${{ env.INV_CMD }} ci-make-distdir if: ${{ matrix.builder == 'autotools' }} working-directory: ./pdns/dnsdistdist/ - - run: inv ci-dnsdist-configure ${{ matrix.features }} ${{ matrix.builder }} dnsdist-${{ env.BUILDER_VERSION }} + - run: ${{ env.INV_CMD }} ci-dnsdist-configure ${{ matrix.features }} ${{ matrix.builder }} dnsdist-${{ env.BUILDER_VERSION }} if: ${{ matrix.builder == 'autotools' }} - - run: inv ci-dnsdist-make-bear ${{ matrix.builder }} - - run: inv ci-dnsdist-run-unit-tests ${{ matrix.builder }} - - run: inv generate-coverage-info ./testrunner $GITHUB_WORKSPACE + - 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 }} generate-coverage-info ./testrunner $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' && matrix.builder == 'autotools'}} - name: Coveralls Parallel dnsdist unit if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' && matrix.builder == 'autotools' }} @@ -283,7 +296,7 @@ jobs: parallel: true allow-empty: true fail-on-error: false - - run: inv ci-make-install + - run: ${{ env.INV_CMD }} ci-make-install if: ${{ matrix.builder == 'autotools' }} - run: ccache -s - run: echo "normalized-branch-name=${{ inputs.branch-name || github.ref_name }}" | tr "/" "-" >> "$GITHUB_ENV" @@ -345,11 +358,15 @@ jobs: with: name: pdns-auth-${{ env.normalized-branch-name }} path: /opt/pdns-auth - - run: inv apt-fresh - - run: inv install-clang-runtime - - run: inv install-auth-test-deps -b ${{ matrix.backend }} - - run: inv test-api auth -b ${{ matrix.backend }} - - run: inv generate-coverage-info /opt/pdns-auth/sbin/pdns_server $GITHUB_WORKSPACE + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} apt-fresh + - run: ${{ env.INV_CMD }} install-clang-runtime + - run: ${{ env.INV_CMD }} install-auth-test-deps -b ${{ matrix.backend }} + - run: ${{ env.INV_CMD }} test-api auth -b ${{ matrix.backend }} + - run: ${{ env.INV_CMD }} generate-coverage-info /opt/pdns-auth/sbin/pdns_server $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' }} - name: Coveralls Parallel auth API ${{ matrix.backend }} if: ${{ env.COVERAGE == 'yes' }} @@ -473,10 +490,14 @@ jobs: name: pdns-auth-${{ env.normalized-branch-name }} path: /opt/pdns-auth # FIXME: install recursor for backends that have ALIAS - - run: inv install-clang-runtime - - run: inv install-auth-test-deps -b ${{ matrix.backend }} - - run: inv test-auth-backend -b ${{ matrix.backend }} - - run: inv generate-coverage-info /opt/pdns-auth/sbin/pdns_server $GITHUB_WORKSPACE + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} install-clang-runtime + - run: ${{ env.INV_CMD }} install-auth-test-deps -b ${{ matrix.backend }} + - run: ${{ env.INV_CMD }} test-auth-backend -b ${{ matrix.backend }} + - run: ${{ env.INV_CMD }} generate-coverage-info /opt/pdns-auth/sbin/pdns_server $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' }} - name: Coveralls Parallel auth backend ${{ matrix.backend }} if: ${{ env.COVERAGE == 'yes' }} @@ -511,10 +532,14 @@ jobs: with: name: pdns-auth-${{ env.normalized-branch-name }} path: /opt/pdns-auth - - run: inv install-clang-runtime - - run: inv install-auth-test-deps - - run: inv test-ixfrdist - - run: inv generate-coverage-info /opt/pdns-auth/bin/ixfrdist $GITHUB_WORKSPACE + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} install-clang-runtime + - run: ${{ env.INV_CMD }} install-auth-test-deps + - run: ${{ env.INV_CMD }} test-ixfrdist + - run: ${{ env.INV_CMD }} generate-coverage-info /opt/pdns-auth/bin/ixfrdist $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' }} - name: Coveralls Parallel ixfrdist if: ${{ env.COVERAGE == 'yes' }} @@ -555,12 +580,16 @@ jobs: with: name: pdns-recursor-full-${{ matrix.sanitizers }}-${{ env.normalized-branch-name }} path: /opt/pdns-recursor - - run: inv apt-fresh - - run: inv add-auth-repo ${{ matrix.dist_name }} $(. /etc/os-release && echo $VERSION_CODENAME) ${{ matrix.pdns_repo_version }} - - run: inv install-clang-runtime - - run: inv install-rec-test-deps - - run: inv test-api recursor - - run: inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} apt-fresh + - run: ${{ env.INV_CMD }} add-auth-repo ${{ matrix.dist_name }} $(. /etc/os-release && echo $VERSION_CODENAME) ${{ matrix.pdns_repo_version }} + - run: ${{ env.INV_CMD }} install-clang-runtime + - run: ${{ env.INV_CMD }} install-rec-test-deps + - run: ${{ env.INV_CMD }} test-api recursor + - run: ${{ env.INV_CMD }} generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} - name: Coveralls Parallel recursor API if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} @@ -603,12 +632,16 @@ jobs: with: name: pdns-recursor-full-${{ matrix.sanitizers }}-${{ env.normalized-branch-name }} path: /opt/pdns-recursor - - run: inv apt-fresh - - run: inv add-auth-repo ${{ matrix.dist_name }} $(. /etc/os-release && echo $VERSION_CODENAME) ${{ matrix.pdns_repo_version }} - - run: inv install-clang-runtime - - run: inv install-rec-test-deps - - run: inv test-regression-recursor - - run: inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} apt-fresh + - run: ${{ env.INV_CMD }} add-auth-repo ${{ matrix.dist_name }} $(. /etc/os-release && echo $VERSION_CODENAME) ${{ matrix.pdns_repo_version }} + - run: ${{ env.INV_CMD }} install-clang-runtime + - run: ${{ env.INV_CMD }} install-rec-test-deps + - run: ${{ env.INV_CMD }} test-regression-recursor + - run: ${{ env.INV_CMD }} generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} - name: Coveralls Parallel recursor regression if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} @@ -652,10 +685,14 @@ jobs: with: name: pdns-recursor-full-${{ matrix.sanitizers }}-${{ env.normalized-branch-name }} path: /opt/pdns-recursor - - run: inv install-clang-runtime - - run: inv install-rec-bulk-deps - - run: inv test-bulk-recursor 100 ${{ matrix.threads }} ${{ matrix.mthreads }} ${{ matrix.shards }} ${{ matrix.IPv6 }} - - run: inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} install-clang-runtime + - run: ${{ env.INV_CMD }} install-rec-bulk-deps + - run: ${{ env.INV_CMD }} test-bulk-recursor 100 ${{ matrix.threads }} ${{ matrix.mthreads }} ${{ matrix.shards }} ${{ matrix.IPv6 }} + - run: ${{ env.INV_CMD }} generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} - name: Coveralls Parallel recursor bulk if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} @@ -693,14 +730,18 @@ jobs: name: pdns-recursor-full-${{ matrix.sanitizers }}-${{ env.normalized-branch-name }} path: /opt/pdns-recursor - run: build-scripts/gh-actions-setup-inv-no-dist-upgrade - - run: inv install-rec-bulk-ubicloud-deps - - run: inv test-bulk-recursor 50000 ${{ matrix.threads }} ${{ matrix.mthreads }} ${{ matrix.shards }} ${{ matrix.IPv6 }} + - name: install pip build dependencies + run: | + python3 -m venv ${{ github.workspace }}/.venv + . ${{ github.workspace }}/.venv/bin/activate && pip install -r ${{ github.workspace }}/meson/requirements.txt + - run: . ${{ github.workspace }}/.venv/bin/activate && inv install-rec-bulk-ubicloud-deps + - run: . ${{ github.workspace }}/.venv/bin/activate && inv test-bulk-recursor 50000 ${{ matrix.threads }} ${{ matrix.mthreads }} ${{ matrix.shards }} ${{ matrix.IPv6 }} env: UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp' ASAN_OPTIONS: detect_leaks=0 TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ github.workspace }}/pdns/recursordist/recursor-tsan.supp" # Disabled, it gives us: "/bin/bash: line 1: llvm-profdata-13: command not found" due to mismatch between deb and ubuntu versions - #- run: inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE + #- run: . ${{ github.workspace }}/.venv/bin/activate && inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE # if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} #- name: Coveralls Parallel recursor bulk # if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} @@ -745,10 +786,14 @@ jobs: with: name: dnsdist-full-${{ matrix.sanitizers }}-autotools-${{ env.normalized-branch-name }} path: /opt/dnsdist - - run: inv install-clang-runtime - - run: inv install-dnsdist-test-deps $([ "$(. /etc/os-release && echo $VERSION_CODENAME)" = "bullseye" ] && echo "--skipXDP=True") - - run: inv test-dnsdist - - run: inv generate-coverage-info /opt/dnsdist/bin/dnsdist $GITHUB_WORKSPACE + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} install-clang-runtime + - run: ${{ env.INV_CMD }} install-dnsdist-test-deps $([ "$(. /etc/os-release && echo $VERSION_CODENAME)" = "bullseye" ] && echo "--skipXDP=True") + - run: ${{ env.INV_CMD }} test-dnsdist + - run: ${{ env.INV_CMD }} generate-coverage-info /opt/dnsdist/bin/dnsdist $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} - name: Coveralls Parallel dnsdist regression if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} @@ -772,8 +817,12 @@ jobs: fetch-depth: 5 submodules: recursive ref: ${{ inputs.branch-name }} - - run: inv install-swagger-tools - - run: inv swagger-syntax-check + - name: install pip build dependencies + run: | + python3 -m venv ${REPO_HOME}/.venv + . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt + - run: ${{ env.INV_CMD }} install-swagger-tools + - run: ${{ env.INV_CMD }} swagger-syntax-check collect: needs: diff --git a/tasks.py b/tasks.py index 947088336f..e1972a27b8 100644 --- a/tasks.py +++ b/tasks.py @@ -205,14 +205,9 @@ def install_doc_deps(c): def install_doc_deps_pdf(c): c.sudo('apt-get install -y ' + ' '.join(doc_deps_pdf)) -def install_meson(c): - c.run(f'python3 -m venv {repo_home}/.venv') - c.run(f'. {repo_home}/.venv/bin/activate && pip install -r {repo_home}/meson/requirements.txt') - @task def install_auth_build_deps(c): c.sudo('apt-get install -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + auth_build_deps)) - install_meson(c) def is_coverage_enabled(): sanitizers = os.getenv('SANITIZERS') @@ -343,19 +338,12 @@ def install_dnsdist_test_deps(c, skipXDP=False): # FIXME: rename this, we do way c.sudo('chmod 755 /var/agentx') @task -def install_rec_build_deps(c, meson=False): +def install_rec_build_deps(c): c.sudo('apt-get install -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + rec_build_deps)) - if meson: - install_meson(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 []))) - install_meson(c) - -@task -def ci_install_meson(c): - install_meson(c) @task def ci_autoconf(c, meson=False): @@ -504,7 +492,7 @@ def get_base_configure_cmd_meson(build_dir, additional_c_flags='', additional_cx f"CXX='{get_cxx_compiler()}'" ]) return " ".join([ - f'. {repo_home}/.venv/bin/activate && {env} meson setup {build_dir}', + f'{env} meson setup {build_dir}', "-D systemd={}".format("enabled" if enable_systemd else "disabled"), "-D signers-libsodium={}".format("enabled" if enable_sodium else "disabled"), "-D hardening-fortify-source=auto", @@ -850,7 +838,7 @@ def ci_auth_make_bear(c): c.run(f'bear --append -- make -j{get_build_concurrency()} -k V=1') def run_ninja(c): - c.run(f'. {repo_home}/.venv/bin/activate && ninja -j{get_build_concurrency()} --verbose') + c.run(f'ninja -j{get_build_concurrency()} --verbose') @task def ci_auth_build(c, meson=False): @@ -896,7 +884,7 @@ def ci_auth_run_unit_tests(c, meson=False): suite_timeout_sec = 120 logfile = 'meson-logs/testlog.txt' c.run(f'touch {repo_home}/regression-tests/tests/verify-dnssec-zone/allow-missing {repo_home}/regression-tests.nobackend/rectify-axfr/allow-missing') # FIXME: can this go? - res = c.run(f'. {repo_home}/.venv/bin/activate && meson test --verbose -t {suite_timeout_sec}', warn=True) + res = c.run(f'meson test --verbose -t {suite_timeout_sec}', warn=True) else: logfile = 'pdns/test-suite.log' res = c.run('make check', warn=True) @@ -910,7 +898,7 @@ def ci_rec_run_unit_tests(c, meson=False): if 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) + res = c.run(f'meson test --verbose -t {suite_timeout_sec}', warn=True) else: res = c.run('make check', warn=True) if res.exited != 0: