Added actions to build with clang

This commit is contained in:
Keith Bowes 2023-02-26 22:14:24 -05:00
parent f50ab866f9
commit e6bac6d366
3 changed files with 16 additions and 8 deletions

View file

@ -3,6 +3,8 @@
#
image: archlinux
packages:
- clang
- gcc
- libevdev
- libinput
- libxkbcommon
@ -17,7 +19,11 @@ sources:
tasks:
- setup: |
cd waybox
meson setup build
CC=gcc meson setup build-gcc
- build: |
cd waybox
ninja -C build
ninja -C build-gcc
- clang: |
cd waybox
CC=clang meson setup build-clang
ninja -C build-clang

View file

@ -16,12 +16,14 @@ jobs:
steps:
- name: packages
run: |
apk add gcc libevdev-dev libinput-dev libxkbcommon-dev libxml2-dev meson musl-dev wayland-dev wayland-protocols wlroots-dev xwayland
apk add clang gcc libevdev-dev libinput-dev libxkbcommon-dev libxml2-dev meson musl-dev wayland-dev wayland-protocols wlroots-dev xwayland
# actions/checkout@v3 clones the repository
- uses: actions/checkout@v3
- name: setup
- name: build-gcc
run: |
meson setup build
- name: build
CC=gcc meson setup build-gcc
ninja -C build-gcc
- name: build-clang
run: |
ninja -C build
CC=clang meson setup build-clang
ninja -C build-clang

View file

@ -67,7 +67,7 @@ void focus_view(struct wb_view *view, struct wlr_surface *surface) {
struct wlr_xdg_surface *previous =
wlr_xdg_surface_try_from_wlr_surface(prev_surface);
#else
struct wlr_xdg_surface *previous;
struct wlr_xdg_surface *previous = NULL;
if (wlr_surface_is_xdg_surface(prev_surface)) {
previous = wlr_xdg_surface_from_wlr_surface(prev_surface);
}