[build] Upgrade clang-format and clang-tidy (NFC) (#3422)

This commit is contained in:
Tyler Veness
2021-06-10 11:13:09 -07:00
committed by GitHub
parent 099fde97d5
commit a77c6ff3a2
29 changed files with 66 additions and 48 deletions

View File

@@ -22,17 +22,17 @@ jobs:
with:
python-version: 3.8
- name: Install clang-format
run: sudo apt-get update -q && sudo apt-get install -y clang-format-10
run: sudo apt-get update -q && sudo apt-get install -y clang-format-12
- name: Install wpiformat
run: pip3 install wpiformat
- name: Run
run: wpiformat -clang 10
run: wpiformat -clang 12
- name: Check Output
run: git --no-pager diff --exit-code HEAD
tidy:
name: "clang-tidy"
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2020-20.04
container: wpilib/roborio-cross-ubuntu:2021-20.04
steps:
- uses: actions/checkout@v2
- name: Fetch all history and metadata
@@ -40,8 +40,16 @@ jobs:
git fetch --prune --unshallow
git checkout -b pr
git branch -f main origin/main
- name: Install clang-format and clang-tidy
run: sudo apt-get update -q && sudo apt-get install -y clang-format-10 clang-tidy-10 python3.8
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install clang-tidy
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 12
sudo apt-get install -y clang-tidy-12
- name: Install wpiformat
run: pip3 install wpiformat
- name: Create compile_commands.json
@@ -49,4 +57,4 @@ jobs:
- name: List changed files
run: wpiformat -list-changed-files
- name: Run clang-tidy
run: wpiformat -clang 10 -no-format -tidy-changed -compile-commands=build-cmake
run: wpiformat -clang 12 -no-format -tidy-changed -compile-commands=build-cmake