Files
profanity/.github/workflows/main.yml
Michael Vetter 45ddbe94e8 ci: Make CI more informative
Have a better overview, we are interested in which tests are run, which
distro, which build system and which omemo backend.

debian | Autotools | unit+func | signal
debian | Meson | unit+func | signal
debian | Meson | unit+func | libomemo
fedora | Autotools | unit+func | signal
ubuntu | Autotools | unit+func | signal
2026-03-20 12:34:39 +01:00

90 lines
2.7 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- flavor: debian
buildsystem: Autotools
tests: unit+func
omemo: signal
script: ./ci/ci-build.sh
- flavor: fedora
buildsystem: Autotools
tests: unit+func
omemo: signal
script: ./ci/ci-build.sh
- flavor: ubuntu
buildsystem: Autotools
tests: unit+func
omemo: signal
script: ./ci/ci-build.sh
- flavor: debian
buildsystem: Meson
tests: unit+func
omemo: signal
script: ./ci/ci-meson-build.sh
omemo_env: libsignal
- flavor: debian
buildsystem: Meson
tests: unit+func
omemo: libomemo
script: ./ci/ci-meson-build.sh
omemo_env: libomemo-c
name: ${{ matrix.flavor }} | ${{ matrix.buildsystem }} | ${{ matrix.tests }} | ${{ matrix.omemo }}
steps:
- uses: actions/checkout@v2
- name: Run tests
env:
OMEMO_BACKEND: ${{ matrix.omemo_env }}
run: |
docker build -f ci/Dockerfile.${{ matrix.flavor }} -t profanity .
docker run ${OMEMO_BACKEND:+ -e OMEMO_BACKEND} profanity ${{ matrix.script }}
code-style:
runs-on: ubuntu-22.04
name: Check coding style
continue-on-error: true
steps:
- uses: actions/checkout@v2
# if this check fails, you have to update the number of auto types known and the list of auto types in the check below
- name: Check auto types are up-to-date
run: |
[[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "9" ]] || exit -1
- name: Check auto types are initialized
run: |
grep -P 'auto_(char|gchar|gcharv|gerror|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
- name: Run clang-format
uses: jidicula/clang-format-action@v4.16.0
with:
clang-format-version: '21'
check-path: 'src'
spell-check:
runs-on: ubuntu-22.04
name: Check spelling
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends codespell
- name: Check spelling
run: |
codespell