From 9e63dcfb161122dc901f652ba919fe404c0c03d4 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 26 Dec 2024 19:59:48 -0800 Subject: [PATCH] [ci] Install wpiformat into venv (#7596) --- .github/workflows/lint-format.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index d787d9c729..3929d9cd40 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -34,9 +34,11 @@ jobs: with: python-version: '3.12' - name: Install wpiformat - run: pip3 install wpiformat==2024.51 + run: | + python -m venv ${{ runner.temp }}/wpiformat + ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2024.51 - name: Run - run: wpiformat + run: ${{ runner.temp }}/wpiformat/bin/wpiformat - name: Check output run: git --no-pager diff --exit-code HEAD - name: Generate diff @@ -74,18 +76,20 @@ jobs: with: python-version: '3.12' - name: Install wpiformat - run: pip3 install wpiformat==2024.51 + run: | + python -m venv ${{ runner.temp }}/wpiformat + ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2024.51 - name: Create compile_commands.json run: | ./gradlew generateCompileCommands -Ptoolchain-optional-roboRio ./.github/workflows/fix_compile_commands.py build/TargetedCompileCommands/linuxx86-64release/compile_commands.json ./.github/workflows/fix_compile_commands.py build/TargetedCompileCommands/linuxx86-64debug/compile_commands.json - name: List changed files - run: wpiformat -list-changed-files + run: ${{ runner.temp }}/wpiformat/bin/wpiformat -list-changed-files - name: Run clang-tidy release - run: wpiformat -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64release -vv + run: ${{ runner.temp }}/wpiformat/bin/wpiformat -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64release -vv - name: Run clang-tidy debug - run: wpiformat -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64debug -vv + run: ${{ runner.temp }}/wpiformat/bin/wpiformat -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64debug -vv javaformat: name: "Java format" runs-on: ubuntu-22.04