2021-04-18 21:51:47 +02:00
|
|
|
# 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:
|
|
|
|
|
2021-04-24 20:20:09 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-04-18 21:51:47 +02:00
|
|
|
|
2021-04-24 20:20:09 +02:00
|
|
|
container:
|
2021-10-24 11:07:45 +02:00
|
|
|
image: "ubuntu:21.10"
|
2021-04-18 21:51:47 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install missing software
|
|
|
|
run: |
|
2021-04-24 20:20:09 +02:00
|
|
|
apt-get update
|
|
|
|
apt-get install -y cmake g++ make
|
|
|
|
apt-get install -y z3 libz3-dev
|
|
|
|
apt-get install -y libpcre3-dev
|
2021-10-31 20:15:32 +01:00
|
|
|
apt-get install -y libffi7 # work around missing dependency for Qt install step
|
2021-04-24 20:20:09 +02:00
|
|
|
apt-get install -y software-properties-common
|
|
|
|
add-apt-repository universe
|
|
|
|
apt-get update
|
2021-10-24 11:07:45 +02:00
|
|
|
apt-get install -y clang-tidy-13
|
2021-04-24 20:20:09 +02:00
|
|
|
|
2021-10-31 20:15:32 +01:00
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v2
|
|
|
|
with:
|
|
|
|
install-deps: 'nosudo'
|
|
|
|
version: '5.15.2'
|
|
|
|
modules: 'qtcharts'
|
2021-04-18 21:51:47 +02:00
|
|
|
|
|
|
|
- name: Prepare CMake
|
|
|
|
run: |
|
|
|
|
mkdir cmake.output
|
|
|
|
cd cmake.output
|
2021-10-31 20:15:32 +01:00
|
|
|
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On ..
|
2021-04-18 21:51:47 +02:00
|
|
|
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
|
2021-10-31 20:15:32 +01:00
|
|
|
make -C cmake.output autogen
|
2021-04-18 21:51:47 +02:00
|
|
|
cmake --build cmake.output --target run-clang-tidy 2> /dev/null
|