Dev: Release v1.0 #159 #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# static-analysis-workflow.yml | |
# | |
# Copyright The TTC 2.0 Contributors. | |
# | |
# This file is part of TTC 2.0. | |
# | |
# TTC 2.0 is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# TTC 2.0 is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with TTC 2.0. If not, see <http://www.gnu.org/licenses/>. | |
# | |
# | |
name: Static Analysis | |
on: | |
push: | |
branches: [ dev_firmware ] | |
pull_request: | |
branches: [ master, dev, dev_firmware] | |
# 'workflow_dispatch' allows manual execution | |
# of this workflow under the repository's 'Actions' tab | |
workflow_dispatch: | |
jobs: | |
cppcheck-analysis: | |
name: cppcheck-analysis | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install CppCheck | |
run: sudo apt install -y cppcheck | |
- name: Execute CppCheck on tasks files | |
run: cppcheck --std=c99 --force --error-exitcode=-1 --addon=misra.py firmware/app/tasks/ | |
- name: Execute CppCheck on devices files | |
run: | | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/devices/antenna | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/devices/leds | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/devices/power_sensor | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/devices/temp_sensor | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/devices/watchdog | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/devices/obdh | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/devices/eps | |
- name: Execute CppCheck on drivers files | |
run: | | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/adc | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/flash | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/gpio | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/i2c | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/ina22x | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/isis_antenna | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/isr | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/spi | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/spi_slave | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/tca4311a | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/tps382x | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/uart | |
cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/drivers/wdt | |
- name: Execute CppCheck on system files | |
run: cppcheck --std=c99 --error-exitcode=-1 --inline-suppr --addon=misra.py firmware/system/ --suppress=misra-c2012-19.2 | |
- name: Execute CppCheck on libraries files | |
run: | | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py -I$PWD/firmware/app/libs/ngham-1.0/rsclib/include/ $PWD/firmware/app/libs/ngham-1.0/rsclib/src/* | |
cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py --inline-suppr -I$PWD/firmware/app/libs/ngham-1.0/include/ngham/ -I$PWD/firmware/app/libs/ngham-1.0/include/ $PWD/firmware/app/libs/ngham-1.0/src/* --suppress=misra-c2012-8.4 | |
- name: Execute CppCheck on main files | |
run: cppcheck --std=c99 --error-exitcode=-1 --addon=misra.py firmware/main.c firmware/version.h |