From a7fb831035e66f66909d9a806388b3dc4afd226e Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sat, 18 Sep 2021 10:19:34 -0700 Subject: [PATCH] [ci] clang-tidy: Generate compilation commands DB with Gradle (#3585) --- .github/workflows/lint-format.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index b227fc5a35..9c6ef81acb 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -63,14 +63,12 @@ jobs: sudo apt-get install -y clang-tidy-12 clang-format-12 - name: Install wpiformat run: pip3 install wpiformat - - name: Install jinja - run: python -m pip install jinja2 - name: Create compile_commands.json - run: mkdir build-cmake && cd build-cmake && cmake -DWITH_OLD_COMMANDS=ON -DWITH_EXAMPLES=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=YES .. + run: ./gradlew generateCompileCommands -Ptoolchain-optional-roboRio - name: List changed files run: wpiformat -list-changed-files - name: Run clang-tidy - run: wpiformat -clang 12 -no-format -tidy-changed -compile-commands=build-cmake + run: wpiformat -clang 12 -no-format -tidy-changed -compile-commands=build/compile_commands/linuxx86-64 -vv spotless: name: "Spotless" runs-on: ubuntu-latest