Skip to content

Commit

Permalink
Merge pull request #1 from lambdaclass/new_version
Browse files Browse the repository at this point in the history
Update o1js version
  • Loading branch information
gabrielbosio authored Mar 11, 2024
2 parents 8cf2cc4 + 73d2b7a commit 5c6b6f0
Show file tree
Hide file tree
Showing 293 changed files with 25,897 additions and 17,844 deletions.
9 changes: 4 additions & 5 deletions .github/actions/live-tests-shared/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ runs:
max-attempts: 60
polling-interval-ms: 10000
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build o1js and execute tests
env:
TEST_TYPE: 'Live integration tests'
USE_LOCAL_NETWORK: 'true'
USE_CUSTOM_LOCAL_NETWORK: 'true'
run: |
git submodule update --init --recursive
npm ci
npm run build:node
npm run build
touch profiling.md
sh run-ci-tests.sh
bash run-ci-live-tests.sh
cat profiling.md >> $GITHUB_STEP_SUMMARY
shell: bash
- name: Upload Mina logs
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build o1js and execute tests
Expand All @@ -39,7 +39,7 @@ jobs:
run: |
git submodule update --init --recursive
npm ci
npm run build:node
npm run build
touch profiling.md
sh run-ci-tests.sh
cat profiling.md >> $GITHUB_STEP_SUMMARY
Expand All @@ -49,9 +49,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Node dependencies
Expand Down Expand Up @@ -82,16 +82,16 @@ jobs:
needs: [Build-And-Test-Server, Build-And-Test-Web]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build o1js
run: |
git submodule update --init --recursive
npm ci
npm run build:node
npm run build
- name: Publish to NPM if version has changed
uses: JS-DevTools/npm-publish@v1
if: github.ref == 'refs/heads/main'
Expand All @@ -106,9 +106,9 @@ jobs:
needs: [Build-And-Test-Server, Build-And-Test-Web]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build mina-signer
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/live-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test o1js against real network
name: Test o1js against the real network
on:
push:
branches:
Expand All @@ -14,12 +14,12 @@ on:

jobs:
main-branch:
timeout-minutes: 25
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:rampup-latest-lightnet
image: o1labs/mina-local-network:o1js-main-latest-lightnet
env:
NETWORK_TYPE: 'single-node'
PROOF_LEVEL: 'none'
Expand All @@ -28,18 +28,19 @@ jobs:
- 5432:5432
- 8080:8080
- 8181:8181
- 8282:8282
volumes:
- /tmp:/root/logs
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
mina-branch-name: rampup
mina-branch-name: o1js-main

berkeley-branch:
timeout-minutes: 25
timeout-minutes: 45
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/berkeley' || (github.event_name == 'pull_request' && github.base_ref == 'berkeley')
services:
Expand All @@ -53,18 +54,19 @@ jobs:
- 5432:5432
- 8080:8080
- 8181:8181
- 8282:8282
volumes:
- /tmp:/root/logs
steps:
- name: Checkout repository
uses: actions/checkout@v3
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: 25
timeout-minutes: 45
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop' || (github.event_name == 'pull_request' && github.base_ref == 'develop')
services:
Expand All @@ -78,11 +80,12 @@ jobs:
- 5432:5432
- 8080:8080
- 8181:8181
- 8282:8282
volumes:
- /tmp:/root/logs
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Purpose:
# Automatically bumps the project's patch version bi-weekly on Tuesdays.
#
# Details:
# - Triggered at 00:00 UTC every Tuesday; runs on even weeks of the year.
# - Sets up the environment by checking out the repo and setting up Node.js.
# - Bumps patch version using `npm version patch`, then creates a new branch 'release/x.x.x'.
# - Pushes changes and creates a PR to `main` using GitHub CLI.
# - Can also be triggered manually via `workflow_dispatch`.
name: Version Bump

on:
workflow_dispatch: # Allow to manually trigger the workflow
schedule:
- cron: '0 0 * * 2' # At 00:00 UTC every Tuesday

jobs:
version-bump:
runs-on: ubuntu-latest

steps:
# Since cronjob syntax doesn't support bi-weekly schedule, we need to check if it's an even week or not
- name: Check if it's an even week
run: |
WEEK_NUM=$(date +'%V')
if [ $((WEEK_NUM % 2)) -ne 0 ]; then
echo "Odd week number ($WEEK_NUM), terminating job."
exit 1
fi
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Configure Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Bump patch version
run: |
git fetch --prune --unshallow --tags --force
NEW_VERSION=$(npm version patch)
echo "New version: $NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Install npm dependencies
run: npm install

- name: Update CHANGELOG.md
run: |
npm run update-changelog
git add CHANGELOG.md
git commit -m "Update CHANGELOG for new version $NEW_VERSION"
- name: Delete existing release tag
run: |
if git rev-parse $NEW_VERSION >/dev/null 2>&1; then
git tag -d $NEW_VERSION
git push origin :refs/tags/$NEW_VERSION
fi
- name: Delete existing release branch
run: |
if git ls-remote --heads origin release/${NEW_VERSION} | grep release/${NEW_VERSION}; then
git push origin --delete release/${NEW_VERSION}
fi
- name: Create new release branch
run: |
NEW_BRANCH="release/${NEW_VERSION}"
git checkout -b $NEW_BRANCH
git push -u origin $NEW_BRANCH
git push --tags
gh pr create --base main --head $NEW_BRANCH --title "Release $NEW_VERSION" --body "This is an automated PR to update to version $NEW_VERSION"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ tests/test-artifacts/
profiling.md
o1js-reference
*.tmp.js
_build/
src/config/
src/config.mlh
8 changes: 6 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[submodule "src/snarkyjs-bindings"]
[submodule "src/o1js-bindings"]
path = src/bindings
url = https://github.com/lambdaclass/o1js-bindings.git
branch = foreign_ec_ops
branch = wasm_kzg_prover
[submodule "src/mina"]
path = src/mina
url = https://github.com/lambdaclass/mina.git
branch = new_version
Loading

0 comments on commit 5c6b6f0

Please sign in to comment.