Skip to content

Commit

Permalink
Merge pull request #11044 from rouault/cppcheck_master
Browse files Browse the repository at this point in the history
CI: add a cppcheck master config
  • Loading branch information
rouault authored Oct 22, 2024
2 parents 0d02779 + 6eed05e commit 4820fb5
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 4820fb5

Please sign in to comment.