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 image: archlinux
packages: packages:
- clang
- gcc
- libevdev - libevdev
- libinput - libinput
- libxkbcommon - libxkbcommon
@ -17,7 +19,11 @@ sources:
tasks: tasks:
- setup: | - setup: |
cd waybox cd waybox
meson setup build CC=gcc meson setup build-gcc
- build: | - build: |
cd waybox 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: steps:
- name: packages - name: packages
run: | 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 # actions/checkout@v3 clones the repository
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: setup - name: build-gcc
run: | run: |
meson setup build CC=gcc meson setup build-gcc
- name: build ninja -C build-gcc
- name: build-clang
run: | 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 = struct wlr_xdg_surface *previous =
wlr_xdg_surface_try_from_wlr_surface(prev_surface); wlr_xdg_surface_try_from_wlr_surface(prev_surface);
#else #else
struct wlr_xdg_surface *previous; struct wlr_xdg_surface *previous = NULL;
if (wlr_surface_is_xdg_surface(prev_surface)) { if (wlr_surface_is_xdg_surface(prev_surface)) {
previous = wlr_xdg_surface_from_wlr_surface(prev_surface); previous = wlr_xdg_surface_from_wlr_surface(prev_surface);
} }