-
-
Notifications
You must be signed in to change notification settings - Fork 3
190 lines (186 loc) · 8.36 KB
/
build.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
---
name: Build on various Operating Systems
on:
push:
branches: [devel, master]
pull_request:
branches: [devel, master]
env:
ARTIFACT: lsp-ws-lib
VALGRIND_ARGS: --error-exitcode=255 --leak-check=full --track-origins=yes --keep-debuginfo=yes --suppressions=.github/workflows/valgrind.supp
jobs:
arch_linux:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Add debug repositories
run: |
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[multilib-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
- name: Install dependencies
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
run: make VERBOSE=1
- name: Run unit tests
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
- name: Run unit tests with memcheck
run: |
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
echo "***** MEMCHECK $test *****"; \
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
done
arch_linux_asan:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Add debug repositories
run: |
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[multilib-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
- name: Install dependencies
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 STRICT=1 DEBUG=1 ASAN=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
run: make VERBOSE=1
- name: Run unit tests
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
- name: Run unit tests with memcheck
run: |
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
echo "***** MEMCHECK $test *****"; \
.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
done
arch_linux_valgrind:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Add debug repositories
run: |
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[multilib-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
- name: Install dependencies
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 STRICT=1 DEBUG=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
run: make VERBOSE=1
- name: Run unit tests
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
- name: Run unit tests with memcheck
run: |
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
echo "***** MEMCHECK $test *****"; \
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
done
opensuse_leap:
runs-on: ubuntu-latest
container:
image: opensuse/leap:latest
steps:
- name: Install dependencies
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
run: make VERBOSE=1
- name: Run unit tests
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
- name: Run unit tests with memcheck
run: |
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
echo "***** MEMCHECK $test *****"; \
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
done
opensuse_tumbleweed_clang:
runs-on: ubuntu-latest
container:
image: opensuse/tumbleweed:latest
steps:
- name: Install dependencies
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libstdc++-devel clang libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 STRICT=1 CC=clang CXX=clang++
- name: Fetch project dependencies
run: make fetch
- name: Build project
run: make VERBOSE=1
- name: Run unit tests
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
- name: Run unit tests with memcheck
run: |
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
echo "***** MEMCHECK $test *****"; \
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
done
debian_stable:
runs-on: ubuntu-latest
container:
image: debian:stable
steps:
- name: Update repositories
run: apt-get update
- name: Install dependencies
run: apt-get -y install git make pkg-config valgrind gcc g++ libgl-dev libsndfile1-dev libx11-dev libxrandr-dev libfreetype6-dev libcairo2-dev
- uses: actions/checkout@v3
- name: Configure project
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
run: make fetch
- name: Build project
run: make VERBOSE=1
- name: Run unit tests
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
- name: Run unit tests with memcheck
run: |
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
echo "***** MEMCHECK $test *****"; \
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
done
windows_mingw64:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- name: Setup MSYS2 and install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
release: false
update: false
install: >-
base-devel
git
mingw-w64-x86_64-gcc
- uses: actions/checkout@v3
- name: Configure project
shell: msys2 {0}
run: make config TEST=1 STRICT=1
- name: Fetch project dependencies
shell: msys2 {0}
run: make fetch
- name: Build project
shell: msys2 {0}
run: make VERBOSE=1
- name: Run unit tests
shell: msys2 {0}
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test.exe utest --verbose --jobs 1