Add freebsd runner #1350
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
# Enforce the standard of g_malloc instead of malloc in the project | |
enforce-g_malloc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: enforce-g_malloc | |
run: "! git grep -P '(?<!g_)malloc' ':!.valgrind.suppressions' ':!.github/workflows/main.yml'" | |
build-linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
CC: | |
- clang | |
- gcc | |
distro: | |
- alpine | |
- alpine-edge | |
- archlinux | |
- debian-bookworm | |
- debian-bullseye | |
- debian-buster | |
- fedora | |
- ubuntu-focal | |
- ubuntu-jammy | |
- ubuntu-noble | |
env: | |
CC: ${{ matrix.CC }} | |
EXTRA_CFLAGS: "-Werror ${{ (matrix.distro == 'debian-bookworm' || matrix.distro == 'ubuntu-jammy') && matrix.CC == 'clang' && '-gdwarf-4' || ' '}}" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Clone the whole history including tags. | |
fetch-depth: 0 | |
- name: setup $HOME for git | |
run: echo "HOME=${RUNNER_TEMP}" >> ${GITHUB_ENV} | |
- name: configure safe directory for git | |
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | |
- name: build | |
run: make -j all dunstify test/test | |
- name: test | |
run: make -j test | |
- name: installation | |
run: ./test/test-install.sh | |
- name: valgrind memleaks | |
run: make clean && make -j test-valgrind | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/dunst-project/docker-images:${{ matrix.distro }} | |
build-freebsd: | |
runs-on: ubuntu-latest | |
env: | |
CC: gcc | |
EXTRA_CFLAGS: "-Werror" | |
MAKE: gmake | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Test in FreeBSD | |
uses: vmactions/freebsd-vm@v1 | |
with: | |
envs: "CC EXTRA_CFLAGS MAKE" | |
usesh: true | |
sync: rsync | |
copyback: false | |
prepare: | | |
pkg install -y x11-toolkits/pango devel/glib20 graphics/gdk-pixbuf2 graphics/cairo graphics/wayland \ | |
devel/libnotify devel/dbus x11/libXScrnSaver x11/libXrandr x11/libXext x11/libX11 lang/perl5.36 \ | |
devel/pkgconf devel/gmake devel/evdev-proto valgrind x11/libXinerama graphics/wayland-protocols \ | |
devel/gettext-runtime x11-fonts/fontconfig x11-fonts/dejavu lang/gcc git librsvg2 bash | |
run: | | |
echo "* Run test suite" | |
gmake -j test | |
echo "* Run install test" | |
./test/test-install.sh | |
echo "* Run valgrind test" | |
gmake -j test-valgrind | |
doxygen: | |
steps: | |
- uses: actions/checkout@v4 | |
- name: doxygen | |
run: make -j doc-doxygen | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/dunst-project/docker-images:misc-doxygen | |
coverage: | |
needs: [build-linux, build-freebsd] | |
env: | |
CC: gcc | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Clone the whole history including tags. | |
fetch-depth: 0 | |
- name: setup $HOME for git | |
run: echo "HOME=${RUNNER_TEMP}" >> ${GITHUB_ENV} | |
- name: configure safe directory for git | |
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | |
- name: coverage | |
run: make clean && make -j test-coverage | |
- name: Generate coverage report | |
run: lcov -c -d . -o lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
name: fedora-gcc | |
fail_ci_if_error: true | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/dunst-project/docker-images:fedora |