-
Notifications
You must be signed in to change notification settings - Fork 343
113 lines (89 loc) · 2.66 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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:
strategy:
fail-fast: false
matrix:
CC:
- clang
- gcc
distro:
- alpine
- 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 }}
coverage:
needs: build
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
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