-
Notifications
You must be signed in to change notification settings - Fork 177
59 lines (56 loc) · 3.63 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
jobs:
test_musl_gcc:
name: "Test with GCC/musl/libstdc++/BFD on Alpine Linux"
runs-on: ubuntu-latest
container: alpine:latest
steps:
- run: apk --no-cache add git gcc g++ binutils pkgconf meson ninja musl-dev wayland-protocols libinput-dev libevdev-dev libxkbcommon-dev pixman-dev glm-dev libdrm-dev mesa-dev cairo-dev pango-dev eudev-dev libxml2-dev libseat-dev libxcb-dev xcb-util-wm-dev xwayland doctest doctest-dev cmake libdisplay-info-dev hwdata-dev nlohmann-json
- run: cd $GITHUB_WORKSPACE && git clone https://gitlab.freedesktop.org/wayland/wayland && cd wayland && git checkout 1.23.0 && meson setup build -Ddocumentation=false -Dtests=false --prefix=/usr && ninja -C build && ninja -C build install && cd ..
- run: git config --global --add safe.directory /__w/wayfire/wayfire
- run: git config --global --add safe.directory /__w/wayfire/wayfire/wayland
- run: git config --global --add safe.directory $GITHUB_WORKSPACE
- run: git config --global --add safe.directory /home/runner/work/wayfire/wayfire/wayland/
- uses: actions/checkout@v1
- run: git config --global --add safe.directory /__w/wayfire/wayfire
- run: git submodule sync --recursive && git submodule update --init --force --recursive
- run: (cd subprojects/wlroots && meson build --prefix=/usr && ninja -C build install)
- run: meson build -Dtests=enabled -Db_pch=true -Duse_system_wlroots=enabled
- run: ninja -v -Cbuild
- run: ninja -v -Cbuild test
test_glibc_llvm:
name: "Test with clang/glibc/libc++/lld on Arch Linux"
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- run: sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
- run: pacman --noconfirm --noprogressbar -Syyu
- run: pacman-key --init
- run: pacman-key --recv-key 7DD85120C491D581 --keyserver keyserver.ubuntu.com
- run: pacman-key --lsign-key 7DD85120C491D581
- run: printf '[stefanwimmer128]\nServer = https://repo.stefanwimmer128.xyz/$repo/$arch/' >> /etc/pacman.conf
- run: pacman --noconfirm --noprogressbar -Syyu
- run: pacman --noconfirm --noprogressbar -Sy git clang17 lld libc++ pkgconf cmake meson ninja wayland wayland-protocols libinput libxkbcommon pixman glm libdrm libglvnd cairo pango systemd scdoc base-devel seatd hwdata libdisplay-info openmp nlohmann-json
# Build Wayfire
- uses: actions/checkout@v1
- run: git config --global --add safe.directory /__w/wayfire/wayfire
- run: git submodule sync --recursive && git submodule update --init --force --recursive
- run: find /usr/bin/ | grep clang
- run: (cd subprojects/wlroots && env CC=clang-17 CXX=clang++-17 CXXFLAGS="-stdlib=libc++" LDFLAGS="-fuse-ld=lld -stdlib=libc++" meson build --prefix=/usr && ninja -C build install)
- run: env CC=clang-17 CXX=clang++-17 CXXFLAGS="-stdlib=libc++" LDFLAGS="-fuse-ld=lld -stdlib=libc++" meson build -Db_pch=true -Duse_system_wlroots=enabled --unity on
- run: ninja -v -Cbuild
- run: ninja -v -Cbuild test
test_code_style:
name: "Check code style with uncrustify"
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update
- run: sudo apt-get install -y git cmake gcc make
- uses: actions/checkout@v1
- run: git clone http://github.com/ammen99/uncrustify
- run: cd uncrustify && mkdir build && cd build && cmake ../ && make && cd ../../
- run: git ls-files | grep "hpp$\|cpp$" | xargs ./uncrustify/build/uncrustify -c uncrustify.ini --no-backup --replace
- run: git diff
- run: git diff | diff - /dev/null &> /dev/null