Skip to content

Commit

Permalink
feat(ci): cancel old CI jobs on PR updates
Browse files Browse the repository at this point in the history
Signed-off-by: Dori Medini <[email protected]>
  • Loading branch information
dorimedini-starkware committed Aug 21, 2024
1 parent df672bc commit 6ed782b
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/blockifier_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
- 'scripts/install_build_tools.sh'
- 'scripts/sequencer-ci.Dockerfile'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event.name == 'pull_request' }}

jobs:
featureless-build:
runs-on: starkware-ubuntu-20-04-medium
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/blockifier_compiled_cairo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
- 'crates/blockifier/feature_contracts/cairo0/**'
- 'crates/blockifier/tests/requirements.txt'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event.name == 'pull_request' }}

jobs:
verify_cairo_file_dependencies:
runs-on: starkware-ubuntu-20-04-medium
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/committer_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ on:
- 'crates/starknet_committer/**'
- 'crates/starknet_patricia/**'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event.name == 'pull_request' }}

jobs:
run-regression-tests:
runs-on: starkware-ubuntu-latest-small
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
- auto_merge_enabled
- edited

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event.name == 'pull_request' }}

jobs:
commitlint:
runs-on: starkware-ubuntu-latest-small
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/merge_paths_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ on:
- 'scripts/merge_paths_test.py'
- 'scripts/merge_status.py'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event.name == 'pull_request' }}

jobs:
merge-paths-test:
runs-on: starkware-ubuntu-latest-small
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/papyrus_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
merge_group:
types: [checks_requested]

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event.name == 'pull_request' }}

env:
PROTOC_VERSION: v25.1

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/papyrus_docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
- '.github/workflows/papyrus_docker-publish.yml'
- 'crates/papyrus**/**'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event.name == 'pull_request' }}

env:
REGISTRY: ghcr.io
REPO_NAME: ${{ github.repository }}
Expand Down

0 comments on commit 6ed782b

Please sign in to comment.