]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Refactor pip build dependencies
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Thu, 27 Nov 2025 16:02:34 +0000 (11:02 -0500)
committerJosh Soref <2119212+jsoref@users.noreply.github.com>
Wed, 14 Jan 2026 13:50:19 +0000 (08:50 -0500)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
.github/actions/pip-build-dependencies/action.yml [new file with mode: 0644]
.github/workflows/build-and-test-all.yml

diff --git a/.github/actions/pip-build-dependencies/action.yml b/.github/actions/pip-build-dependencies/action.yml
new file mode 100644 (file)
index 0000000..ea89f8d
--- /dev/null
@@ -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 }}
index 2a33a7be832d2e301a800894c7f3cd0853e7e627..82bce611abff7cceb71754a882c1c9f97cba576b 100644 (file)
@@ -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