Skip to content

Commit

Permalink
add embedded c quality workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonieFierz committed Mar 26, 2024
1 parent b5b5887 commit 8d0c5fa
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/embedded_c_quality_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Quality check

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
todo-check:
uses: sensirion/.github/workflows/todo_check.yml@main
with:
additional-excludes: --exclude=sensirion_i2c_hal.c --exclude-dir=sample-implementations

code-generation-check:
uses: sensirion/.github/.github/workflows/dg_metadata_check.yml@main

syntax-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: syntax-check
run: find . -type f -iregex ".*\.\(c\|h\|cpp\|ino\)" -exec clang-format-6.0 -i -style=file {} \; && git diff --exit-code

cppchecktest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: cppcheck
version: 1.0
- name: cppcheck
run: cppcheck --std=c89 --language=c --error-exitcode=1 --enable=warning,style,performance,portability --suppress=unreadVariable -i sample-implementations/ .

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rlalik/setup-cpp-compiler@master
with:
compiler: latest
- name: runbuild
run: cd example-usage && make

0 comments on commit 8d0c5fa

Please sign in to comment.