Skip to content

Commit f86e9e5

Browse files
committed
ci: add NetBSD build workflow
Signed-off-by: Carl.Zhang <carl.zhang@intel.com>
1 parent f13ba3b commit f86e9e5

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/netbsd.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: netbsd
2+
3+
permissions:
4+
contents: read
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
netbsd:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 'Checkout'
13+
uses: actions/checkout@v7
14+
- name: 'Install prerequisites and build'
15+
uses: vmactions/netbsd-vm@v1
16+
with:
17+
prepare: |
18+
set -e
19+
# meson, pkgconf and wayland come from pkgsrc.
20+
/usr/sbin/pkg_add -v meson pkgconf wayland
21+
# libdrm and the X11 libs are part of NetBSD's base X11 distribution,
22+
# not pkgsrc: xbase holds the shared libs, xcomp the headers and
23+
# pkg-config files. The CI image ships neither, so fetch and unpack
24+
# them into / (libdrm.pc is 2.4.109, satisfying meson's >= 2.4.75).
25+
sets="https://cdn.NetBSD.org/pub/NetBSD/NetBSD-$(uname -r)/$(uname -m)/binary/sets"
26+
for set in xbase xcomp; do
27+
ftp -o "/tmp/$set.tar.xz" "$sets/$set.tar.xz"
28+
xzcat "/tmp/$set.tar.xz" | tar -xpf - -C /
29+
done
30+
run: |
31+
# pkgsrc deps live under /usr/pkg; the base-system DRM/X11 backend
32+
# deps live under /usr/X11R7 -- make pkg-config search both.
33+
export PKG_CONFIG_PATH="/usr/pkg/lib/pkgconfig:/usr/X11R7/lib/pkgconfig"
34+
meson setup _build -D werror=true
35+
meson compile -C _build
36+
meson install -C _build

0 commit comments

Comments
 (0)