Merge pull request #4382 from rouault/fix_gdal_11650 #3651
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Checks | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
cppcheck_2204: | |
runs-on: ubuntu-22.04 | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Requirements | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends cppcheck | |
- name: Run cppcheck test | |
run: ./scripts/cppcheck.sh | |
cppcheck_master: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Requirements | |
run: | | |
sudo apt update | |
sudo apt install -y --no-install-recommends git 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 cppcheck test (on push events) | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
./scripts/cppcheck.sh | |
- name: Run cppcheck test, but ignore failures (on pull request) | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
# 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 | |
other_checks: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Requirements | |
run: | | |
sudo apt-get install -y --no-install-recommends python3-pip | |
sudo apt-get remove -y python3-jsonschema | |
sudo pip3 install --break-system-packages cffconvert | |
- name: Validate citation file | |
run: | | |
cffconvert --validate | |
cffconvert -f bibtex | |
cffconvert -f apalike |