From e7dfe6d6996386bc3c15880e6b14ba5aca225587 Mon Sep 17 00:00:00 2001 From: lixiumei123 Date: Fri, 1 Jul 2022 03:39:15 +0000 Subject: [PATCH] Add cppcheck in ci --- .github/workflows/check.yml | 13 +++++++++++++ .github/workflows/ci.yml | 1 + 2 files changed, 14 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 716546a7..c679f900 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,6 +25,19 @@ jobs: clangFormatVersion: 10 style: file + cppcheck: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: cppcheck + run: | + sudo apt install cppcheck + cppcheck --enable=all --error-exitcode=2 --suppress=missingInclude --suppress=unusedFunction ./plugins ./simulator ./src + ut: runs-on: ubuntu-20.04 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3d81255..0c9059b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ jobs: cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/${{ matrix.arch[0] }}.cmake \ -DCMAKE_BUILD_TYPE=Release -DDISABLE_UT=ON make -j4 + - name: get version id: get_version run: echo "::set-output name=version::$(cat version)"