Skip to content

Commit

Permalink
Add workflow concurrency - should stop builds during quick changes
Browse files Browse the repository at this point in the history
If a long build (e.g. Windows) starts up, but you find a typo,
the concurrency should cancel the first build.

Overall, should boost throughput for builds / checks

Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Oct 28, 2023
1 parent 50f9000 commit 2d5c2d1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ env:
CACHE: -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
SCCACHE_GHA_ENABLED: "true"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.config.name }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ env:
MACOS_TARGET: 10.12
FEATURES: -DUSE_VTK=ON -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF -DUSE_3DCONNEXION=ON

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.config.name }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build Wheels

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Don't build python 2.7, pypy, or 32-bit wheels or Mac arm64 on Py3.8
CIBW_SKIP: "cp36-* cp37-* cp311-* cp38-macosx_arm64 pp* *-musllinux_* *-manylinux_i686 *-win32"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ permissions:

jobs:
codacy-security-scan:
name: Codacy Security Scan
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: Codacy Security Scan
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
schedule:
- cron: '42 6 * * 6'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
QT_VERSION: 5.15.2
FEATURES: -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF
Expand Down

0 comments on commit 2d5c2d1

Please sign in to comment.