Skip to content

Commit

Permalink
Use venv for wpiformat
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed Dec 7, 2024
1 parent 44c7215 commit 5ccd9bd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/comment-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Install wpiformat
run: pip3 install --break-system-packages wpiformat==2024.45
run: |
python -m venv ${{ runner.temp }}/wpiformat
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2024.45
- name: Run wpiformat
run: wpiformat
run: ${{ runner.temp }}/wpiformat/bin/wpiformat
- name: Run spotlessApply
run: ./gradlew spotlessApply
- name: Commit
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
with:
python-version: '3.12'
- name: Install wpiformat
run: pip3 install --break-system-packages wpiformat==2024.45
run: |
python -m venv ${{ runner.temp }}/wpiformat
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2024.45
- name: Run
run: wpiformat
run: /__w/allwpilib/wpiformat/bin/wpiformat
- name: Check output
run: git --no-pager diff --exit-code HEAD
- name: Generate diff
Expand Down Expand Up @@ -66,18 +68,20 @@ jobs:
with:
python-version: '3.12'
- name: Install wpiformat
run: pip3 install --break-system-packages wpiformat==2024.45
run: |
python -m venv ${{ runner.temp }}/wpiformat
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2024.45
- 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-24.04
Expand Down

0 comments on commit 5ccd9bd

Please sign in to comment.