]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
adding make distdir step to build-and-test-all 13101/head
authorAlexis Romero <alexis.romero@open-xchange.com>
Thu, 3 Aug 2023 11:53:27 +0000 (13:53 +0200)
committerAlexis Romero <alexis.romero@open-xchange.com>
Mon, 11 Sep 2023 13:52:04 +0000 (15:52 +0200)
.github/workflows/build-and-test-all.yml
tasks.py

index 7d2a75fd49e20c885fc8bedd16324ba6e421cdc4..6ec3c79162157bf1a15fdf2820b04b29ee0e309f 100644 (file)
@@ -14,6 +14,7 @@ env:
   CLANG_VERSION: '13'
   # github.workspace variable points to the Runner home folder. Container home folder defined below.
   REPO_HOME: '/__w/pdns/pdns'
+  BUILDER_VERSION: '0.0.0-git1'
 
 jobs:
   build-auth:
@@ -29,6 +30,9 @@ jobs:
         UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
         UNIT_TESTS: yes
       options: --sysctl net.ipv6.conf.all.disable_ipv6=0
+    defaults:
+      run:
+        working-directory: ./pdns-${{ env.BUILDER_VERSION }}
     outputs:
       clang-tidy-failed: ${{ steps.clang-tidy-annotations.outputs.failed }}
     steps:
@@ -41,7 +45,9 @@ jobs:
         run: |
           echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
         shell: bash
+        working-directory: .
       - run: mkdir -p ~/.ccache
+        working-directory: .
       - name: let GitHub cache our ccache data
         uses: actions/cache@v3
         with:
@@ -49,14 +55,19 @@ jobs:
           key: auth-ccache-${{ steps.get-stamp.outputs.stamp }}
           restore-keys: auth-ccache-
       - run: inv ci-autoconf
+        working-directory: .
       - run: inv ci-auth-configure
-      - run: inv ci-auth-make-bear  # This runs under pdns/
-      - run: ln -s .clang-tidy.full .clang-tidy
+        working-directory: .
+      - run: inv ci-make-distdir
+        working-directory: .
+      - run: inv ci-auth-configure
+      - run: inv ci-auth-make-bear  # This runs under pdns-$BUILDER_VERSION/pdns/
+      - run: ln -s ../clang-tidy.full .clang-tidy
       - name: Run clang-tidy
-        working-directory: pdns
-        run: git diff -U0 HEAD^..HEAD | python3 ../.github/scripts/git-filter.py | python3 /usr/bin/clang-tidy-diff-${CLANG_VERSION}.py -clang-tidy-binary /usr/bin/clang-tidy-${CLANG_VERSION} -extra-arg=-ferror-limit=0 -p2 -export-fixes clang-tidy-auth.yml
+        working-directory: ./pdns-${{ env.BUILDER_VERSION }}/pdns
+        run: git diff -U0 HEAD^..HEAD | python3 ../../.github/scripts/git-filter.py | python3 /usr/bin/clang-tidy-diff-${CLANG_VERSION}.py -clang-tidy-binary /usr/bin/clang-tidy-${CLANG_VERSION} -extra-arg=-ferror-limit=0 -p2 -export-fixes clang-tidy-auth.yml
       - name: Print clang-tidy fixes YAML
-        working-directory: pdns
+        working-directory: ./pdns-${{ env.BUILDER_VERSION }}/pdns
         shell: bash
         run: |
           if [ -f clang-tidy-auth.yml ]; then
@@ -65,11 +76,11 @@ jobs:
       - name: Result annotations
         id: clang-tidy-annotations
         shell: bash
-        working-directory: pdns
+        working-directory: ./pdns-${{ env.BUILDER_VERSION }}/pdns
         run: |
           if [ -f clang-tidy-auth.yml ]; then
             set +e
-            python3 ../.github/scripts/clang-tidy.py --fixes-file clang-tidy-auth.yml
+            python3 ../../.github/scripts/clang-tidy.py --fixes-file clang-tidy-auth.yml
             echo "failed=$?" >> $GITHUB_OUTPUT
           fi
       - run: inv ci-auth-install-remotebackend-test-deps
@@ -100,7 +111,7 @@ jobs:
       options: --sysctl net.ipv6.conf.all.disable_ipv6=0
     defaults:
       run:
-        working-directory: ./pdns/recursordist/
+        working-directory: ./pdns/recursordist/pdns-recursor-${{ env.BUILDER_VERSION }}
     outputs:
       clang-tidy-failed: ${{ steps.clang-tidy-annotations.outputs.failed }}
     steps:
@@ -113,7 +124,9 @@ jobs:
         run: |
           echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
         shell: bash
+        working-directory: .
       - run: mkdir -p ~/.ccache
+        working-directory: .
       - name: let GitHub cache our ccache data
         uses: actions/cache@v3
         with:
@@ -121,11 +134,16 @@ jobs:
           key: recursor-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }}
           restore-keys: recursor-${{ matrix.sanitizers }}-ccache-
       - run: inv ci-autoconf
+        working-directory: ./pdns/recursordist/
+      - run: inv ci-rec-configure
+        working-directory: ./pdns/recursordist/
+      - run: inv ci-make-distdir
+        working-directory: ./pdns/recursordist/
       - run: inv ci-rec-configure
       - run: inv ci-rec-make-bear
-      - run: ln -s ../../.clang-tidy.full .clang-tidy
+      - run: ln -s ../../../.clang-tidy.full .clang-tidy
       - name: Run clang-tidy
-        run: git diff -U0 HEAD^..HEAD | python3 ../../.github/scripts/git-filter.py | python3 /usr/bin/clang-tidy-diff-${CLANG_VERSION}.py -clang-tidy-binary /usr/bin/clang-tidy-${CLANG_VERSION} -extra-arg=-ferror-limit=0 -p3 -export-fixes clang-tidy-rec.yml
+        run: git diff -U0 HEAD^..HEAD | python3 ../../../.github/scripts/git-filter.py | python3 /usr/bin/clang-tidy-diff-${CLANG_VERSION}.py -clang-tidy-binary /usr/bin/clang-tidy-${CLANG_VERSION} -extra-arg=-ferror-limit=0 -p3 -export-fixes clang-tidy-rec.yml
       - name: Print clang-tidy fixes YAML
         shell: bash
         run: |
@@ -138,7 +156,7 @@ jobs:
         run: |
           if [ -f clang-tidy-rec.yml ]; then
             set +e
-            python ../../.github/scripts/clang-tidy.py --fixes-file clang-tidy-rec.yml
+            python ../../../.github/scripts/clang-tidy.py --fixes-file clang-tidy-rec.yml
             echo "failed=$?" >> $GITHUB_OUTPUT
           fi
       - run: inv ci-rec-run-unit-tests
@@ -169,10 +187,11 @@ jobs:
         SANITIZERS: ${{ matrix.sanitizers }}
         UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
         UNIT_TESTS: yes
+        FUZZING_TARGETS: yes
       options: --sysctl net.ipv6.conf.all.disable_ipv6=0
     defaults:
       run:
-        working-directory: ./pdns/dnsdistdist/
+        working-directory: ./pdns/dnsdistdist/dnsdist-${{ env.BUILDER_VERSION }}
     outputs:
       clang-tidy-failed: ${{ steps.clang-tidy-annotations.outputs.failed }}
     steps:
@@ -185,7 +204,9 @@ jobs:
         run: |
           echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
         shell: bash
+        working-directory: .
       - run: mkdir -p ~/.ccache
+        working-directory: .
       - name: let GitHub cache our ccache data
         uses: actions/cache@v3
         with:
@@ -193,11 +214,16 @@ jobs:
           key: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }}
           restore-keys: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache-
       - run: inv ci-autoconf
+        working-directory: ./pdns/dnsdistdist/
+      - run: inv ci-dnsdist-configure ${{ matrix.features }}
+        working-directory: ./pdns/dnsdistdist/
+      - run: inv ci-make-distdir
+        working-directory: ./pdns/dnsdistdist/
       - run: inv ci-dnsdist-configure ${{ matrix.features }}
       - run: inv ci-dnsdist-make-bear
-      - run: ln -s ../../.clang-tidy.full .clang-tidy
+      - run: ln -s ../../../.clang-tidy.full .clang-tidy
       - name: Run clang-tidy
-        run: git diff -U0 HEAD^..HEAD | python3 ../../.github/scripts/git-filter.py | python3 /usr/bin/clang-tidy-diff-${CLANG_VERSION}.py -clang-tidy-binary /usr/bin/clang-tidy-${CLANG_VERSION} -extra-arg=-ferror-limit=0 -p3 -export-fixes clang-tidy-dnsdist.yml
+        run: git diff -U0 HEAD^..HEAD | python3 ../../../.github/scripts/git-filter.py | python3 /usr/bin/clang-tidy-diff-${CLANG_VERSION}.py -clang-tidy-binary /usr/bin/clang-tidy-${CLANG_VERSION} -extra-arg=-ferror-limit=0 -p3 -export-fixes clang-tidy-dnsdist.yml
       - name: Print clang-tidy fixes YAML
         shell: bash
         run: |
@@ -210,7 +236,7 @@ jobs:
         run: |
           if [ -f clang-tidy-dnsdist.yml ]; then
             set +e
-            python ../../.github/scripts/clang-tidy.py --fixes-file clang-tidy-dnsdist.yml
+            python ../../../.github/scripts/clang-tidy.py --fixes-file clang-tidy-dnsdist.yml
             echo "failed=$?" >> $GITHUB_OUTPUT
           fi
       - run: inv ci-dnsdist-run-unit-tests
index 096aa5d0902b0c6967d01cc9f2606d1fc96aaab1..a3964e9cfd95d2eedeea1551ce4d7d5d45ff9dde 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -299,7 +299,7 @@ def install_dnsdist_build_deps(c):
 
 @task
 def ci_autoconf(c):
-    c.run('BUILDER_VERSION=0.0.0-git1 autoreconf -vfi')
+    c.run('autoreconf -vfi')
 
 @task
 def ci_docs_build(c):
@@ -589,6 +589,10 @@ def ci_dnsdist_run_unit_tests(c):
       c.run('cat test-suite.log')
       raise UnexpectedExit(res)
 
+@task
+def ci_make_distdir(c):
+    res = c.run('make distdir')
+
 @task
 def ci_make_install(c):
     res = c.run('make install') # FIXME: this builds auth docs - again