forked from labwc/labwc
-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (134 loc) · 4.55 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
# Void-musl images:
# https://github.com/void-linux/void-docker/pkgs/container/void-linux/versions
#
# Void dependencies based on:
# https://github.com/void-linux/void-packages/blob/master/srcpkgs/wlroots/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
build:
name: Build
needs: codestyle
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: macos-12
env:
TARGET: 'ssh freebsd /bin/sh -xe'
- name: Void-musl
os: ubuntu-latest
container: ghcr.io/void-linux/void-linux:latest-thin-x86_64-musl
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
- name: Install Debian Testing dependencies
if: matrix.name == 'Debian'
run: |
sed '/^deb/ s/^deb/deb-src/' /etc/apt/sources.list > /tmp/src
cat /tmp/src >> /etc/apt/sources.list
apt-get update
apt-get upgrade -y
apt-get install -y git clang \
hwdata \
libxml2-dev libcairo2-dev libpango1.0-dev
apt-get build-dep -y wlroots
- name: Install FreeBSD dependencies
if: matrix.name == 'FreeBSD'
uses: vmactions/freebsd-vm@v0
with:
usesh: true
prepare: |
sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
pkg install -y git meson gcc pkgconf cairo pango evdev-proto \
wayland-protocols wlroots
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 wlroots libxml2-devel \
wayland-devel glslang libgbm-devel libglvnd-devel libseat-devel \
eudev-libudev-devel libdrm-devel libinput-devel libxkbcommon-devel \
pixman-devel wayland-devel wayland-protocols xcb-util-errors-devel \
xcb-util-wm-devel xcb-util-renderutil-devel libxcb-devel \
xcb-util-cursor-devel xcb-util-devel xcb-util-image-devel \
xcb-util-keysyms-devel xcb-util-xrm-devel xorg-server-xwayland \
hwids \
libglib-devel cairo-devel pango-devel
- name: Build with gcc
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=gcc
meson build-gcc -Dxwayland=enabled --werror
meson compile -C build-gcc
' | $TARGET
- name: Build with clang
run: |
echo '
cd "$GITHUB_WORKSPACE"
export CC=clang
meson 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 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 build-clang-no-xwayland -Dxwayland=disabled --werror
meson compile -C build-clang-no-xwayland
' | $TARGET