Skip to content

Commit 3d53bc7

Browse files
committed
port changes on top of ci fix
1 parent 9e443e0 commit 3d53bc7

File tree

2 files changed

+56
-6
lines changed

2 files changed

+56
-6
lines changed

.github/actions/build/action.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ description: 'All of the building steps for o1js'
44
permissions:
55
contents: write
66

7+
inputs:
8+
proof_systems_commit:
9+
description: 'proof_systems commit to use'
10+
required: false
11+
default: ''
12+
713
runs:
814
using: "composite"
915
steps:
@@ -22,16 +28,26 @@ runs:
2228
with:
2329
node-version: '20'
2430

31+
- name: use proof_systems_commit if provided
32+
if: ${{ inputs.proof_systems_commit != '' }}
33+
shell: bash
34+
run: |
35+
git -C src/mina/src/lib/crypto/proof-systems fetch origin ${{ inputs.proof_systems_commit }}
36+
git -C src/mina/src/lib/crypto/proof-systems clean -fdx
37+
git -C src/mina/src/lib/crypto/proof-systems checkout ${{ inputs.proof_systems_commit }}
38+
git -C src/mina/src/lib/crypto/proof-systems clean -fdx
39+
git -C src/mina add src/lib/crypto/proof-systems
40+
2541
- name: cache bindings
2642
uses: actions/cache@v4
2743
id: bindings-cache
2844
with:
2945
path: |
3046
src/bindings/compiled
3147
src/bindings/mina-transaction/gen
32-
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}
48+
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}-${{ inputs.proof_systems_commit }}
3349
- name: Build the o1js bindings
34-
if: steps.bindings-cache.outputs.cache-hit != 'true'
50+
if: ${{ steps.bindings-cache.outputs.cache-hit != 'true' }}
3551
shell: bash
3652
run: |
3753
set -Eeu
@@ -47,13 +63,13 @@ runs:
4763
dist
4864
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.ts', '**/*.js') }}
4965
- name: Build examples
50-
if: steps.cache.outputs.cache-hit != 'true'
66+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
5167
shell: bash
5268
run: |
5369
npm ci
5470
npm run build:examples
5571
- name: Build o1js clean
56-
if: steps.cache.outputs.cache-hit != 'true'
72+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
5773
shell: bash
5874
run: |
5975
rm -fr dist

.github/workflows/checks.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,26 @@ on:
66
- develop
77
- v1
88
- v3
9-
pull_request:
10-
workflow_dispatch: {}
9+
pull_request: {}
10+
workflow_dispatch:
11+
inputs:
12+
proof_systems_commit:
13+
description: 'proof_systems commit to use'
14+
required: false
15+
default: ''
16+
workflow_call:
17+
inputs:
18+
proof_systems_commit:
19+
description: 'proof_systems commit to use'
20+
required: false
21+
type: string
22+
default: ''
23+
target_repo:
24+
required: false
25+
type: string
26+
target_ref:
27+
required: false
28+
type: string
1129

1230
concurrency:
1331
group: ${{ github.workflow }}-${{ github.ref }}
@@ -26,6 +44,9 @@ jobs:
2644
submodules: recursive
2745
- name: Build
2846
uses: ./.github/actions/build
47+
with:
48+
repository: ${{ inputs.target_repo || github.repository }}
49+
ref: ${{ inputs.target_ref || github.ref }}
2950

3051
Lint-Format-and-TypoCheck:
3152
strategy:
@@ -81,6 +102,7 @@ jobs:
81102

82103
Upload-bindings:
83104
name: upload bindings artifact
105+
if: ${{ inputs.proof_systems_commit == '' }}
84106
needs: [Prepare]
85107
runs-on: ubuntu-latest
86108
steps:
@@ -120,6 +142,9 @@ jobs:
120142

121143
- name: build
122144
uses: ./.github/actions/build
145+
with:
146+
repository: ${{ inputs.target_repo || github.repository }}
147+
ref: ${{ inputs.target_ref || github.ref }}
123148
- name: Prepare for tests
124149
run: touch profiling.md
125150
- name: Execute tests
@@ -148,6 +173,9 @@ jobs:
148173
submodules: recursive
149174
- name: build
150175
uses: ./.github/actions/build
176+
with:
177+
repository: ${{ inputs.target_repo || github.repository }}
178+
ref: ${{ inputs.target_ref || github.ref }}
151179
- name: Count tests
152180
id: count_tests
153181
run: |
@@ -281,6 +309,9 @@ jobs:
281309
uses: actions/checkout@v4
282310
- name: build
283311
uses: ./.github/actions/build
312+
with:
313+
repository: ${{ inputs.target_repo || github.repository }}
314+
ref: ${{ inputs.target_ref || github.ref }}
284315
- name: Use shared steps for live testing jobs
285316
uses: ./.github/actions/live-tests-shared
286317
with:
@@ -309,6 +340,9 @@ jobs:
309340
uses: actions/checkout@v4
310341
- name: build
311342
uses: ./.github/actions/build
343+
with:
344+
repository: ${{ inputs.target_repo || github.repository }}
345+
ref: ${{ inputs.target_ref || github.ref }}
312346
- name: Use shared steps for live testing jobs
313347
uses: ./.github/actions/live-tests-shared
314348
with:

0 commit comments

Comments
 (0)