forked from labwc/labwc
-
Notifications
You must be signed in to change notification settings - Fork 0
212 lines (191 loc) · 6.59 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# Void-musl images:
# https://github.com/void-linux/void-containers/pkgs/container/void-musl
#
# Void dependencies based on:
# https://github.com/void-linux/void-packages/blob/master/srcpkgs/labwc/template
#
# Recommended GH CI Void mirror based on
# https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html
name: CI
on: [pull_request]
jobs:
codestyle:
name: CodeStyleCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Code Style
run: |
./scripts/check
make -C scripts/helper
./scripts/find-banned.sh
build:
name: Build
needs: codestyle
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
name: [
Arch,
Debian,
FreeBSD,
Void-musl
]
include:
- name: Arch
os: ubuntu-latest
container: archlinux:base-devel
env:
TARGET: 'sh -xe'
- name: Debian
os: ubuntu-latest
container: debian:testing
env:
TARGET: 'sh -xe'
- name: FreeBSD
os: ubuntu-latest
env:
TARGET: 'ssh freebsd /bin/sh -xe'
- name: Void-musl
os: ubuntu-latest
container: ghcr.io/void-linux/void-musl:latest
env:
TARGET: 'sh -xe'
env: ${{ matrix.env }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v1
- name: Install Arch Linux dependencies
if: matrix.name == 'Arch'
run: |
pacman-key --init
pacman -Syu --noconfirm
pacman -S --noconfirm git meson clang wlroots libdrm libinput \
wayland-protocols cairo pango libxml2 xorg-xwayland librsvg \
libdisplay-info
- name: Install Debian Testing dependencies
if: matrix.name == 'Debian'
run: |
sed -i '/^Types/ s/deb/& deb-src/' /etc/apt/sources.list.d/debian.sources
apt-get update
apt-get upgrade -y
apt-get install -y git gcc clang gdb xwayland
apt-get build-dep -y labwc
- name: Install FreeBSD dependencies
if: matrix.name == 'FreeBSD'
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
pkg set -yn pkg:mesa-dri # hack to skip llvm dependency
pkg install -y git meson gcc pkgconf cairo pango evdev-proto \
hwdata wayland-protocols wlroots libdisplay-info
run: echo "setup done"
- name: Install Void Linux dependencies
if: matrix.name == 'Void-musl'
run: |
mkdir -p /etc/xbps.d
cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i "s:repo-default\.voidlinux\.org:repo-ci.voidlinux.org:g" \
/etc/xbps.d/*-repository-*.conf
xbps-install -Syu || xbps-install -yu xbps
xbps-install -Syu
xbps-install -y git meson gcc clang pkg-config scdoc \
cairo-devel glib-devel libpng-devel librsvg-devel libxml2-devel \
pango-devel wlroots0.17-devel gdb bash xorg-server-xwayland \
dejavu-fonts-ttf
# These build are executed on all runners
- name: Build with gcc
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc -Dxwayland=enabled --werror
meson compile -C build-gcc
' | $TARGET
- name: Build with clang
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=clang
meson setup build-clang -Dxwayland=enabled --werror
meson compile -C build-clang
' | $TARGET
- name: Build with gcc - no-xwayland
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc-no-xwayland -Dxwayland=disabled --werror
meson compile -C build-gcc-no-xwayland
' | $TARGET
- name: Build with clang - no-xwayland
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=clang
meson setup build-clang-no-xwayland -Dxwayland=disabled --werror
meson compile -C build-clang-no-xwayland
' | $TARGET
- name: Build with gcc - release
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc-release -Dxwayland=enabled \
-Dbuildtype=release -Db_ndebug=true --werror
meson compile -C build-gcc-release
' | $TARGET
- name: Build with gcc - static analyzer
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc-static_analyzer -Dxwayland=enabled \
-Dstatic_analyzer=enabled --werror
meson compile -C build-gcc-static_analyzer
' | $TARGET
# Runtime tests, these run on Debian and Void only (the later due to libmusl being used)
- name: Build with clang - release
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=clang
meson setup build-clang-release -Dxwayland=enabled \
-Dbuildtype=release -Db_ndebug=true --werror
meson compile -C build-clang-release
' | $TARGET
- name: Build with gcc - runtime test
if: matrix.name == 'Debian'
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc-ci -Dxwayland=enabled -Db_sanitize=undefined --werror
meson compile -C build-gcc-ci
scripts/ci/smoke-test.sh build-gcc-ci
' | $TARGET
- name: Build with clang - runtime test
if: matrix.name == 'Debian'
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=clang
meson setup build-clang-ci -Dxwayland=enabled -Db_sanitize=undefined --werror
meson compile -C build-clang-ci
scripts/ci/smoke-test.sh build-clang-ci
' | $TARGET
# Void-musl doesn't support sanitizer
- name: Build with gcc - runtime test w/o sanitizer
if: matrix.name == 'Void-musl'
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson setup build-gcc-ci -Dxwayland=enabled --werror
meson compile -C build-gcc-ci
LABWC_RUNS=20 scripts/ci/smoke-test.sh build-gcc-ci
' | $TARGET