2021-04-01 23:08:40 +08:00
|
|
|
name: Run clang-tidy on the full codebase
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
clang_tidy_check:
|
|
|
|
name: "Clang-tidy check"
|
|
|
|
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
|
|
|
|
env:
|
|
|
|
THREADS: 24
|
2021-10-03 17:09:57 +08:00
|
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
2021-04-01 23:08:40 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up repository
|
2024-01-31 05:52:56 +08:00
|
|
|
uses: actions/checkout@v4
|
2021-04-01 23:08:40 +08:00
|
|
|
with:
|
|
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
|
|
# branches and tags. (default: 1)
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Build debug binaries
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2021-04-01 23:08:40 +08:00
|
|
|
|
|
|
|
# Initialize dependencies.
|
|
|
|
./init
|
|
|
|
|
|
|
|
# Build debug binaries.
|
|
|
|
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j$THREADS
|
|
|
|
|
|
|
|
- name: Run clang-tidy
|
|
|
|
run: |
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2021-04-01 23:08:40 +08:00
|
|
|
|
|
|
|
# The results are also written to standard output in order to retain them in the logs
|
2022-01-18 19:51:27 +08:00
|
|
|
./tools/github/clang-tidy/run-clang-tidy.py -p build -j $THREADS -clang-tidy-binary=/opt/toolchain-v4/bin/clang-tidy "$PWD/src/*" |
|
2021-04-01 23:08:40 +08:00
|
|
|
tee ./build/full_clang_tidy_output.txt
|
|
|
|
|
|
|
|
- name: Summarize clang-tidy results
|
|
|
|
run: cat ./build/full_clang_tidy_output.txt | ./tools/github/clang-tidy/count_errors.sh
|