-
Notifications
You must be signed in to change notification settings - Fork 350
146 lines (116 loc) · 3.51 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
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
- 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 }}
freebsd:
runs-on: ubuntu-latest
env:
CC: gcc
EXTRA_CFLAGS: "-Werror"
steps:
- uses: actions/checkout@v4
- name: Test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
envs: "CC EXTRA_CFLAGS"
usesh: true
sync: rsync
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
run: |
pwd
ls -lah
whoami
env
freebsd-version
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
find / -name 'CHANGELOG.md'
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