diff --git a/.github/workflows/CI-cygwin.yml b/.github/workflows/CI-cygwin.yml index 93a77d70c33..fc560b3ce72 100644 --- a/.github/workflows/CI-cygwin.yml +++ b/.github/workflows/CI-cygwin.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/CI-mingw.yml b/.github/workflows/CI-mingw.yml index 8f6ff31182a..465c1dbce35 100644 --- a/.github/workflows/CI-mingw.yml +++ b/.github/workflows/CI-mingw.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/CI-unixish-docker.yml b/.github/workflows/CI-unixish-docker.yml index d3b4ba8a5f4..78f38d97dd9 100644 --- a/.github/workflows/CI-unixish-docker.yml +++ b/.github/workflows/CI-unixish-docker.yml @@ -12,9 +12,13 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read - + jobs: build_cmake: diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index f745a21e177..4e9a83fbf5e 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read @@ -427,24 +431,24 @@ jobs: pushd addons/test # We'll force C89 standard to enable an additional verification for # rules 5.4 and 5.5 which have standard-dependent options. - ../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test.c --std=c89 --platform=unix64 + ../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test.c --std=c89 --platform=unix64 python3 ../misra.py -verify misra/misra-test.c.dump # Test slight MISRA differences in C11 standard ../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test-c11.c --std=c11 --platform=unix64 python3 ../misra.py -verify misra/misra-test-c11.c.dump # TODO: do we need to verify something here? ../../cppcheck --dump -DDUMMY --suppress=uninitvar --suppress=uninitStructMember --std=c89 misra/misra-test.h - ../../cppcheck --dump misra/misra-test.cpp + ../../cppcheck --dump misra/misra-test.cpp python3 ../misra.py -verify misra/misra-test.cpp.dump python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_ascii.txt -verify misra/misra-test.cpp.dump python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_utf8.txt -verify misra/misra-test.cpp.dump python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_windows1250.txt -verify misra/misra-test.cpp.dump ../../cppcheck --addon=misra --enable=style --platform=avr8 --error-exitcode=1 misra/misra-test-avr8.c - ../../cppcheck --dump misc-test.cpp + ../../cppcheck --dump misc-test.cpp python3 ../misc.py -verify misc-test.cpp.dump - ../../cppcheck --dump naming_test.c + ../../cppcheck --dump naming_test.c python3 ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump - ../../cppcheck --dump naming_test.cpp + ../../cppcheck --dump naming_test.cpp python3 ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump # TODO: run with "-n auto" when misra_test.py can be run in parallel @@ -525,14 +529,14 @@ jobs: selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=file-total -D__GNUC__ --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=gnu --inconclusive --enable=style,performance,portability,warning,missingInclude --exception-handling --debug-warnings --check-level=exhaustive" cppcheck_options="-D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2" ec=0 - - # TODO: add --check-config - + + # TODO: add --check-config + # early exit if [ $ec -eq 1 ]; then exit $ec fi - + # self check externals ./cppcheck $selfcheck_options externals || ec=1 # self check lib/cli diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 6117072ee42..3c4561a87cd 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index f2c4f2cdd1b..9c98494cd1b 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/buildman.yml b/.github/workflows/buildman.yml index b0b399dd851..6e954d802b1 100644 --- a/.github/workflows/buildman.yml +++ b/.github/workflows/buildman.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 7b462c688f0..f9baff1fe45 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -4,6 +4,10 @@ name: CIFuzz on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 40079ad4422..61e4bb1052a 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -15,6 +15,10 @@ on: - cron: '0 0 * * 0' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 185ebe139c6..054bcf507b9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read @@ -36,7 +40,7 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false - + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3c0c8e1d1df..13d0161d6bd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read @@ -56,16 +60,16 @@ jobs: lcov --directory ./ --capture --output-file lcov_tmp.info -b ./ lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info genhtml lcov.info -o coverage_report --frame --legend --demangle-cpp - + - uses: actions/upload-artifact@v4 with: name: Coverage results path: coverage_report - + - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} # file: ./coverage.xml # optional flags: unittests # optional name: ${{ github.repository }} # optional - fail_ci_if_error: true # optional (default = false): + fail_ci_if_error: true # optional (default = false): diff --git a/.github/workflows/cppcheck-premium.yml b/.github/workflows/cppcheck-premium.yml index 94481894c8f..bcb95f9b63f 100644 --- a/.github/workflows/cppcheck-premium.yml +++ b/.github/workflows/cppcheck-premium.yml @@ -16,6 +16,10 @@ on: premium_version: description: 'Cppcheck Premium version' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8ad9408a376..6f76ab8b450 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read @@ -45,7 +49,7 @@ jobs: cd uncrustify-uncrustify-${{ env.UNCRUSTIFY_VERSION }} cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build -- -j$(nproc) -s - mkdir ~/uncrustify + mkdir ~/uncrustify cp build/uncrustify ~/uncrustify/ - name: Uncrustify check diff --git a/.github/workflows/scriptcheck.yml b/.github/workflows/scriptcheck.yml index 3394604d155..4783b18fbb8 100644 --- a/.github/workflows/scriptcheck.yml +++ b/.github/workflows/scriptcheck.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/selfcheck.yml b/.github/workflows/selfcheck.yml index d58178a5c1a..680785fc8bc 100644 --- a/.github/workflows/selfcheck.yml +++ b/.github/workflows/selfcheck.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/tsan.yml b/.github/workflows/tsan.yml index 4347e5e1b98..3eb40713619 100644 --- a/.github/workflows/tsan.yml +++ b/.github/workflows/tsan.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/ubsan.yml b/.github/workflows/ubsan.yml index 11dc26a8ec3..65724f964db 100644 --- a/.github/workflows/ubsan.yml +++ b/.github/workflows/ubsan.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index 7fd16382802..f6400c1fede 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -12,6 +12,10 @@ on: - '2.*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: contents: read @@ -57,7 +61,7 @@ jobs: # TODO: debuginfod.ubuntu.com is currently not responding to any requests causing it to run into a 40(!) minute timeout #env: # DEBUGINFOD_URLS: https://debuginfod.ubuntu.com - + - uses: actions/upload-artifact@v4 if: success() || failure() with: