Skip to content

Commit 4b514ac

Browse files
committed
Merge branch 'main' into develop
2 parents 1067757 + 4c60cda commit 4b514ac

File tree

441 files changed

+35063
-8994
lines changed

Some content is hidden

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

441 files changed

+35063
-8994
lines changed

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
export GIT_LFS_SKIP_SMUDGE=1
14
./pin.sh
25
use flake o1js#default

.eslintignore

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

.eslintrc.json

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug, needs triage
6+
assignees: ''
7+
8+
---
9+
10+
**Description**
11+
12+
_Provide a clear and concise description of the problem. Please explain what went wrong._
13+
14+
**How to reproduce**
15+
16+
_List detailed steps to replicate the issue, including any relevant code snippets._
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature-request
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the feature or improvement**
11+
12+
_A clear and concise description of the proposed feature or change. Eg. It's important for zkApp developers to prove circuits in <20s_
13+
14+
**(Optional) Describe the solution**
15+
16+
_A clear _technical_ description of the implementation._

.github/actions/build/action.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Build o1js
2+
description: 'All of the building steps for o1js'
3+
4+
permissions:
5+
contents: write
6+
7+
inputs:
8+
cache_id:
9+
required: true
10+
nar_secret:
11+
required: true
12+
gcp_secret:
13+
required: true
14+
15+
runs:
16+
using: "composite"
17+
steps:
18+
- name: Install zstd if needed
19+
shell: bash
20+
run: command -v unzstd || (sudo apt-get update && sudo apt-get install -y zstd)
21+
- uses: nixbuild/nix-quick-install-action@v30
22+
continue-on-error: true
23+
with:
24+
nix_conf: |
25+
keep-env-derivations = true
26+
keep-outputs = true
27+
- name: Fallback to persistant nix
28+
# only available on some runners
29+
shell: bash
30+
run: command -v nix || echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV
31+
32+
- name: Disable smudging
33+
shell: bash
34+
run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV
35+
- name: Setup Node
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: '20'
39+
40+
- name: cache bindings
41+
uses: actions/cache@v4
42+
id: bindings-cache
43+
with:
44+
path: |
45+
src/bindings/compiled
46+
src/bindings/mina-transaction/gen
47+
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}
48+
49+
- name: Build the o1js bindings
50+
if: steps.bindings-cache.outputs.cache-hit != 'true'
51+
env:
52+
AWS_ACCESS_KEY_ID: ${{ inputs.cache_id }}
53+
AWS_SECRET_ACCESS_KEY: ${{ inputs.gcp_secret }}
54+
shell: bash
55+
run: |
56+
set -Eeu
57+
./pin.sh
58+
nix build o1js#bindings --accept-flake-config
59+
temp_key=$(mktemp)
60+
echo ${{ inputs.nar_secret }} > "$temp_key"
61+
nix store sign --key-file "$temp_key" --recursive ./result
62+
nix copy --to "s3://mina-nix-cache?endpoint=https://storage.googleapis.com" $(nix path-info ./result)
63+
nix run o1js#generate-bindings --max-jobs auto
64+
rm "$temp_key"
65+
66+
- name: Cache dependencies and build
67+
uses: actions/cache@v4
68+
id: cache
69+
with:
70+
path: |
71+
~/.npm
72+
node_modules
73+
dist
74+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.ts', '**/*.js') }}
75+
76+
- name: Build examples
77+
if: steps.cache.outputs.cache-hit != 'true'
78+
shell: bash
79+
run: |
80+
npm ci
81+
npm run build:examples
82+
- name: Build o1js clean
83+
if: steps.cache.outputs.cache-hit != 'true'
84+
shell: bash
85+
run: |
86+
rm -fr dist
87+
npm ci
88+
npm run build
89+
90+
- name: Cache repository
91+
uses: actions/cache@v4
92+
with:
93+
path: .
94+
key: repo-${{ github.sha }}
95+

.github/actions/upload/action.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
with:
20+
cache_id: ${{ inputs.cache_id }}
21+
nar_secret: ${{ inputs.nar_secret }}
22+
gcp_secret: ${{ inputs.gcp_secret }}
23+
24+
- name: generate tar
25+
shell: bash
26+
run: |
27+
set -Eeu
28+
./pin.sh
29+
nix build o1js#bindings-tar --out-link bindings.tar.gz
30+
- name: Upload bindings
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: bindings.tar.gz
34+
path: bindings.tar.gz

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

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

.github/workflows/benchmarks.yml

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

0 commit comments

Comments
 (0)