Skip to content

Commit 7b3bf1f

Browse files
committed
Merge branch 'main' into 2025-04-promote-indexed-merkle-map
2 parents a4d105c + c39f24e commit 7b3bf1f

File tree

197 files changed

+20329
-1056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+20329
-1056
lines changed

.github/actions/build/action.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build o1js
2+
description: 'All of the building steps for o1js'
3+
4+
permissions:
5+
contents: write
6+
7+
inputs:
8+
proof_systems_commit:
9+
description: 'proof_systems commit to use'
10+
required: false
11+
default: ''
12+
13+
runs:
14+
using: "composite"
15+
steps:
16+
- uses: nixbuild/nix-quick-install-action@v30
17+
continue-on-error: true
18+
with:
19+
nix_conf: |
20+
keep-env-derivations = true
21+
keep-outputs = true
22+
require-sigs = false
23+
- name: Disable smudging
24+
shell: bash
25+
run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
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+
41+
- name: cache bindings
42+
uses: actions/cache@v4
43+
id: bindings-cache
44+
with:
45+
path: |
46+
src/bindings/compiled
47+
src/bindings/mina-transaction/gen
48+
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}-${{ inputs.proof_systems_commit }}
49+
- name: Build the o1js bindings
50+
if: ${{ steps.bindings-cache.outputs.cache-hit != 'true' }}
51+
shell: bash
52+
run: |
53+
set -Eeu
54+
./pin.sh
55+
nix run o1js#generate-bindings --max-jobs auto
56+
- name: Cache dependencies and build
57+
uses: actions/cache@v4
58+
id: cache
59+
with:
60+
path: |
61+
~/.npm
62+
node_modules
63+
dist
64+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.ts', '**/*.js') }}
65+
- name: Build examples
66+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
67+
shell: bash
68+
run: |
69+
npm ci
70+
npm run build:examples
71+
- name: Build o1js clean
72+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
73+
shell: bash
74+
run: |
75+
rm -fr dist
76+
npm ci
77+
npm run build
78+
79+
- name: Cache repository
80+
uses: actions/cache@v4
81+
with:
82+
path: .
83+
key: repo-${{ github.sha }}
84+

.github/actions/upload/action.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and upload bindings
2+
on:
3+
workflow_dispatch:
4+
workflow_call:
5+
6+
inputs:
7+
cache_id:
8+
required: true
9+
nar_secret:
10+
required: true
11+
gcp_secret:
12+
required: true
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Build
18+
uses: ./.github/actions/build
19+
- name: Build the o1js bindings
20+
if: steps.bindings-cache.outputs.cache-hit != 'true'
21+
env:
22+
AWS_ACCESS_KEY_ID: ${{ inputs.cache_id }}
23+
AWS_SECRET_ACCESS_KEY: ${{ inputs.gcp_secret }}
24+
shell: bash
25+
run: |
26+
set -Eeu
27+
./pin.sh
28+
nix build o1js#bindings --accept-flake-config
29+
temp_key=$(mktemp)
30+
echo ${{ inputs.nar_secret }} > "$temp_key"
31+
nix store sign --key-file "$temp_key" --recursive ./result
32+
outs=$(nix-store --query --requisites --include-outputs $(nix path-info --derivation ./result))
33+
nix copy --to "s3://mina-nix-cache?endpoint=https://storage.googleapis.com" $outs
34+
rm "$temp_key"
35+
- name: generate tar
36+
shell: bash
37+
run: |
38+
set -Eeu
39+
./pin.sh
40+
nix build o1js#bindings-tar --out-link bindings.tar.gz
41+
- name: Upload bindings
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: bindings.tar.gz
45+
path: bindings.tar.gz

.github/workflows/auto-merge-main-to-v2.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)