Skip to content

Commit

Permalink
Merge pull request #1536 from o1-labs/merge-back-to-berkeley
Browse files Browse the repository at this point in the history
Merge main back to berkeley
  • Loading branch information
mitschabaude authored Apr 7, 2024
2 parents 9fbaac2 + b7642da commit 305204c
Show file tree
Hide file tree
Showing 353 changed files with 34,063 additions and 23,438 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rules": {
"no-unused-vars": "warn",
"no-constant-condition": "off",
"no-empty": "off"
"no-empty": "off",
"no-unused-labels": "off"
}
}
39 changes: 39 additions & 0 deletions .github/actions/live-tests-shared/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Shared steps for live testing jobs'
description: 'Shared steps for live testing jobs'
inputs:
mina-branch-name:
description: 'Mina branch name in use by service container'
required: true
runs:
using: 'composite'
steps:
- name: Wait for Mina network readiness
uses: o1-labs/wait-for-mina-network-action@v1
with:
mina-graphql-port: 8080
max-attempts: 60
polling-interval-ms: 10000
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build o1js and execute tests
env:
USE_CUSTOM_LOCAL_NETWORK: 'true'
run: |
git submodule update --init --recursive
npm ci
npm run build
touch profiling.md
bash run-ci-live-tests.sh
cat profiling.md >> $GITHUB_STEP_SUMMARY
shell: bash
- name: Upload Mina logs
uses: actions/upload-artifact@v3
continue-on-error: true
if: always()
with:
if-no-files-found: ignore
name: mina-logs-${{ inputs.mina-branch-name }}
path: /tmp/*.log
retention-days: 5
43 changes: 43 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Benchmark o1js
on:
push:
branches:
- main
- berkeley
- develop
pull_request:
workflow_dispatch: {}

jobs:
benchmarks:
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
node: [20]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.JS ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Build o1js and execute benchmarks on ${{ matrix.os }} and Node.JS ${{ matrix.node }}
env:
GIT_BRANCH: ${{ github.head_ref || github.ref_name }}
INFLUXDB_URL: ${{ secrets.INFLUXDB_URL }}
INFLUXDB_ORG: ${{ secrets.INFLUXDB_ORG }}
INFLUXDB_BUCKET: ${{ secrets.INFLUXDB_BUCKET }}
INFLUXDB_TOKEN: ${{ secrets.INFLUXDB_TOKEN }}
METRICS_SOURCE_ENVIRONMENT: 'o1js GitHub Actions'
METRICS_BASE_BRANCH_FOR_COMPARISON: 'main'
run: |
git submodule update --init --recursive
npm ci
npm run build
echo 'Running o1js benchmarks.'
node --enable-source-maps --stack-trace-limit=1000 src/build/run.js benchmark/runners/with-cloud-history.ts --bundle >>benchmarks.log 2>&1
cat benchmarks.log >> $GITHUB_STEP_SUMMARY
shell: bash
48 changes: 23 additions & 25 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: Build SnarkyJS
name: Build o1js
on:
push:
branches:
- main
- berkeley
- develop
pull_request:
branches:
- main
- berkeley
- develop
workflow_dispatch: {}

jobs:
Expand All @@ -30,13 +26,13 @@ jobs:
'CommonJS test',
]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build SnarkyJS and Execute Tests
- name: Build o1js and execute tests
env:
TEST_TYPE: ${{ matrix.test_type }}
continue-on-error: false
Expand All @@ -52,28 +48,30 @@ jobs:
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Node Dependencies
- name: Install Node dependencies
run: |
git submodule update --init --recursive
npm ci
- name: Install Playwright Browsers
- name: Install Playwright browsers
run: npm run e2e:install
- name: Build SnarkyJS and Prepare the Web Server
- name: Build o1js and prepare the web server
run: |
npm run build:web
npm run e2e:prepare-server
- name: Execute E2E Tests
- name: Execute E2E tests
run: npm run test:e2e
- name: Upload E2E Test Artifacts
uses: actions/upload-artifact@v2
- name: Upload E2E test artifacts
uses: actions/upload-artifact@v3
continue-on-error: true
if: always()
with:
if-no-files-found: ignore
name: e2e-tests-report
path: tests/report/
retention-days: 30
Expand All @@ -83,13 +81,13 @@ jobs:
runs-on: ubuntu-latest
needs: [Build-And-Test-Server, Build-And-Test-Web]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build SnarkyJS
- name: Build o1js
run: |
git submodule update --init --recursive
npm ci
Expand All @@ -107,10 +105,10 @@ jobs:
runs-on: ubuntu-latest
needs: [Build-And-Test-Server, Build-And-Test-Web]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build mina-signer
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build SnarkyJS
name: Build o1js
on:
push:
branches:
Expand All @@ -8,21 +8,21 @@ jobs:
Build-Doc:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup node
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'

- name: run typedoc
- name: Run typedoc
run: |
git submodule update --init --recursive
npm ci
npx typedoc --tsconfig tsconfig.node.json src/index.ts
- name: deploy
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/live-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Test o1js against the real network
on:
push:
branches:
- main
- berkeley
- develop
pull_request:
branches:
- main
- berkeley
- develop
workflow_dispatch: {}

jobs:
main-branch:
timeout-minutes: 45
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.base_ref == 'main')
services:
mina-local-network:
image: o1labs/mina-local-network:o1js-main-latest-lightnet
env:
NETWORK_TYPE: 'single-node'
PROOF_LEVEL: 'none'
ports:
- 3085:3085
- 5432:5432
- 8080:8080
- 8181:8181
- 8282:8282
volumes:
- /tmp:/root/logs
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
mina-branch-name: o1js-main

berkeley-branch:
timeout-minutes: 45
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/berkeley' || (github.event_name == 'pull_request' && github.base_ref == 'berkeley')
services:
mina-local-network:
image: o1labs/mina-local-network:berkeley-latest-lightnet
env:
NETWORK_TYPE: 'single-node'
PROOF_LEVEL: 'none'
ports:
- 3085:3085
- 5432:5432
- 8080:8080
- 8181:8181
- 8282:8282
volumes:
- /tmp:/root/logs
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
mina-branch-name: berkeley

develop-branch:
timeout-minutes: 45
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop' || (github.event_name == 'pull_request' && github.base_ref == 'develop')
services:
mina-local-network:
image: o1labs/mina-local-network:develop-latest-lightnet
env:
NETWORK_TYPE: 'single-node'
PROOF_LEVEL: 'none'
ports:
- 3085:3085
- 5432:5432
- 8080:8080
- 8181:8181
- 8282:8282
volumes:
- /tmp:/root/logs
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
mina-branch-name: develop
Loading

0 comments on commit 305204c

Please sign in to comment.