Run cppcheck #421
This file contains hidden or 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: Run cppcheck | |
| on: | |
| schedule: | |
| - cron: "15 3 * * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| cppcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update apt cache | |
| run: sudo apt-get update | |
| - name: Install dependencies | |
| run: sudo apt-get install -y libpq-dev libcurl4-openssl-dev libssh-dev libmosquitto-dev libjq-dev cppcheck libpcre3-dev libmicrohttpd-dev | |
| - name: Prepare release build | |
| run: ./build/prepare_release_build.sh | |
| - name: autoconf | |
| run: ./reconf | |
| - name: configure | |
| run: ./configure --prefix=/tmp/build --with-server --with-agent --with-pgsql | |
| - name: restore cppcheck cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: /tmp/cppcheck | |
| key: ${{ runner.os }}-cppcheck-${{ github.ref_name }} | |
| - name: cppcheck | |
| run: | | |
| mkdir -p /tmp/cppcheck | |
| cppcheck -q --platform=unix64 --language=c++ --max-ctu-depth=3 -I . -I build -I include -I src/server/include -I src/nxcproxy -j $(nproc) --std=c++17 --cppcheck-build-dir=/tmp/cppcheck src | |
| - name: save cppcheck cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: /tmp/cppcheck | |
| key: ${{ runner.os }}-cppcheck-${{ github.ref_name }} |