Skip to content

Commit 98554cb

Browse files
deployment: add graphite ci-optimizations to blockifier-ci
1 parent fe332d1 commit 98554cb

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/blockifier_ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,22 @@ concurrency:
3636
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3737

3838
jobs:
39+
# https://graphite.com/docs/stacking-and-ci
40+
optimize_ci:
41+
runs-on: namespace-profile-small-ubuntu-24-04-amd64
42+
outputs:
43+
skip: ${{ steps.check_skip.outputs.skip }}
44+
steps:
45+
- name: Optimize CI
46+
id: check_skip
47+
uses: withgraphite/graphite-ci-action@main
48+
with:
49+
graphite_token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
50+
3951
test-without-features:
4052
runs-on: namespace-profile-medium-ubuntu-24-04-amd64
53+
needs: optimize_ci
54+
if: needs.optimize_ci.outputs.skip == 'false'
4155
steps:
4256
- uses: actions/checkout@v6
4357
- uses: ./.github/actions/bootstrap
@@ -49,6 +63,8 @@ jobs:
4963

5064
test-with-transaction-serde-feature:
5165
runs-on: namespace-profile-medium-ubuntu-24-04-amd64
66+
needs: optimize_ci
67+
if: needs.optimize_ci.outputs.skip == 'false'
5268
steps:
5369
- uses: actions/checkout@v6
5470
- uses: ./.github/actions/bootstrap
@@ -60,6 +76,8 @@ jobs:
6076

6177
test-with-cairo-native-feature:
6278
runs-on: namespace-profile-large-ubuntu-24-04-amd64
79+
needs: optimize_ci
80+
if: needs.optimize_ci.outputs.skip == 'false'
6381
steps:
6482
- uses: actions/checkout@v6
6583
- uses: ./.github/actions/bootstrap
@@ -71,6 +89,8 @@ jobs:
7189

7290
test-with-tracing-feature:
7391
runs-on: namespace-profile-medium-ubuntu-24-04-amd64
92+
needs: optimize_ci
93+
if: needs.optimize_ci.outputs.skip == 'false'
7494
steps:
7595
- uses: actions/checkout@v6
7696
- uses: ./.github/actions/bootstrap
@@ -82,7 +102,8 @@ jobs:
82102

83103
benchmarking:
84104
runs-on: namespace-profile-xlarge-ubuntu-24-04-amd64
85-
if: ${{ github.event_name == 'pull_request' }}
105+
if: ${{ github.event_name == 'pull_request' && needs.optimize_ci.outputs.skip == 'false' }}
106+
needs: optimize_ci
86107
steps:
87108
# Checkout the base branch to benchmark the old code.
88109
- uses: actions/checkout@v6

0 commit comments

Comments
 (0)