From df8565a86af489410dae442951df999b8f7121be Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 17 Oct 2024 19:48:43 +0200 Subject: [PATCH] CI: add a cppcheck master config --- .github/workflows/code_checks.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml index 29b0129814a7..45bd10e2c696 100644 --- a/.github/workflows/code_checks.yml +++ b/.github/workflows/code_checks.yml @@ -65,6 +65,40 @@ jobs: cd build ../scripts/cppcheck.sh + cppcheck_master: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - name: Install Requirements + run: | + sudo apt update + sudo apt install -y git libsqlite3-dev ccache sqlite3 libproj-dev cmake g++ make + + - name: Build cppcheck + run: | + git clone https://github.com/danmar/cppcheck + cd cppcheck + mkdir build + cd build + cmake .. + make -j$(nproc) + sudo make install + cd ../.. + + - name: Run cmake + run: | + mkdir build + cd build + cmake .. + + - name: Run cppcheck test + run: | + cd build + # Do not fail the job. This is just used as a tool to monitor how we are regarding recent cppcheck + ../scripts/cppcheck.sh || /bin/true + code_quality_checks: runs-on: ubuntu-latest steps: