[llvm-branch-commits] [llvm] release/20.x: workflows/premerge: Move concurrency definition to workflow level (#126308) (PR #126310)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Feb 7 14:52:56 PST 2025


https://github.com/llvmbot updated https://github.com/llvm/llvm-project/pull/126310

>From 3c011c65f618a058b0be483223f4158bb269deea Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 7 Feb 2025 13:09:58 -0800
Subject: [PATCH] workflows/premerge: Move concurrency definition to workflow
 level (#126308)

Prior workflow runs were not being cancelled when the pull request was
closed, and I think this was why. Also, there is no advantage to having
the definitions at the job level.

(cherry picked from commit 6e5988863177e1d53e7a7abb7a3db2b85376f0f5)
---
 .github/workflows/premerge.yaml | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 45e6bb763a0efae..9b6a1236823d7ed 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -19,15 +19,16 @@ on:
       - 'main'
       - 'release/**'
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+  cancel-in-progress: true
+
 jobs:
   premerge-checks-linux:
     if: >-
         false && github.repository_owner == 'llvm' &&
         (github.event_name != 'pull_request' || github.event.action != 'closed')
     runs-on: llvm-premerge-linux-runners
-    concurrency:
-      group: ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
-      cancel-in-progress: true
     steps:
       - name: Checkout LLVM
         uses: actions/checkout at v4
@@ -86,9 +87,6 @@ jobs:
         false && github.repository_owner == 'llvm' &&
         (github.event_name != 'pull_request' || github.event.action != 'closed')
     runs-on: llvm-premerge-windows-runners
-    concurrency:
-      group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
-      cancel-in-progress: true
     defaults:
       run:
         shell: bash
@@ -146,9 +144,6 @@ jobs:
 
   permerge-check-macos:
     runs-on: macos-14
-    concurrency:
-      group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
-      cancel-in-progress: true
     if: >-
       github.repository_owner == 'llvm' &&
       (startswith(github.ref_name, 'release/') ||



More information about the llvm-branch-commits mailing list