diff --git a/.github/workflows/build-crates-individually.yml b/.github/workflows/build-crates-individually.yml index 57b25707..8dd84409 100644 --- a/.github/workflows/build-crates-individually.yml +++ b/.github/workflows/build-crates-individually.yml @@ -1,5 +1,12 @@ name: Build crates individually +# Ensures that only one workflow task will run at a time. Previous builds, if +# already in process, will get cancelled. Only the latest commit will be allowed +# to run, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + on: workflow_dispatch: push: diff --git a/.github/workflows/continous-delivery.yml b/.github/workflows/continous-delivery.yml index 3b14683c..7414e8d3 100644 --- a/.github/workflows/continous-delivery.yml +++ b/.github/workflows/continous-delivery.yml @@ -1,5 +1,12 @@ name: CD +# Ensures that only one workflow task will run at a time. Previous deployments, if +# already in process, won't get cancelled. Instead, we let the first to complete +# then queue the latest pending workflow, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + on: workflow_dispatch: inputs: diff --git a/.github/workflows/continous-integration-docker.yml b/.github/workflows/continous-integration-docker.yml index 6fc73bf7..df965681 100644 --- a/.github/workflows/continous-integration-docker.yml +++ b/.github/workflows/continous-integration-docker.yml @@ -1,5 +1,12 @@ name: CI Docker +# Ensures that only one workflow task will run at a time. Previous builds, if +# already in process, will get cancelled. Only the latest commit will be allowed +# to run, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + on: workflow_dispatch: inputs: @@ -312,6 +319,14 @@ jobs: saves_to_disk: true disk_suffix: tip height_grep_text: 'current_height.*=.*Height' + # We don't want to cancel running full syncs on `main` if a new PR gets merged, + # because we might never finish a full sync during busy weeks. Instead, we let the + # first sync complete, then queue the latest pending sync, cancelling any syncs in between. + # (As the general workflow concurrency group just gets matched in Pull Requests, + # it has no impact on this job.) + concurrency: + group: github.workflow−{{ github.ref }} + cancel-in-progress: false # Test that Zebra can sync to the chain tip, using a cached Zebra tip state, # without launching `lightwalletd`. diff --git a/.github/workflows/continous-integration-os.yml b/.github/workflows/continous-integration-os.yml index 0bf90b8d..b89400f5 100644 --- a/.github/workflows/continous-integration-os.yml +++ b/.github/workflows/continous-integration-os.yml @@ -1,5 +1,12 @@ name: CI OSes +# Ensures that only one workflow task will run at a time. Previous builds, if +# already in process, will get cancelled. Only the latest commit will be allowed +# to run, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + on: workflow_dispatch: # we build Rust and Zcash parameter caches on main, diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 230afd68..b0e8ebea 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,5 +1,12 @@ name: Coverage +# Ensures that only one workflow task will run at a time. Previous builds, if +# already in process, will get cancelled. Only the latest commit will be allowed +# to run, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + on: workflow_dispatch: push: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ddff8841..c797c92e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,12 @@ name: Docs +# Ensures that only one workflow task will run at a time. Previous deployments, if +# already in process, won't get cancelled. Instead, we let the first to complete +# then queue the latest pending workflow, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + on: workflow_dispatch: push: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 254fe14c..42e3484f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,12 @@ name: Lint +# Ensures that only one workflow task will run at a time. Previous builds, if +# already in process, will get cancelled. Only the latest commit will be allowed +# to run, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + on: # we build Rust caches on main, so they can be shared by all branches: # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache diff --git a/.github/workflows/zcash-params.yml b/.github/workflows/zcash-params.yml index b2f59fb0..e283c744 100644 --- a/.github/workflows/zcash-params.yml +++ b/.github/workflows/zcash-params.yml @@ -1,5 +1,12 @@ name: zcash-params +# Ensures that only one workflow task will run at a time. Previous deployments, if +# already in process, won't get cancelled. Instead, we let the first to complete +# then queue the latest pending workflow, cancelling any workflows in between +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + on: workflow_dispatch: push: