diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 19fee4a98ca4..9115fa26d071 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -11,6 +11,12 @@ on: [pull_request, workflow_dispatch, workflow_call] permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: stub-build: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4f7c29d6c831..cc99ee2c209b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -9,9 +9,9 @@ on: permissions: contents: read -# Specifies group name that stops previous workflows if the name matches +# Group workflows together to cancel outdated runs concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index ea9e0a20d150..fab95196af88 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -17,6 +17,12 @@ on: [pull_request, workflow_call, workflow_dispatch] permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: yamllint: runs-on: ubuntu-latest diff --git a/.github/workflows/ipc_fuzzer.yml b/.github/workflows/ipc_fuzzer.yml index f52291839111..6b89339e7445 100644 --- a/.github/workflows/ipc_fuzzer.yml +++ b/.github/workflows/ipc_fuzzer.yml @@ -25,6 +25,12 @@ on: permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: simple-IPC-fuzz_sh: diff --git a/.github/workflows/llext.yml b/.github/workflows/llext.yml index 149c9e2e3571..5b3defbe5cc0 100644 --- a/.github/workflows/llext.yml +++ b/.github/workflows/llext.yml @@ -14,6 +14,12 @@ defaults: permissions: contents: read +# Group workflows together to cancel outdated runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: build: runs-on: ubuntu-24.04 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0bd3865dec97..86680903cfb9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -34,6 +34,12 @@ on: permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: doxygen: diff --git a/.github/workflows/repro-build.yml b/.github/workflows/repro-build.yml index abe48a8cecb2..3c68f9c35235 100644 --- a/.github/workflows/repro-build.yml +++ b/.github/workflows/repro-build.yml @@ -17,6 +17,12 @@ on: [pull_request, workflow_dispatch, workflow_call] permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: main: runs-on: ubuntu-24.04 diff --git a/.github/workflows/rimage.yml b/.github/workflows/rimage.yml index 53059681ae9d..de2372fead42 100644 --- a/.github/workflows/rimage.yml +++ b/.github/workflows/rimage.yml @@ -25,6 +25,12 @@ on: permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: # Basic build test diff --git a/.github/workflows/sof-docs.yml b/.github/workflows/sof-docs.yml index 63af4acfc714..46c9b5361054 100644 --- a/.github/workflows/sof-docs.yml +++ b/.github/workflows/sof-docs.yml @@ -20,6 +20,12 @@ on: permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: # This is unfortunately a mix of sof-docs/.github/ + pull-request.yml#doxygen diff --git a/.github/workflows/sparse-zephyr.yml b/.github/workflows/sparse-zephyr.yml index 5afa6361f51a..a10002d44924 100644 --- a/.github/workflows/sparse-zephyr.yml +++ b/.github/workflows/sparse-zephyr.yml @@ -14,6 +14,12 @@ defaults: permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: # As of sparse commit ce1a6720f69e / Sept 2022, the exit status of # sparse.c is an unusable mess and always zero in practice. Moreover diff --git a/.github/workflows/testbench.yml b/.github/workflows/testbench.yml index d54b1db331db..f7d3b866982e 100644 --- a/.github/workflows/testbench.yml +++ b/.github/workflows/testbench.yml @@ -31,6 +31,12 @@ on: permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: build-and-test: runs-on: ubuntu-24.04 diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 825b571321d8..5fdc1c443d41 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -10,6 +10,12 @@ on: [pull_request, workflow_dispatch, workflow_call] permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: # This is not the same as building every ./build-tools.sh option. top-level_default_CMake_target_ALL: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index de8577e87171..76e8c5c9e0b7 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -13,6 +13,12 @@ on: [pull_request, workflow_dispatch, workflow_call] permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: cmocka_utests: runs-on: ubuntu-latest diff --git a/.github/workflows/zephyr-shell.yml b/.github/workflows/zephyr-shell.yml index 23f8e6947b22..9d09f05da3bf 100644 --- a/.github/workflows/zephyr-shell.yml +++ b/.github/workflows/zephyr-shell.yml @@ -23,6 +23,12 @@ defaults: permissions: contents: read +# Group workflows together to cancel outdated runs, do not cancel manual runs +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" + cancel-in-progress: true + jobs: build: runs-on: ubuntu-24.04 diff --git a/.github/workflows/zephyr-unit-tests.yml b/.github/workflows/zephyr-unit-tests.yml index ed089a148597..6d6e9bdf0d88 100644 --- a/.github/workflows/zephyr-unit-tests.yml +++ b/.github/workflows/zephyr-unit-tests.yml @@ -1,5 +1,5 @@ --- -name: "Unit tests" +name: "Zephyr Unit tests" # yamllint disable-line rule:truthy on: pull_request: @@ -9,9 +9,9 @@ on: permissions: contents: read -# Specifies group name that stops previous workflows if the name matches +# Group workflows together to cancel outdated runs concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index ecfc6f4089ee..863526ced731 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -17,11 +17,12 @@ on: required: false default: 'mnfst' -# Specifies group name that stops previous wokrflows if the name matches +# Group workflows together to cancel outdated runs, do not cancel manual runs concurrency: - # eg. "Zephyr-pull_request-my_fork_branch_to_merge" - # eg. "Zephyr-push-refs/heads/my_branch_merging" - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} + # eg. 'Zephyr-workflow_dispatch-62137' + # eg. 'Zephyr-pull_request-refs/pull/{pr_number}/merge' + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" cancel-in-progress: true permissions: diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 45303525aa81..8f66645c692f 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -11,9 +11,10 @@ on: permissions: {} -# Specifies group name that stops previous workflows if the name matches +# Group workflows together to cancel outdated runs, do not cancel manual runs concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} + group: "${{ github.workflow }}-${{ github.event_name }}-\ + ${{ github.event_name == 'pull_request' && github.ref || github.run_id }}" cancel-in-progress: true jobs: