Skip to content

Commit 0dc31cc

Browse files
hangleangTumas
authored andcommitted
Deduplicate CI build runs for internal PRs
1 parent b7e7019 commit 0dc31cc

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ name: CI Build
22

33
on: [push, pull_request]
44

5+
# Cancel in-progress runs for the same ref
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
9+
510
env:
611
TEST_CASES: |
712
consensus spec tests mainnet fulu empty block transition
813
pectra-devnet-6 without epoch transition
914
1015
jobs:
1116
build:
17+
# Skip pull_request events for same-repo branches (push already covers them)
18+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
1219
strategy:
1320
matrix:
1421
os: [ubuntu-latest, macos-latest, windows-latest]
@@ -95,6 +102,8 @@ jobs:
95102
run: scripts/ci/consensus-spec-tests-coverage.rb
96103

97104
zkvm-test:
105+
# Skip pull_request events for same-repo branches (push already covers them)
106+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
98107
strategy:
99108
matrix:
100109
backend: [risc0, sp1, pico, ziren, zisk]
@@ -182,7 +191,7 @@ jobs:
182191
- name: Setup nim for constantine backend
183192
uses: jiro4989/setup-nim-action@v2
184193
with:
185-
nim-version: '2.0.2'
194+
nim-version: "2.0.2"
186195
repo-token: ${{ secrets.GITHUB_TOKEN }}
187196
parent-nim-install-directory: ${{ runner.temp }}
188197
- name: Install dependencies for constantine backend

0 commit comments

Comments
 (0)