Skip to content

Fix clang tidy warnings #386

Fix clang tidy warnings

Fix clang tidy warnings #386

name: Clang-tidy
on:
push:
branches:
- main
pull_request:
jobs:
ubuntu-clang-tidy-build:
name: Build on Ubuntu with clang-tidy checks
runs-on: ubuntu-latest
strategy:
matrix:
clang-version: [14]
buildmode: [Debug]
steps:
- name: Checkout repository code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update && sudo apt install libcurl4-gnutls-dev ninja-build
- name: Install clang (with clang-tidy)
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.clang-version}}
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: |
clang-tidy --dump-config
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.buildmode}} -DCMAKE_CXX_COMPILER=clang++-${{matrix.clang-version}} -DCCT_ENABLE_CLANG_TIDY=ON -DCCT_ENABLE_ASAN=OFF -GNinja
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: ninja