From 10d9c63d91bf736387bca8ba5503bf3b3cf425c8 Mon Sep 17 00:00:00 2001 From: Jon C Date: Wed, 10 Jan 2024 20:27:05 +0100 Subject: [PATCH] ci: Only run one of each workflow at once for a branch / PR (#6109) --- .github/workflows/pull-request-account-compression.yml | 4 ++++ .github/workflows/pull-request-binary-oracle-pair.yml | 4 ++++ .github/workflows/pull-request-docs.yml | 4 ++++ .github/workflows/pull-request-examples.yml | 4 ++++ .github/workflows/pull-request-feature-gate.yml | 4 ++++ .github/workflows/pull-request-feature-proposal.yml | 4 ++++ .github/workflows/pull-request-governance.yml | 4 ++++ .github/workflows/pull-request-instruction-padding.yml | 4 ++++ .github/workflows/pull-request-js.yml | 4 ++++ .github/workflows/pull-request-libraries.yml | 4 ++++ .github/workflows/pull-request-memo.yml | 4 ++++ .github/workflows/pull-request-name-service.yml | 4 ++++ .github/workflows/pull-request-record.yml | 4 ++++ .github/workflows/pull-request-shared-memory.yml | 4 ++++ .github/workflows/pull-request-single-pool.yml | 4 ++++ .github/workflows/pull-request-stake-pool.yml | 4 ++++ .github/workflows/pull-request-token-collection.yml | 4 ++++ .github/workflows/pull-request-token-group.yml | 4 ++++ .github/workflows/pull-request-token-lending.yml | 4 ++++ .github/workflows/pull-request-token-metadata.yml | 4 ++++ .github/workflows/pull-request-token-swap.yml | 4 ++++ .github/workflows/pull-request-token-upgrade.yml | 4 ++++ .github/workflows/pull-request-token.yml | 4 ++++ .github/workflows/pull-request.yml | 4 ++++ .github/workflows/spl_action.yml | 4 ++++ 25 files changed, 100 insertions(+) diff --git a/.github/workflows/pull-request-account-compression.yml b/.github/workflows/pull-request-account-compression.yml index c9c5f60ff26..0d255bf4e4c 100644 --- a/.github/workflows/pull-request-account-compression.yml +++ b/.github/workflows/pull-request-account-compression.yml @@ -19,6 +19,10 @@ on: - ".github/workflows/pull-request-account-compression.yml" - "!account-compression/sdk/**" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: anchor-build-account-compression: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-binary-oracle-pair.yml b/.github/workflows/pull-request-binary-oracle-pair.yml index 23198c681bc..393bc85b89f 100644 --- a/.github/workflows/pull-request-binary-oracle-pair.yml +++ b/.github/workflows/pull-request-binary-oracle-pair.yml @@ -15,6 +15,10 @@ on: - 'ci/*-version.sh' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-docs.yml b/.github/workflows/pull-request-docs.yml index 6595a8f5b82..a16d21ab900 100644 --- a/.github/workflows/pull-request-docs.yml +++ b/.github/workflows/pull-request-docs.yml @@ -11,6 +11,10 @@ on: - 'docs/**' - '.github/workflows/pull-request-docs.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: all_github_action_checks: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-examples.yml b/.github/workflows/pull-request-examples.yml index 24958642145..1e7f7a1f3c0 100644 --- a/.github/workflows/pull-request-examples.yml +++ b/.github/workflows/pull-request-examples.yml @@ -11,6 +11,10 @@ on: - 'examples/rust/**' - 'ci/*-version.sh' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-feature-gate.yml b/.github/workflows/pull-request-feature-gate.yml index 8ee4a04f9e1..12d41675239 100644 --- a/.github/workflows/pull-request-feature-gate.yml +++ b/.github/workflows/pull-request-feature-gate.yml @@ -13,6 +13,10 @@ on: - 'ci/*-version.sh' - '.github/workflows/pull-request-feature-gate.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-feature-proposal.yml b/.github/workflows/pull-request-feature-proposal.yml index 7b1b63e4b41..13981e16fa3 100644 --- a/.github/workflows/pull-request-feature-proposal.yml +++ b/.github/workflows/pull-request-feature-proposal.yml @@ -15,6 +15,10 @@ on: - 'ci/*-version.sh' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-governance.yml b/.github/workflows/pull-request-governance.yml index 2e10594314c..10788d9b66a 100644 --- a/.github/workflows/pull-request-governance.yml +++ b/.github/workflows/pull-request-governance.yml @@ -15,6 +15,10 @@ on: - "ci/*-version.sh" - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-instruction-padding.yml b/.github/workflows/pull-request-instruction-padding.yml index 0e20f66c7bf..dcbd44d813e 100644 --- a/.github/workflows/pull-request-instruction-padding.yml +++ b/.github/workflows/pull-request-instruction-padding.yml @@ -13,6 +13,10 @@ on: - 'ci/*-version.sh' - '.github/workflows/pull-request-instruction-padding.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-js.yml b/.github/workflows/pull-request-js.yml index eda852e8d3e..370dcf38ef2 100644 --- a/.github/workflows/pull-request-js.yml +++ b/.github/workflows/pull-request-js.yml @@ -32,6 +32,10 @@ on: - 'pnpm-lock.yaml' - '.github/workflows/pull-request-js.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: js-test: strategy: diff --git a/.github/workflows/pull-request-libraries.yml b/.github/workflows/pull-request-libraries.yml index 51d68cf89c0..acf70ca51fb 100644 --- a/.github/workflows/pull-request-libraries.yml +++ b/.github/workflows/pull-request-libraries.yml @@ -15,6 +15,10 @@ on: - '.github/workflows/pull-request-libraries.yml' - '!libraries/**/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-memo.yml b/.github/workflows/pull-request-memo.yml index e03bda82103..ce2f2f23432 100644 --- a/.github/workflows/pull-request-memo.yml +++ b/.github/workflows/pull-request-memo.yml @@ -13,6 +13,10 @@ on: - 'ci/*-version.sh' - '!memo/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-name-service.yml b/.github/workflows/pull-request-name-service.yml index 2ca423c7d65..ceca409be35 100644 --- a/.github/workflows/pull-request-name-service.yml +++ b/.github/workflows/pull-request-name-service.yml @@ -13,6 +13,10 @@ on: - 'ci/*-version.sh' - '!name-service/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-record.yml b/.github/workflows/pull-request-record.yml index b8cd078fdeb..1d1aef3501f 100644 --- a/.github/workflows/pull-request-record.yml +++ b/.github/workflows/pull-request-record.yml @@ -11,6 +11,10 @@ on: - 'record/**' - 'ci/*-version.sh' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-shared-memory.yml b/.github/workflows/pull-request-shared-memory.yml index 5bedc3ea52f..6574ddfd0b7 100644 --- a/.github/workflows/pull-request-shared-memory.yml +++ b/.github/workflows/pull-request-shared-memory.yml @@ -11,6 +11,10 @@ on: - 'shared-memory/**' - 'ci/*-version.sh' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-single-pool.yml b/.github/workflows/pull-request-single-pool.yml index 13262364c7a..32d7b91b15d 100644 --- a/.github/workflows/pull-request-single-pool.yml +++ b/.github/workflows/pull-request-single-pool.yml @@ -21,6 +21,10 @@ on: - '!single-pool/js/**' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-stake-pool.yml b/.github/workflows/pull-request-stake-pool.yml index 71e6c2d2fb2..ecc715923ce 100644 --- a/.github/workflows/pull-request-stake-pool.yml +++ b/.github/workflows/pull-request-stake-pool.yml @@ -21,6 +21,10 @@ on: - '!stake-pool/js/**' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-token-collection.yml b/.github/workflows/pull-request-token-collection.yml index f179531378c..0463297da18 100644 --- a/.github/workflows/pull-request-token-collection.yml +++ b/.github/workflows/pull-request-token-collection.yml @@ -23,6 +23,10 @@ on: - '!token/js/**' - '!token-metadata/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-token-group.yml b/.github/workflows/pull-request-token-group.yml index bb61aab5083..5008f35b273 100644 --- a/.github/workflows/pull-request-token-group.yml +++ b/.github/workflows/pull-request-token-group.yml @@ -17,6 +17,10 @@ on: - '.github/workflows/pull-request-token-group.yml' - '!token-group/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-token-lending.yml b/.github/workflows/pull-request-token-lending.yml index 6f1373995d9..c8f56529eb9 100644 --- a/.github/workflows/pull-request-token-lending.yml +++ b/.github/workflows/pull-request-token-lending.yml @@ -17,6 +17,10 @@ on: - '!token-lending/js/**' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-token-metadata.yml b/.github/workflows/pull-request-token-metadata.yml index 6daf2073b99..85176d453cc 100644 --- a/.github/workflows/pull-request-token-metadata.yml +++ b/.github/workflows/pull-request-token-metadata.yml @@ -17,6 +17,10 @@ on: - '.github/workflows/pull-request-token-metadata.yml' - '!token-metadata/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-token-swap.yml b/.github/workflows/pull-request-token-swap.yml index 305052a24ca..b5143ef9808 100644 --- a/.github/workflows/pull-request-token-swap.yml +++ b/.github/workflows/pull-request-token-swap.yml @@ -19,6 +19,10 @@ on: - '!token-swap/js/**' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-token-upgrade.yml b/.github/workflows/pull-request-token-upgrade.yml index ce22f808662..8610b0c4fe8 100644 --- a/.github/workflows/pull-request-token-upgrade.yml +++ b/.github/workflows/pull-request-token-upgrade.yml @@ -17,6 +17,10 @@ on: - '.github/workflows/pull-request-token-upgrade.yml' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request-token.yml b/.github/workflows/pull-request-token.yml index c8544791f80..6ec9883d7db 100644 --- a/.github/workflows/pull-request-token.yml +++ b/.github/workflows/pull-request-token.yml @@ -17,6 +17,10 @@ on: - '.github/workflows/pull-request-token.yml' - '!token/js/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cargo-test-sbf: runs-on: ubuntu-latest diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 398f9502b2d..d91dad1c2b0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -9,6 +9,10 @@ on: paths-ignore: - 'docs/**' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: all_github_action_checks: runs-on: ubuntu-latest diff --git a/.github/workflows/spl_action.yml b/.github/workflows/spl_action.yml index 42dda18239f..25f4144b3be 100644 --- a/.github/workflows/spl_action.yml +++ b/.github/workflows/spl_action.yml @@ -7,6 +7,10 @@ on: - 'docs/**' - '.github/workflows/spl_action.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest