Skip to content

Commit bbbc230

Browse files
committed
Add workflow concurrency
1 parent 8f3d36a commit bbbc230

18 files changed

Lines changed: 88 additions & 16 deletions

.github/workflows/CI-cygwin.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/CI-mingw.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/CI-unixish-docker.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
17-
21+
1822
jobs:
1923
build_cmake:
2024

.github/workflows/CI-unixish.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

@@ -427,24 +431,24 @@ jobs:
427431
pushd addons/test
428432
# We'll force C89 standard to enable an additional verification for
429433
# rules 5.4 and 5.5 which have standard-dependent options.
430-
../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test.c --std=c89 --platform=unix64
434+
../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test.c --std=c89 --platform=unix64
431435
python3 ../misra.py -verify misra/misra-test.c.dump
432436
# Test slight MISRA differences in C11 standard
433437
../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test-c11.c --std=c11 --platform=unix64
434438
python3 ../misra.py -verify misra/misra-test-c11.c.dump
435439
# TODO: do we need to verify something here?
436440
../../cppcheck --dump -DDUMMY --suppress=uninitvar --suppress=uninitStructMember --std=c89 misra/misra-test.h
437-
../../cppcheck --dump misra/misra-test.cpp
441+
../../cppcheck --dump misra/misra-test.cpp
438442
python3 ../misra.py -verify misra/misra-test.cpp.dump
439443
python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_ascii.txt -verify misra/misra-test.cpp.dump
440444
python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_utf8.txt -verify misra/misra-test.cpp.dump
441445
python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_windows1250.txt -verify misra/misra-test.cpp.dump
442446
../../cppcheck --addon=misra --enable=style --platform=avr8 --error-exitcode=1 misra/misra-test-avr8.c
443-
../../cppcheck --dump misc-test.cpp
447+
../../cppcheck --dump misc-test.cpp
444448
python3 ../misc.py -verify misc-test.cpp.dump
445-
../../cppcheck --dump naming_test.c
449+
../../cppcheck --dump naming_test.c
446450
python3 ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump
447-
../../cppcheck --dump naming_test.cpp
451+
../../cppcheck --dump naming_test.cpp
448452
python3 ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump
449453
450454
# TODO: run with "-n auto" when misra_test.py can be run in parallel
@@ -525,14 +529,14 @@ jobs:
525529
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"
526530
cppcheck_options="-D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2"
527531
ec=0
528-
529-
# TODO: add --check-config
530-
532+
533+
# TODO: add --check-config
534+
531535
# early exit
532536
if [ $ec -eq 1 ]; then
533537
exit $ec
534538
fi
535-
539+
536540
# self check externals
537541
./cppcheck $selfcheck_options externals || ec=1
538542
# self check lib/cli

.github/workflows/CI-windows.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/asan.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/buildman.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

.github/workflows/cifuzz.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: CIFuzz
44

55
on: [pull_request]
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
711
permissions:
812
contents: read
913

.github/workflows/clang-tidy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
- cron: '0 0 * * 0'
1616
workflow_dispatch:
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
1822
permissions:
1923
contents: read
2024

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '2.*'
1313
pull_request:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
1519
permissions:
1620
contents: read
1721

@@ -36,7 +40,7 @@ jobs:
3640
uses: actions/checkout@v4
3741
with:
3842
persist-credentials: false
39-
43+
4044
# Initializes the CodeQL tools for scanning.
4145
- name: Initialize CodeQL
4246
uses: github/codeql-action/init@v3

0 commit comments

Comments
 (0)