From 7fb559353ee86c90a7179b1791cb29a81a24a4d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 26 Jun 2023 16:40:12 +0200 Subject: [PATCH 1/2] CI: do not cancel concurrent builds on the same branch Instead, only cancel them if the builds have the same commit SHA. --- .github/workflows/ci.yml | 2 +- src/ci/github-actions/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d64b5f076e48..e345964660d7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ defaults: run: shell: bash concurrency: - group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" + group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}" cancel-in-progress: true jobs: pr: diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 8907d643182d0..e5487b3e746be 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -301,7 +301,7 @@ defaults: concurrency: # For a given workflow, if we push to the same PR, cancel all previous builds on that PR. # If the push is not attached to a PR, we will cancel all builds related to the same commit SHA. - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true jobs: From 32428ab5f37b56314715b23b14dd700510d84f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Thu, 29 Jun 2023 14:52:52 +0200 Subject: [PATCH 2/2] CI: do not cancel concurrent builds on the same branch Add an exception for try and try-perf branches to enable concurrent try builds and unrolled rollup builds. --- .github/workflows/ci.yml | 2 +- src/ci/github-actions/ci.yml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e345964660d7e..ff62e1ded61d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ defaults: run: shell: bash concurrency: - group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}" + group: "${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}" cancel-in-progress: true jobs: pr: diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index e5487b3e746be..cb12042c11739 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -299,9 +299,10 @@ defaults: shell: bash concurrency: - # For a given workflow, if we push to the same PR, cancel all previous builds on that PR. - # If the push is not attached to a PR, we will cancel all builds related to the same commit SHA. - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + # For a given workflow, if we push to the same branch, cancel all previous builds on that branch. + # We add an exception for try builds (try branch) and unrolled rollup builds (try-perf), which + # are all triggered on the same branch, but which should be able to run concurrently. + group: ${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }} cancel-in-progress: true jobs: