diff --git a/.github/workflows/embedded_c_quality_check.yml b/.github/workflows/embedded_c_quality_check.yml new file mode 100644 index 0000000..8fbbb8e --- /dev/null +++ b/.github/workflows/embedded_c_quality_check.yml @@ -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 + \ No newline at end of file