Skip to content

Feature/add process raw imu (#13) #5

Feature/add process raw imu (#13)

Feature/add process raw imu (#13) #5

Workflow file for this run

name: clang-format check
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Install clang-format
run: sudo apt-get install -y clang-format
- name: Run clang-format on C++ files
run: |
find . -name '*.cpp' -o -name '*.h' | xargs clang-format -i
- name: Check for changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "Auto format code with clang-format"
git push origin HEAD:${{ github.head_ref }}
else
echo "No formatting needed"
fi