Initial Swerve Implementation and Refactor Wombat #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Format | |
on: | |
pull_request: | |
push: | |
jobs: | |
wpiformat: | |
name: "wpiformat" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch all history and metadata | |
run: | | |
git config --global --add safe.directory /__w/allwpilib/allwpilib | |
git fetch --prune --unshallow | |
git checkout -b pr | |
git branch -f master origin/master | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install clang-format | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo sh -c "echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main' >> /etc/apt/sources.list.d/proposed-repositories.list" | |
sudo apt-get update -q | |
sudo apt-get install -y clang-format-14 | |
- name: Install wpiformat | |
run: pip3 install wpiformat | |
- name: Run | |
run: wpiformat | |
- name: Check output | |
run: git --no-pager diff --exit-code HEAD |