Skip to content

Commit d9ab61c

Browse files
committed
CI: add basic one
1 parent 11a7575 commit d9ab61c

File tree

2 files changed

+211
-0
lines changed

2 files changed

+211
-0
lines changed

.github/workflows/build.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Void-musl images:
2+
# https://github.com/void-linux/void-containers/pkgs/container/void-musl
3+
#
4+
# Void dependencies based on:
5+
# https://github.com/void-linux/void-packages/blob/master/srcpkgs/labwc/template
6+
#
7+
# Recommended GH CI Void mirror based on
8+
# https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html
9+
10+
name: CI
11+
on: [pull_request]
12+
jobs:
13+
build:
14+
name: Build
15+
timeout-minutes: 20
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
name: [
20+
Arch,
21+
Debian,
22+
FreeBSD,
23+
Void-musl
24+
]
25+
include:
26+
- name: Arch
27+
os: ubuntu-latest
28+
container: archlinux:base-devel
29+
env:
30+
TARGET: 'sh -xe'
31+
32+
- name: Debian
33+
os: ubuntu-latest
34+
container: debian:testing
35+
env:
36+
TARGET: 'sh -xe'
37+
38+
- name: FreeBSD
39+
os: ubuntu-latest
40+
env:
41+
TARGET: 'ssh freebsd /bin/sh -xe'
42+
43+
- name: Void-musl
44+
os: ubuntu-latest
45+
container: ghcr.io/void-linux/void-musl:latest
46+
env:
47+
TARGET: 'sh -xe'
48+
49+
env: ${{ matrix.env }}
50+
runs-on: ${{ matrix.os }}
51+
container: ${{ matrix.container }}
52+
53+
steps:
54+
- uses: actions/checkout@v1
55+
56+
- name: Install Arch Linux dependencies
57+
if: matrix.name == 'Arch'
58+
run: |
59+
pacman-key --init
60+
pacman -Syu --noconfirm
61+
pacman -S --noconfirm git meson clang wlroots libdrm libinput \
62+
wayland-protocols cairo pango libxml2 xorg-xwayland librsvg libdisplay-info
63+
64+
- name: Install Debian Testing dependencies
65+
if: matrix.name == 'Debian'
66+
run: |
67+
sed -i '/^Types/ s/deb/& deb-src/' /etc/apt/sources.list.d/debian.sources
68+
apt-get update
69+
apt-get upgrade -y
70+
apt-get install -y git gcc clang
71+
apt-get build-dep -y labwc
72+
73+
- name: Install FreeBSD dependencies
74+
if: matrix.name == 'FreeBSD'
75+
uses: vmactions/freebsd-vm@v1
76+
with:
77+
usesh: true
78+
prepare: |
79+
sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
80+
pkg set -yn pkg:mesa-dri # hack to skip llvm dependency
81+
pkg install -y git meson gcc pkgconf cairo pango evdev-proto \
82+
hwdata wayland-protocols wlroots libdisplay-info
83+
run: echo "setup done"
84+
85+
- name: Install Void Linux dependencies
86+
if: matrix.name == 'Void-musl'
87+
run: |
88+
mkdir -p /etc/xbps.d
89+
cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
90+
sed -i "s:repo-default\.voidlinux\.org:repo-ci.voidlinux.org:g" \
91+
/etc/xbps.d/*-repository-*.conf
92+
xbps-install -Syu || xbps-install -yu xbps
93+
xbps-install -Syu
94+
xbps-install -y git meson gcc clang pkg-config scdoc \
95+
cairo-devel glib-devel libpng-devel librsvg-devel libxml2-devel \
96+
pango-devel wlroots0.17-devel
97+
98+
- name: Build with gcc
99+
run: |
100+
echo '
101+
cd "$GITHUB_WORKSPACE"
102+
export CC=gcc
103+
make clean
104+
make
105+
' | $TARGET
106+
107+
- name: Build with clang
108+
run: |
109+
echo '
110+
cd "$GITHUB_WORKSPACE"
111+
export CC=clang
112+
make clean
113+
make
114+
' | $TARGET

.github/workflows/irc.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: "IRC Notifications"
2+
on:
3+
create:
4+
pull_request:
5+
types: [opened, closed, reopened]
6+
issues:
7+
types: [opened, closed, reopened]
8+
push:
9+
branches:
10+
- 'master_disabled'
11+
- 'v0.5_disabled'
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: irc push
18+
uses: rectalogic/notify-irc@v1
19+
if: github.event_name == 'push'
20+
with:
21+
server: "irc.libera.chat"
22+
channel: "#labwc"
23+
nickname: "labwc"
24+
notice: true
25+
message: "[${{ github.event.ref }}] ${{ github.actor }} pushed new commits: ${{ github.event.compare }}"
26+
- name: irc issue opened
27+
uses: rectalogic/notify-irc@v1
28+
if: github.event_name == 'issues' && github.event.action == 'opened'
29+
with:
30+
server: "irc.libera.chat"
31+
channel: "#labwc"
32+
nickname: "labwc"
33+
notice: true
34+
message: "${{ github.actor }} opened issue '${{ github.event.issue.title }}' (${{ github.event.issue.html_url }})"
35+
- name: irc issue reopened
36+
uses: rectalogic/notify-irc@v1
37+
if: github.event_name == 'issues' && github.event.action == 'reopened'
38+
with:
39+
server: "irc.libera.chat"
40+
channel: "#labwc"
41+
nickname: "labwc"
42+
notice: true
43+
message: "${{ github.actor }} reopened issue: '${{ github.event.issue.title }}' (${{ github.event.issue.html_url }})"
44+
- name: irc issue closed
45+
uses: rectalogic/notify-irc@v1
46+
if: github.event_name == 'issues' && github.event.action == 'closed'
47+
with:
48+
server: "irc.libera.chat"
49+
channel: "#labwc"
50+
nickname: "labwc"
51+
notice: true
52+
message: "${{ github.actor }} closed issue '${{ github.event.issue.title }}' (${{ github.event.issue.html_url }})"
53+
- name: irc pull request opened
54+
uses: rectalogic/notify-irc@v1
55+
if: github.event_name == 'pull_request' && github.event.action == 'opened'
56+
with:
57+
server: "irc.libera.chat"
58+
channel: "#labwc"
59+
nickname: "labwc"
60+
notice: true
61+
message: "[${{ github.event.pull_request.base.ref }}] ${{ github.actor }} opened PR '${{ github.event.pull_request.title }}' (${{ github.event.pull_request.html_url }})"
62+
- name: irc pull request reopened
63+
uses: rectalogic/notify-irc@v1
64+
if: github.event_name == 'pull_request' && github.event.action == 'reopened'
65+
with:
66+
server: "irc.libera.chat"
67+
channel: "#labwc"
68+
nickname: "labwc"
69+
notice: true
70+
message: "[${{ github.event.pull_request.base.ref }}] ${{ github.actor }} reopened PR '${{ github.event.pull_request.title }}' (${{ github.event.pull_request.html_url }})"
71+
- name: irc pull request merged
72+
uses: rectalogic/notify-irc@v1
73+
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
74+
with:
75+
server: "irc.libera.chat"
76+
channel: "#labwc"
77+
nickname: "labwc"
78+
notice: true
79+
message: "[${{ github.event.pull_request.base.ref }}] ${{ github.actor }} merged PR '${{ github.event.pull_request.title }}' (${{ github.event.pull_request.html_url }})"
80+
- name: irc pull request closed
81+
uses: rectalogic/notify-irc@v1
82+
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == false
83+
with:
84+
server: "irc.libera.chat"
85+
channel: "#labwc"
86+
nickname: "labwc"
87+
notice: true
88+
message: "[${{ github.event.pull_request.base.ref }}] ${{ github.actor }} closed PR '${{ github.event.pull_request.title }}' (${{ github.event.pull_request.html_url }})"
89+
- name: irc tag created
90+
uses: rectalogic/notify-irc@v1
91+
if: github.event_name == 'create' && github.event.ref_type == 'tag'
92+
with:
93+
server: "irc.libera.chat"
94+
channel: "#labwc"
95+
nickname: "labwc"
96+
notice: true
97+
message: "${{ github.actor }} tagged ${{ github.repository }}: ${{ github.event.ref }}"

0 commit comments

Comments
 (0)