srctree

Robin Linden parent ff64f65e 79beaaa0
ci: Set up a clang-tidy job

inlinesplit
.github/workflows/ci.yaml added: 14, removed: 1, total 13
@@ -164,6 +164,19 @@ jobs:
- name: Check
run: git diff --exit-code
 
clang-tidy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update && sudo apt-get install --no-install-recommends clang-tidy-14
- run: echo "CC=clang-14" >>$GITHUB_ENV && echo "CXX=clang++-14" >>$GITHUB_ENV
# Make sure all generated files are around so clang-tidy doesn't get
# confused by missing headers.
- run: bazel build `bazel query 'kind("genrule", "...")'`
- run: bazel run refresh_compile_commands
# TODO(robinlinden): Also check header files.
- run: run-clang-tidy-14 -quiet `find . -name "*.cpp"`
 
buildifier:
runs-on: ubuntu-22.04
steps: