Skip to content

Commit e8fc7d2

Browse files
committed
Merge branch 'main' into boray/ci-typo-check
2 parents fd395f2 + 3322c49 commit e8fc7d2

20 files changed

+627
-814
lines changed

.github/actions/build/action.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build o1js
2+
description: 'All of the building steps for o1js'
3+
4+
5+
permissions:
6+
contents: write
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Set up Nix
12+
shell: bash
13+
run: echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV
14+
- name: Disable smudging
15+
shell: bash
16+
run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
22+
- name: cache bindings
23+
uses: actions/cache@v4
24+
id: bindings-cache
25+
with:
26+
path: |
27+
src/bindings/compiled
28+
src/bindings/mina-transaction/gen
29+
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}
30+
31+
- name: Build the o1js bindings
32+
if: steps.bindings-cache.outputs.cache-hit != 'true'
33+
shell: bash
34+
run: |
35+
set -Eeu
36+
./pin.sh
37+
nix run o1js#generate-bindings --max-jobs auto
38+
39+
- name: Cache dependencies and build
40+
uses: actions/cache@v4
41+
id: cache
42+
with:
43+
path: |
44+
~/.npm
45+
node_modules
46+
dist
47+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.ts', '**/*.js') }}
48+
49+
- name: Build examples
50+
if: steps.cache.outputs.cache-hit != 'true'
51+
shell: bash
52+
run: |
53+
npm ci
54+
npm run build:examples
55+
- name: Build o1js clean
56+
if: steps.cache.outputs.cache-hit != 'true'
57+
shell: bash
58+
run: |
59+
rm -fr dist
60+
npm ci
61+
npm run build
62+
63+
- name: Cache repository
64+
uses: actions/cache@v4
65+
with:
66+
path: .
67+
key: repo-${{ github.sha }}
68+

.github/actions/upload/action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build and upload bindings
2+
on:
3+
workflow_dispatch:
4+
workflow_call:
5+
6+
runs:
7+
using: "composite"
8+
steps:
9+
- name: Build
10+
uses: ./.github/actions/build
11+
- name: generate tar
12+
shell: bash
13+
run: |
14+
set -Eeu
15+
./pin.sh
16+
nix build o1js#bindings-tar --out-link bindings.tar.gz
17+
- name: Upload bindings
18+
uses: actions/upload-artifact@v4
19+
with:
20+
name: bindings.tar.gz
21+
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)