Skip to content

๐Ÿ— Use libc++ for clang-tidy, clang 17 for CodeQL #99

๐Ÿ— Use libc++ for clang-tidy, clang 17 for CodeQL

๐Ÿ— Use libc++ for clang-tidy, clang 17 for CodeQL #99

name: clang-tidy-push
on: [push, workflow_dispatch]
jobs:
static-analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Clang
env:
CLANG_VERSION: ${{ vars.CLANG_VERSION }}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh $CLANG_VERSION all
sudo ln -f -s /usr/bin/clang-$CLANG_VERSION /usr/local/bin/cc
sudo ln -f -s /usr/bin/clang++-$CLANG_VERSION /usr/local/bin/c++
sudo ln -f -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/local/bin/clang-tidy
- name: Prepare compile_commands.json
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_CXX_FLAGS=-stdlib=libc++
ln -s ${{github.workspace}}/build/compile_commands.json ${{github.workspace}}
- name: Run analysis
run: |
find mays -name '*.cc' -o -name '*.h' | xargs -P0 -I {} clang-tidy {}