Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ description: 'All of the building steps for o1js'
permissions:
contents: write

inputs:
proof_systems_commit:
description: 'proof_systems commit to use'
required: false
default: ''

runs:
using: "composite"
steps:
Expand All @@ -22,16 +28,26 @@ runs:
with:
node-version: '20'

- name: use proof_systems_commit if provided
if: ${{ inputs.proof_systems_commit != '' }}
shell: bash
run: |
git -C src/mina/src/lib/crypto/proof-systems fetch origin ${{ inputs.proof_systems_commit }}
git -C src/mina/src/lib/crypto/proof-systems clean -fdx
git -C src/mina/src/lib/crypto/proof-systems checkout ${{ inputs.proof_systems_commit }}
git -C src/mina/src/lib/crypto/proof-systems clean -fdx
git -C src/mina add src/lib/crypto/proof-systems

- name: cache bindings
uses: actions/cache@v4
id: bindings-cache
with:
path: |
src/bindings/compiled
src/bindings/mina-transaction/gen
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}-${{ inputs.proof_systems_commit }}
- name: Build the o1js bindings
if: steps.bindings-cache.outputs.cache-hit != 'true'
if: ${{ steps.bindings-cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
set -Eeu
Expand All @@ -47,13 +63,13 @@ runs:
dist
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.ts', '**/*.js') }}
- name: Build examples
if: steps.cache.outputs.cache-hit != 'true'
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
npm ci
npm run build:examples
- name: Build o1js clean
if: steps.cache.outputs.cache-hit != 'true'
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
rm -fr dist
Expand Down
60 changes: 58 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,26 @@ on:
- develop
- v1
- v3
pull_request:
workflow_dispatch: {}
pull_request: {}
workflow_dispatch:
inputs:
proof_systems_commit:
description: 'proof_systems commit to use'
required: false
default: ''
workflow_call:
inputs:
proof_systems_commit:
description: 'proof_systems commit to use'
required: false
type: string
default: ''
target_repo:
required: false
type: string
target_ref:
required: false
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -24,8 +42,14 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
- name: Build
uses: ./.github/actions/build
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
proof_systems_commit: ${{ inputs.proof_systems_commit }}

Lint-Format-and-TypoCheck:
strategy:
Expand All @@ -37,6 +61,9 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
- name: Setup Node.JS ${{ matrix.node }}
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -81,12 +108,15 @@ jobs:

Upload-bindings:
name: upload bindings artifact
if: ${{ inputs.proof_systems_commit == '' }}
needs: [Prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
- name: upload
uses: ./.github/actions/upload
with:
Expand Down Expand Up @@ -117,9 +147,15 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}

- name: build
uses: ./.github/actions/build
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
proof_systems_commit: ${{ inputs.proof_systems_commit }}
- name: Prepare for tests
run: touch profiling.md
- name: Execute tests
Expand All @@ -146,8 +182,14 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
- name: build
uses: ./.github/actions/build
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
proof_systems_commit: ${{ inputs.proof_systems_commit }}
- name: Count tests
id: count_tests
run: |
Expand Down Expand Up @@ -279,8 +321,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
- name: build
uses: ./.github/actions/build
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
proof_systems_commit: ${{ inputs.proof_systems_commit }}
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
Expand All @@ -307,8 +356,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
- name: build
uses: ./.github/actions/build
with:
repository: ${{ inputs.target_repo || github.repository }}
ref: ${{ inputs.target_ref || github.ref }}
proof_systems_commit: ${{ inputs.proof_systems_commit }}
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ jobs:

Check-npm-deps:
name: Check npmDepsHash is correct
runs-on: [sdk-self-hosted-linux-amd64-build-system]
runs-on: ubuntu-latest
steps:
- name: Set up Nix
run: echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV
- name: Disable smudging
run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: nixbuild/nix-quick-install-action@v30
continue-on-error: true
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
require-sigs = false
- name: fix npmDepsHash
run: |
set -Eeu
Expand Down
Loading