Add coding style check with clang-format to CI
This commit is contained in:
@@ -5,7 +5,7 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: zephyrprojectrtos/ci:v0.21.0
|
||||
container: zephyrprojectrtos/ci:latest
|
||||
env:
|
||||
CMAKE_PREFIX_PATH: /opt/toolchains
|
||||
steps:
|
||||
@@ -13,22 +13,21 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: charge-controller-firmware
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Initialize
|
||||
working-directory: charge-controller-firmware
|
||||
run: |
|
||||
pip3 install -U west
|
||||
west init -l .
|
||||
west update --narrow
|
||||
pip3 install -r ../zephyr/scripts/requirements-base.txt
|
||||
|
||||
- name: Trailing whitespace check
|
||||
- name: Coding style check
|
||||
working-directory: charge-controller-firmware
|
||||
run: |
|
||||
git diff --check `git rev-list --max-parents=0 HEAD`..HEAD
|
||||
apt-get update
|
||||
apt-get install -y clang-format-12 colordiff
|
||||
git status
|
||||
bash scripts/check-style.sh
|
||||
|
||||
- name: Build firmware
|
||||
working-directory: charge-controller-firmware
|
||||
|
||||
Reference in New Issue
Block a user