Skip to content

Commit

Permalink
CI: add a cppcheck master config
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Oct 17, 2024
1 parent c72acef commit 6eed05e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .. -DCMAKE_BUILD_TYPE=Release
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:
Expand Down

0 comments on commit 6eed05e

Please sign in to comment.