Skip to content

Commit 24026d2

Browse files
committed
feat: add alpine and freebsd CI
1 parent 1893218 commit 24026d2

3 files changed

Lines changed: 82 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build
33
on: [push]
44

55
jobs:
6-
build:
6+
arch:
77
runs-on: ubuntu-latest
88
container:
99
image: archlinux:latest
@@ -34,4 +34,74 @@ jobs:
3434
run: |
3535
cd arch/
3636
chown -R builder:builder .
37-
sudo -u builder makepkg -s --noconfirm
37+
sudo -u builder makepkg -si --noconfirm
38+
39+
alpine:
40+
runs-on: ubuntu-latest
41+
container:
42+
image: alpine:edge
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Install build dependencies
46+
run: |
47+
apk add --no-cache git gcc musl-dev cairo-dev eudev-dev gdk-pixbuf-dev \
48+
libdisplay-info-dev libevdev-dev libinput-dev libseat-dev libxcb-dev \
49+
libxkbcommon-dev mesa-dev meson pango-dev pcre2-dev pixman-dev \
50+
wayland-dev wayland-protocols xcb-util-image-dev xcb-util-wm-dev \
51+
xwayland-dev hwdata-dev shaderc-dev vulkan-headers vulkan-loader-dev \
52+
xcb-util-cursor xcb-util-renderutil-dev glslang
53+
54+
- name: Build wlroots
55+
run: |
56+
git clone --depth 1 https://gitlab.freedesktop.org/wlroots/wlroots.git /tmp/wlroots
57+
meson setup /tmp/wlroots /tmp/wlroots/build -Dexamples=false -Dtests=false \
58+
-Dxwayland=enabled -Drenderers=gles2,vulkan -Dbackends=drm,libinput,x11
59+
ninja -C /tmp/wlroots/build
60+
meson install -C /tmp/wlroots/build
61+
rm -rf /tmp/wlroots
62+
63+
- name: Build
64+
run: |
65+
meson setup build
66+
ninja -C build
67+
68+
freebsd:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v4
72+
- name: Build on FreeBSD
73+
uses: vmactions/freebsd-vm@v1
74+
with:
75+
release: "14.2"
76+
usesh: true
77+
prepare: |
78+
pkg install -y meson ninja pkgconf git wayland wayland-protocols \
79+
libxkbcommon pixman cairo libdrm libinput libevdev seatd libepoll-shim \
80+
pango shaderc vulkan-headers vulkan-loader xcb-util-wm xcb-util-errors hwdata \
81+
xcb-util-renderutil xcb-util-cursor xcb-util-image json-c lcms2 evdev-proto freetype2 \
82+
libepoll-shim libinotify mesa-libs mesa-devel egl-x11 egl-wayland libudev-devd \
83+
gdk-pixbuf2 glslang xwayland libX11 libdisplay-info libliftoff bzip2
84+
run: |
85+
# FreeBSD's bzip2 package doesn't ship bzip2.pc, but freetype2 requires it
86+
cat > /usr/local/libdata/pkgconfig/bzip2.pc << 'EOF'
87+
prefix=/usr/local
88+
exec_prefix=${prefix}
89+
libdir=${exec_prefix}/lib
90+
includedir=${prefix}/include
91+
92+
Name: bzip2
93+
Description: bzip2 compression library
94+
Version: 1.0.8
95+
Libs: -L${libdir} -lbz2
96+
Cflags: -I${includedir}
97+
EOF
98+
99+
git clone --depth 1 https://gitlab.freedesktop.org/wlroots/wlroots.git /tmp/wlroots
100+
meson setup /tmp/wlroots /tmp/wlroots/build \
101+
-Dexamples=false -Dtests=false \
102+
-Dxwayland=enabled -Drenderers=gles2,vulkan -Dbackends=drm,libinput,x11
103+
ninja -C /tmp/wlroots/build
104+
meson install -C /tmp/wlroots/build
105+
rm -rf /tmp/wlroots
106+
meson setup build
107+
ninja -C build

meson.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ project(
66

77
add_project_arguments('-DWLR_USE_UNSTABLE', language: 'c')
88

9+
cc = meson.get_compiler('c')
10+
911
wayland_protos = dependency('wayland-protocols')
1012

1113
wlroots_version = ['>=0.21.0', '<0.22.0']
@@ -34,6 +36,13 @@ libs = [
3436
wayland_protos,
3537
]
3638

39+
if host_machine.system() == 'freebsd'
40+
libs += [
41+
cc.find_library('inotify'),
42+
cc.find_library('pthread')
43+
]
44+
endif
45+
3746
wl_protocol_dir = wayland_protos.get_variable('pkgdatadir')
3847

3948
wayland_scanner_dep = dependency('wayland-scanner', native: true)

src/ipc_subscribe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdlib.h>
66
#include <sys/stat.h>
77
#include <unistd.h>
8+
#include <string.h>
89

910
static subscriber_t *make_subscriber(int client_fd, char *fifo_path, subscriber_mask_t mask,
1011
int count) {

0 commit comments

Comments
 (0)