From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 27 Nov 2025 16:02:34 +0000 (-0500) Subject: Refactor pip build dependencies X-Git-Tag: rec-5.4.0-beta1~45^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd176ea02a3ae5b58e4e17245db1fa57dafd2c88;p=thirdparty%2Fpdns.git Refactor pip build dependencies Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- diff --git a/.github/actions/pip-build-dependencies/action.yml b/.github/actions/pip-build-dependencies/action.yml new file mode 100644 index 0000000000..ea89f8d2ce --- /dev/null +++ b/.github/actions/pip-build-dependencies/action.yml @@ -0,0 +1,22 @@ +name: 'Install pip build dependencies' +description: 'Install pip build dependencies' + +inputs: + venv-parent: + description: venv parent + required: true + working-directory: + description: working directory + +runs: + using: "composite" + steps: + - name: install pip build dependencies + shell: bash + run: | + : install pip build dependencies + python3 -m venv ${VENV_PARENT}/.venv + . ${VENV_PARENT}/.venv/bin/activate && pip install -r ${VENV_PARENT}/meson/requirements.txt + env: + VENV_PARENT: ${{ inputs.venv-parent }} + working-directory: ${{ inputs.working-directory }} diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index 2a33a7be83..82bce611ab 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -84,10 +84,10 @@ jobs: run: echo "SANITIZERS=${{ matrix.builder == 'meson' && 'address,undefined' || 'asan+ubsan' }}" >> "$GITHUB_ENV" working-directory: . - 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: . + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - run: ${{ env.INV_CMD }} install-auth-build-deps working-directory: . - run: ${{ env.INV_CMD }} ci-autoconf ${{ matrix.builder == 'meson' && '--meson' || '' }} @@ -166,10 +166,10 @@ jobs: with: cache-key-base: recursor-ccache-${{ matrix.builder }}-${{ matrix.features }}-${{ matrix.sanitizers }} - 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: . + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - run: ${{ env.INV_CMD }} install-rec-build-deps working-directory: ./pdns/recursordist/ - run: ${{ env.INV_CMD }} ci-install-rust ${REPO_HOME} @@ -248,10 +248,10 @@ jobs: with: cache-key-base: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-${{ matrix.builder}}${{ matrix.architecture_suffix }}-ccache - 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: . + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - run: ${{ env.INV_CMD }} install-clang working-directory: . - run: ${{ env.INV_CMD }} install-lld-linker-if-needed @@ -354,9 +354,10 @@ jobs: name: pdns-auth-meson-${{ env.normalized-branch-name }} path: /opt/pdns-auth - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - run: ${{ env.INV_CMD }} apt-fresh - run: ${{ env.INV_CMD }} install-clang-runtime - run: ${{ env.INV_CMD }} install-auth-test-deps -b ${{ matrix.backend }} @@ -487,9 +488,10 @@ jobs: path: /opt/pdns-auth # FIXME: install recursor for backends that have ALIAS - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - run: ${{ env.INV_CMD }} github-more-diskspace - run: ${{ env.INV_CMD }} install-clang-runtime - run: ${{ env.INV_CMD }} install-auth-test-deps -b ${{ matrix.backend }} @@ -531,9 +533,10 @@ jobs: name: pdns-auth-meson-${{ env.normalized-branch-name }} path: /opt/pdns-auth - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - run: ${{ env.INV_CMD }} install-clang-runtime - run: ${{ env.INV_CMD }} install-auth-test-deps - run: ${{ env.INV_CMD }} test-ixfrdist @@ -581,9 +584,10 @@ jobs: name: pdns-recursor-full-${{ matrix.sanitizers }}-meson-${{ env.normalized-branch-name }} path: /opt/pdns-recursor - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - 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 @@ -635,9 +639,10 @@ jobs: name: pdns-recursor-full-${{ matrix.sanitizers }}-meson-${{ env.normalized-branch-name }} path: /opt/pdns-recursor - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - 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 @@ -690,9 +695,10 @@ jobs: name: pdns-recursor-full-${{ matrix.sanitizers }}-meson-${{ env.normalized-branch-name }} path: /opt/pdns-recursor - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - 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 }} @@ -737,9 +743,9 @@ jobs: path: /opt/pdns-recursor - run: build-scripts/gh-actions-setup-inv-no-dist-upgrade - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ github.workspace }} - 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: @@ -797,9 +803,9 @@ jobs: name: dnsdist-full-${{ matrix.sanitizers }}-meson-${{ env.normalized-branch-name }} path: /opt/dnsdist - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} - 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 $([ "$(. /etc/os-release && echo $VERSION_CODENAME)" = "bullseye" ] && echo "--skipXDP=True") @@ -831,9 +837,10 @@ jobs: ref: ${{ inputs.branch-name }} persist-credentials: false - 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 + uses: ./.github/actions/pip-build-dependencies + with: + venv-parent: ${{ env.REPO_HOME }} + working-directory: . - run: ${{ env.INV_CMD }} install-swagger-tools - run: ${{ env.INV_CMD }} swagger-syntax-check