45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
|
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
|
|
name: clang-tidy
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-20.04]
|
|
fail-fast: false # Prefer quick result
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install missing software
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install z3 libz3-dev
|
|
sudo apt-get install clang-tidy
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
with:
|
|
modules: 'qtcharts'
|
|
|
|
- name: Prepare CMake
|
|
run: |
|
|
mkdir cmake.output
|
|
cd cmake.output
|
|
# cannot include GUI since we need to generate the ui_*.h files first
|
|
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=Off -DWITH_QCHART=Off ..
|
|
cd ..
|
|
|
|
- name: Clang-Tidy
|
|
run: |
|
|
# make sure the precompiled headers exist
|
|
make -C cmake.output lib/CMakeFiles/lib_objs.dir/cmake_pch.hxx.cxx
|
|
make -C cmake.output test/CMakeFiles/testrunner.dir/cmake_pch.hxx.cxx
|
|
cmake --build cmake.output --target run-clang-tidy 2> /dev/null
|