Skip to content

CI check clang-format added #17

CI check clang-format added

CI check clang-format added #17

Workflow file for this run

name: BeeCom CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
format-check:
runs-on: ubuntu-latest
name: Check Code Formatting
steps:
- uses: actions/checkout@v2
- name: Set up clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format
- name: Run clang-format
run: |
# Find all C source files in Inc and Src directories and check formatting
find {Inc,Src} -type f \( -iname "*.c" -o -iname "*.h" \) -exec clang-format -style=file -i {} \;
# Check if any files have changed
git diff --exit-code || (echo "Code formatting issues found." && git diff && exit 1)
build:
needs: format-check
runs-on: ubuntu-latest
name: Build Project
steps:
- uses: actions/checkout@v2
- name: Set up environment
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi
sudo apt-get install -y make
- name: Build project
run: |
cd examples/STM32F407VE
make all