summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-12-15 01:24:11 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-12-15 01:57:06 +0100
commitc6df798b68ab2e6f053cb6701e67203faac5eb9e (patch)
tree7ca0cee0b410c5259b5a4f36c7d4f7371da7353b /.github
parentc73d259b69304e832d157717dc5d33f8d629e6a5 (diff)
GitHub Actions: Add clang-tidy to build-checks workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-checks.yml43
1 files changed, 37 insertions, 6 deletions
diff --git a/.github/workflows/build-checks.yml b/.github/workflows/build-checks.yml
index 68ed7224cd..11672b71d5 100644
--- a/.github/workflows/build-checks.yml
+++ b/.github/workflows/build-checks.yml
@@ -1,12 +1,18 @@
-name: clazy
+name: build-checks
on:
push:
pull_request:
jobs:
- clazy:
+ build-checks:
+ strategy:
+ matrix:
+ include:
+ - name: clazy
+ - name: clang-tidy
runs-on: ubuntu-20.04
+ name: ${{ matrix.name }}
steps:
- name: Check out repository
uses: actions/checkout@v2
@@ -46,10 +52,12 @@ jobs:
qtscript5-dev \
qt5keychain-dev \
clazy \
+ clang-tidy \
cmake
- name: Create build directory
- run: mkdir cmake_build
- - name: Configure
+ run: mkdir build
+ - name: Configure (clazy)
+ if: matrix.name == 'clazy'
# Disable optimizations as workaround for Clang 9 bug: https://bugs.llvm.org/show_bug.cgi?id=45034
run: |
cmake \
@@ -71,17 +79,40 @@ jobs:
-DMODPLUG=ON \
-DWAVPACK=ON \
..
- working-directory: cmake_build
+ working-directory: build
env:
LD: clang++
CC: clang
CXX: clazy
+ - name: Configure (clang-tidy)
+ if: matrix.name == 'clang-tidy'
+ run: |
+ cmake \
+ -DCMAKE_BUILD_TYPE=Debug \
+ -DCLANG_TIDY=clang-tidy \
+ -DWARNINGS_FATAL=ON \
+ -DBATTERY=ON \
+ -DBROADCAST=ON \
+ -DBULK=ON \
+ -DHID=ON \
+ -DLILV=ON \
+ -DOPUS=ON \
+ -DQTKEYCHAIN=ON \
+ -DVINYLCONTROL=ON \
+ -DFFMPEG=ON \
+ -DKEYFINDER=ON \
+ -DLOCALECOMPARE=ON \
+ -DMAD=ON \
+ -DMODPLUG=ON \
+ -DWAVPACK=ON \
+ ..
+ working-directory: build
- name: Set up problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Build
# Do not abort on errors and build/check the whole project
run: cmake --build . -j $(nproc) -- --keep-going
- working-directory: cmake_build
+ working-directory: build
env:
CLAZY_CHECKS: level2,no-rule-of-two-soft,no-non-pod-global-static,no-qproperty-without-notify,no-wrong-qevent-cast,no-qstring-allocations,no-function-args-by-value,no-copyable-polymorphic,no-ctor-missing-parent-argument,no-missing-qobject-macro,no-rule-of-three,no-returning-void-expression,no-missing-typeinfo,no-base-class-event
CLAZY_IGNORE_DIRS: lib/.*