mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 22:44:59 +01:00
Merge pull request #324 from MaSzyna-EU07/fix/ci-cancel-superseded-builds
CI: cancel the builds of a commit superseded by a newer push
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -14,6 +14,14 @@ on:
|
||||
|
||||
permissions: {}
|
||||
|
||||
# A newer push to a pull request makes the run for its older commit pointless, so that run is
|
||||
# cancelled (sonar.yml then marks the analysis of the older commit as skipped). A push to master
|
||||
# gets a group of its own, its commit, so the runs on master are neither cancelled nor held back
|
||||
# by one another.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build under Build Wrapper
|
||||
|
||||
12
.github/workflows/build_bin.yml
vendored
12
.github/workflows/build_bin.yml
vendored
@@ -27,9 +27,17 @@ jobs:
|
||||
# Windows / MSVC
|
||||
# ============================================================
|
||||
|
||||
# A newer push to the same branch or pull request cancels the build of the older commit. The
|
||||
# groups are set on the build jobs rather than on the workflow, so a publish job that is already
|
||||
# running is left to finish; with a build cancelled the publish job of that run is skipped. A push
|
||||
# to master gets a group of its own, its commit, so the builds of master are never cancelled.
|
||||
|
||||
windows:
|
||||
name: Windows x64 / MSVC
|
||||
runs-on: windows-2022
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-windows-${{ github.event_name }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -183,6 +191,10 @@ jobs:
|
||||
linux:
|
||||
name: Linux x64 / GCC
|
||||
runs-on: ubuntu-24.04
|
||||
# see the note above the windows job
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-linux-${{ github.event_name }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
Reference in New Issue
Block a user