From 35c57a862ee8444508aea6dceb00057efc12b3a0 Mon Sep 17 00:00:00 2001 From: Quantum Date: Wed, 29 Sep 2021 04:51:08 -0400 Subject: [PATCH] [client] ci: check for improper usage of GL functions This runs gl-check on the CI and fails the build if broken. --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc9b4e8d..bf2cb091 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,8 @@ jobs: libgl-dev libgles-dev \ libx11-dev libxss-dev libxi-dev libxinerama-dev libxcursor-dev libxpresent-dev \ libwayland-dev wayland-protocols libxkbcommon-dev \ - $([ '${{ matrix.wayland_shell }}' = libdecor ] && echo 'libdecor-dev libdbus-1-dev') + $([ '${{ matrix.wayland_shell }}' = libdecor ] && echo 'libdecor-dev libdbus-1-dev') \ + $([ '${{ matrix.compiler.cc }}' = clang ] && echo 'clang-tools') sudo pip3 install pyenchant - name: Configure client env: @@ -41,6 +42,7 @@ jobs: cmake \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ -DCMAKE_LINKER:FILEPATH=/usr/bin/ld \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DENABLE_LIBDECOR=${{ matrix.wayland_shell == 'libdecor' }} \ .. - name: Build client @@ -49,6 +51,9 @@ jobs: make -j$(nproc) - name: Checking help spelling run: ./client/build/looking-glass-client --help | ./doc/lgspell.py + - name: Check GL function calls + if: matrix.compiler.cc == 'clang' + run: WAYLAND_SHELL='${{ matrix.wayland_shell }}' ./gl-check module: runs-on: ubuntu-latest