This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
Add step test data collection procedure #665
Workflow file for this run
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: | |
branches-ignore: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
wpiformat: | |
name: "wpiformat" | |
runs-on: ubuntu-22.04 | |
container: wpilib/roborio-cross-ubuntu:2023-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch all history and metadata | |
run: | | |
git config --global --add safe.directory /__w/sysid/sysid | |
git fetch --prune --unshallow | |
git checkout -b pr | |
git branch -f main origin/main | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install wpiformat | |
run: pip3 install wpiformat | |
- name: Run | |
run: wpiformat | |
- name: Check output | |
run: git --no-pager diff --exit-code HEAD | |
- name: Generate diff | |
run: git diff HEAD > wpiformat-fixes.patch | |
if: ${{ failure() }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wpiformat fixes | |
path: wpiformat-fixes.patch | |
if: ${{ failure() }} | |
tidy: | |
name: "clang-tidy" | |
runs-on: ubuntu-22.04 | |
container: wpilib/roborio-cross-ubuntu:2023-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch all history and metadata | |
run: | | |
git config --global --add safe.directory /__w/sysid/sysid | |
git fetch --prune --unshallow | |
git checkout -b pr | |
git branch -f main origin/main | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install wpiformat | |
run: pip3 install wpiformat | |
- name: Create compile_commands.json | |
run: ./gradlew generateCompileCommands -Ptoolchain-optional-roboRio -PwithIntegration -PskipDesktopRobots | |
- name: List changed files | |
run: wpiformat -list-changed-files | |
- name: Run clang-tidy | |
run: wpiformat -no-format -tidy-changed -compile-commands=build/compile_commands/linuxx86-64 -vv |