From b36da850b56e0b93bab9b76fb91d20adfc51ad83 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 22 Aug 2025 12:21:50 +0200 Subject: [PATCH] github: Only run CI for latest commit in a branch, cancel old runs --- .github/workflows/android.yml | 4 ++++ .github/workflows/codeql.yml | 4 ++++ .github/workflows/linux.yml | 4 ++++ .github/workflows/macos.yml | 4 ++++ .github/workflows/sonarcloud.yml | 4 ++++ .github/workflows/tkm.yml | 4 ++++ .github/workflows/windows.yml | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index a65be4905..9ec33ee8e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,6 +2,10 @@ name: Android on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CCACHE_BASEDIR: ${{ github.workspace }} CCACHE_COMPRESS: true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ab7185de4..79f198b79 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,6 +2,10 @@ name: "CodeQL" on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CCACHE_BASEDIR: ${{ github.workspace }} CCACHE_COMPRESS: true diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b423e462b..4e900f83f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -2,6 +2,10 @@ name: Linux on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: # this test case does not actually test anything but tries to access system # directories that might be inaccessible on build hosts diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3edd2b983..161976b1d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -2,6 +2,10 @@ name: macOS on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: TESTS_REDUCED_KEYLENGTHS: yes CCACHE_BASEDIR: ${{ github.workspace }} diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 18a3139b9..e2fbf8476 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -2,6 +2,10 @@ name: SonarCloud on: [push] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CCACHE_BASEDIR: ${{ github.workspace }} CCACHE_COMPRESS: true diff --git a/.github/workflows/tkm.yml b/.github/workflows/tkm.yml index 1affd8f64..8d612b858 100644 --- a/.github/workflows/tkm.yml +++ b/.github/workflows/tkm.yml @@ -2,6 +2,10 @@ name: TKM on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_CONTAINER: /root/.ccache diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ca84bc8ab..cba0512ac 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -2,6 +2,10 @@ name: Windows on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: TESTS_REDUCED_KEYLENGTHS: yes CCACHE_BASEDIR: ${{ github.workspace }}