Skip to content

Commit

Permalink
Merge pull request PowerDNS#13101 from romeroalx/add-make-distdir
Browse files Browse the repository at this point in the history
GH actions. build-and-test-all.yml: add make distdir as an additional step for build jobs
  • Loading branch information
rgacogne authored Sep 12, 2023
2 parents 691a15f + e917c86 commit 4c06629
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 16 deletions.
56 changes: 41 additions & 15 deletions .github/workflows/build-and-test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -41,22 +45,29 @@ 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:
path: ~/.ccache
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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -122,11 +135,16 @@ jobs:
restore-keys: recursor-${{ matrix.sanitizers }}-ccache-
- run: inv ci-install-rust ${{ env.REPO_HOME }}
- 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: |
Expand All @@ -139,7 +157,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
Expand Down Expand Up @@ -170,10 +188,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:
Expand All @@ -186,19 +205,26 @@ 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:
path: ~/.ccache
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: |
Expand All @@ -211,7 +237,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
Expand Down
6 changes: 5 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,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):
Expand Down Expand Up @@ -594,6 +594,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
Expand Down

0 comments on commit 4c06629

Please sign in to comment.