diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4605601e..4422c4f6 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -81,7 +81,9 @@ jobs: 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 --inline-suppr --addon=misra.py firmware/libs/ + 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 diff --git a/.github/workflows/unit-test-ngham.yml b/.github/workflows/unit-test-ngham.yml index 5d54b390..fc4e77f8 100755 --- a/.github/workflows/unit-test-ngham.yml +++ b/.github/workflows/unit-test-ngham.yml @@ -1,32 +1,33 @@ # -# unit-test-ngham.yml +# test.yml # -# Copyright The TTC 2.0 Contributors. +# Copyright The RSCLib Contributors. # -# This file is part of TTC 2.0. +# This file is part of RSCLib. # -# 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 +# RSCLib is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser 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, +# RSCLib 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. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser 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 . +# You should have received a copy of the GNU Lesser General Public License +# along with RSCLib. If not, see . # # -name: NGHam unit tests +name: NGHam Unit test on: push: - branches: [dev_firmware] + branches: [ dev_firmware ] pull_request: - branches: [master, dev, dev_firmware] + branches: [ master, dev, dev_firmware] + # 'workflow_dispatch' allows manual execution of this workflow under the repository's 'Actions' tab workflow_dispatch: @@ -34,7 +35,7 @@ on: jobs: unit-tests: - name: NGHam unit tests + name: Unit tests runs-on: ubuntu-latest strategy: @@ -42,22 +43,21 @@ jobs: steps: - uses: actions/checkout@v3 + with: + submodules: true + - name: Install dependencies run: | sudo apt install -y cmake libcmocka0 libcmocka-dev - git clone https://github.com/mgm8/rsclib.git - cd rsclib - mkdir build - cd build - cmake .. - make - sudo make install + mkdir firmware/app/libs/ngham-1.0/tests/build_tests + cd firmware/app/libs/ngham-1.0/tests/build_tests + cmake ../ - name: Compile the test run: | - cd firmware/app/libs/ngham-0.1/tests - make + cd firmware/app/libs/ngham-1.0/tests/build_tests + cmake --build . - name: Execute the test - run: ./firmware/app/libs/ngham-0.1/tests/ngham_unit_test + run: ./firmware/app/libs/ngham-1.0/tests/build_tests/ngham_test diff --git a/.github/workflows/unit-test-rsclib.yml b/.github/workflows/unit-test-rsclib.yml index 6d844c2f..934eb624 100644 --- a/.github/workflows/unit-test-rsclib.yml +++ b/.github/workflows/unit-test-rsclib.yml @@ -1,32 +1,33 @@ # -# unit-test-rsclib.yml +# test.yml # -# Copyright The TTC 2.0 Contributors. +# Copyright The RSCLib Contributors. # -# This file is part of TTC 2.0. +# This file is part of RSCLib. # -# 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 +# RSCLib is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser 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, +# RSCLib 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. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser 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 . +# You should have received a copy of the GNU Lesser General Public License +# along with RSCLib. If not, see . # # -name: RSCLib unit tests +name: RSCLib Unit tests on: push: - branches: [dev_firmware] + branches: [ dev_firmware ] pull_request: - branches: [master, dev, dev_firmware] + branches: [ master, dev, dev_firmware] + # 'workflow_dispatch' allows manual execution of this workflow under the repository's 'Actions' tab workflow_dispatch: @@ -34,7 +35,7 @@ on: jobs: unit-tests: - name: RSCLib unit tests + name: Unit tests runs-on: ubuntu-latest strategy: @@ -48,9 +49,9 @@ jobs: - name: Compile the test run: | - cd firmware/app/libs/rsclib-0.1/tests + cd firmware/app/libs/ngham-1.0/rsclib/tests cmake . make - name: Execute the test - run: ./firmware/app/libs/rsclib-0.1/tests/rsc_test + run: ./firmware/app/libs/ngham-1.0/rsclib/tests/rsc_test \ No newline at end of file diff --git a/firmware/.cproject b/firmware/.cproject index cf1dda38..a1b9112e 100644 --- a/firmware/.cproject +++ b/firmware/.cproject @@ -15,38 +15,36 @@ - - + + + - + @@ -127,64 +160,64 @@ -