From 8459f70354bfaa4438644bb8bbdb0787be7d15f7 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Tue, 2 Apr 2024 00:23:50 +0200 Subject: [PATCH] CI: cancel older concurrent PR runs Remove the space in the workflow name to ensure there are no side effects when using it as an identifier. Signed-off-by: Axel Heider --- .github/workflows/sel4test-hw.yml | 8 +++++++- .github/workflows/sel4test-sim.yml | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sel4test-hw.yml b/.github/workflows/sel4test-hw.yml index 0723bfb1..ec1cdb2a 100644 --- a/.github/workflows/sel4test-hw.yml +++ b/.github/workflows/sel4test-hw.yml @@ -6,7 +6,7 @@ # # See sel4test-hw/builds.yml in the repo seL4/ci-actions for configs. -name: seL4Test HW +name: seL4Test-HW on: # needs PR target for secrets access; guard by requiring label @@ -17,6 +17,12 @@ on: permissions: contents: read +# Cancel older runs of this workflow that are still not finished for the +# current PR. This reduces the CI load. +concurrency: + group: ${{ github.workflow }}-pr-${{ github.event.number }} + cancel-in-progress: true + jobs: hw-build: name: HW Build diff --git a/.github/workflows/sel4test-sim.yml b/.github/workflows/sel4test-sim.yml index 98c0618b..267839ee 100644 --- a/.github/workflows/sel4test-sim.yml +++ b/.github/workflows/sel4test-sim.yml @@ -13,6 +13,13 @@ on: branches: [master] pull_request: +# Cancel older runs of this workflow that are still not finished for the +# current PR. This reduces the CI load. For deployment to the master branch, +# the workflow will run on each push, but no cancellation happens here. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('run-{0}', github.run_id) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: simulation: name: Simulation