Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use compile_commands.json with clang-tidy #1183

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 8 additions & 40 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,17 @@ on: [pull_request]
jobs:
build:
name: clang-tidy
strategy:
matrix:
os: [ubuntu-latest]
compiler: [gcc]
build_type: [Debug]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Set base_dir
run: echo "base_dir=$(pwd)" >> $GITHUB_ENV

- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install GCC
if: ${{ matrix.compiler == 'gcc' }}
run: |
sudo apt-get install g++
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
cmake \
ninja-build \
python3 \
gettext \
qtbase5-dev \
libqt5svg5-dev \
libkf5archive-dev \
liblua5.3-dev \
libsqlite3-dev \
libsdl2-mixer-dev
- name: Configure
run: |
cmake . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=on
- name: Build
run: |
cmake --build build
- uses: ZedThree/[email protected]

- uses: ZedThree/[email protected]
id: review
with:
# Tell clang-tidy-review the base directory.
# This will get replaced by the new working
# directory inside the action
base_dir: ${{ matrix.base_dir }}
apt_packages: 'cmake,ninja-build,python3,g++,gettext,qtbase5-dev,libqt5svg5-dev,libkf5archive-dev,liblua5.3-dev,libsqlite3-dev,libsdl2-mixer-dev'

# Tell clang-tidy-review the build directory, so it finds the
# compilation database.
build_dir: build