Skip to content

tools: Enable the Python bridge on stable Debian/Ubuntu #11246

tools: Enable the Python bridge on stable Debian/Ubuntu

tools: Enable the Python bridge on stable Debian/Ubuntu #11246

Workflow file for this run

name: unit-tests
on: [pull_request, workflow_dispatch]
jobs:
unit-tests:
runs-on: ubuntu-22.04
permissions: {}
strategy:
matrix:
startarg:
# avoid check-memory on i386, it has literally thousands of uninteresting/wrong errors
- { make: 'check-memory', cc: 'gcc', tag: 'latest' }
# with default Python bridge
- { make: 'distcheck', cc: 'clang', tag: 'latest' }
- { make: 'distcheck', cc: 'gcc', tag: 'i386' }
# with old C bridge
- { make: 'distcheck', cc: 'gcc', distcheck_flags: '--enable-old-bridge', tag: 'latest' }
# this runs static code checks, unlike distcheck
- { make: 'check', cc: 'gcc', tag: 'latest' }
- { make: 'pytest-cov', cc: 'gcc', tag: 'latest' }
fail-fast: false
timeout-minutes: 60
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
# need this to also fetch tags
fetch-depth: 0
- name: Build unit test container if it changed
run: |
changes=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}..HEAD -- containers/unit-tests/)
if [ -n "${changes}" ]; then
case '${{ matrix.startarg.tag }}' in
i386) arch=i386;;
latest) arch=amd64;;
esac
containers/unit-tests/build $arch
fi
- name: Run unit-tests container
timeout-minutes: 30
# HACK: -gdwarf-4 is for clang: https://bugs.kde.org/show_bug.cgi?id=452758
run: |
containers/unit-tests/start \
--verbose \
--env=FORCE_COLOR=1 \
--env=CC='${{ matrix.startarg.cc }}' \
--env=CFLAGS='-O2 -gdwarf-4' \
--env=EXTRA_DISTCHECK_CONFIGURE_FLAGS='${{ matrix.startarg.distcheck_flags }}' \
--image-tag='${{ matrix.startarg.tag }}' \
--make '${{ matrix.startarg.make }}'