From 6b9c63d7da9f40b9508790c2ef6daa32721752ce Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Tue, 18 Oct 2022 17:59:04 +0200 Subject: [PATCH] [INFRA] Correctly cancel running workflows --- .github/workflows/ci_linux.yml | 2 +- .github/workflows/ci_macos.yml | 2 +- .github/workflows/ci_misc.yml | 2 +- .github/workflows/clang_format.yml | 10 ++++++++++ .github/workflows/readme_snippet.yml | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index b71dc87f..a72ff7f6 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -16,7 +16,7 @@ on: concurrency: group: linux-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'push' }} env: CMAKE_VERSION: 3.15.7 diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 412c2fe1..892142cf 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -16,7 +16,7 @@ on: concurrency: group: macos-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'push' }} env: CMAKE_VERSION: 3.15.7 diff --git a/.github/workflows/ci_misc.yml b/.github/workflows/ci_misc.yml index 83fe959d..92ab1884 100644 --- a/.github/workflows/ci_misc.yml +++ b/.github/workflows/ci_misc.yml @@ -16,7 +16,7 @@ on: concurrency: group: misc-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'push' }} env: SHARG_NO_VERSION_CHECK: 1 diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml index 2cce5510..7fd52ae2 100644 --- a/.github/workflows/clang_format.yml +++ b/.github/workflows/clang_format.yml @@ -39,11 +39,21 @@ jobs: steps: - name: "Cancel Misc" run: echo "Cancelling Misc" + cancel_coverage: + name: Cancel Coverage + concurrency: + group: coverage-${{ github.event.pull_request.number }} + cancel-in-progress: true + runs-on: ubuntu-22.04 + steps: + - name: "Cancel Coverage" + run: echo "Cancelling Coverage" lint: name: clang-format concurrency: group: clang-format-${{ github.event.pull_request.number }} cancel-in-progress: true + needs: [cancel_linux, cancel_macos, cancel_misc, cancel_coverage] runs-on: ubuntu-22.04 timeout-minutes: 15 steps: diff --git a/.github/workflows/readme_snippet.yml b/.github/workflows/readme_snippet.yml index a684a16f..bae549ff 100644 --- a/.github/workflows/readme_snippet.yml +++ b/.github/workflows/readme_snippet.yml @@ -17,7 +17,7 @@ jobs: name: Update README concurrency: group: readme-snippet-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: false runs-on: ubuntu-22.04 timeout-minutes: 15 steps: