diff --git a/.github/workflows/auto-merge-main-to-v2.yml b/.github/workflows/auto-merge-main-to-v2.yml deleted file mode 100644 index 0e171bd35..000000000 --- a/.github/workflows/auto-merge-main-to-v2.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Purpose: -# This workflow automatically attempts to merge changes from the 'main' branch into the 'v2' branch -# whenever changes are pushed to 'main'. If the automatic merge fails due to conflicts, it creates -# a pull request for manual resolution. -# -# Workflow Details: -# 1. Triggered on every push to the 'main' branch. -# 2. Checks out the repository with full history. -# 3. Configures Git with GitHub Actions bot credentials. -# 4. Attempts to merge 'main' into 'v2' and push the result. -# 5. If merge fails, creates a pull request for manual conflict resolution. - -name: Auto-merge main to v2 - -on: - push: - branches: - - main - -jobs: - auto-merge: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Fetch all history for all branches and tags - - - name: Configure Git - run: | - git config user.name github-actions - git config user.email github-actions@github.com - - - name: Try to merge main into v2 - run: | - git checkout v2 - git merge origin/main - git push origin v2 - continue-on-error: true - - - name: Create Pull Request if merge failed - if: failure() - uses: peter-evans/create-pull-request@v6 - with: - branch: auto-merge-main-to-v2-${{ github.sha }} - title: 'Auto-merge main to v2 (commit ${{ github.sha }})' - body: 'This PR was automatically created to merge changes from main into v2. Please resolve conflicts and merge manually.' - base: v2 diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml deleted file mode 100644 index ec1a4d969..000000000 --- a/.github/workflows/benchmarks.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Benchmark o1js -on: - push: - branches: - - main - - develop - pull_request: - workflow_dispatch: {} - -jobs: - benchmarks: - timeout-minutes: 30 - strategy: - fail-fast: true - matrix: - node: [20] - runners: [sdk-self-hosted-linux-amd64, sdk-self-hosted-linux-arm64] - runs-on: ${{ matrix.runners }} - 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.runners }} 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_LFS_SKIP_SMUDGE=1 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/init.ts --bundle >>benchmarks.log 2>&1 - node --enable-source-maps --stack-trace-limit=1000 src/build/run.js benchmark/runners/simple.ts --bundle >>benchmarks.log 2>&1 - cat benchmarks.log >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-action.yml index 9d4b1a98d..23ac03bf1 100644 --- a/.github/workflows/build-action.yml +++ b/.github/workflows/build-action.yml @@ -6,6 +6,9 @@ on: - develop pull_request: workflow_dispatch: {} +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true jobs: Prepare: @@ -22,7 +25,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '22' - name: Cache dependencies and build uses: actions/cache@v4 @@ -81,7 +84,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '22' - name: Restore cache uses: actions/cache@v4 @@ -125,7 +128,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '22' - name: Restore cache uses: actions/cache@v4 @@ -183,13 +186,6 @@ jobs: echo "### Test Results for Unit Tests Chunk ${{ matrix.chunk }}" >> $GITHUB_STEP_SUMMARY cat profiling.md >> $GITHUB_STEP_SUMMARY - Build-And-Test-Server-Unit-Tests: - name: Build-And-Test-Server (Unit tests) - needs: [Run-Unit-Tests] - runs-on: ubuntu-latest - steps: - - run: echo "All unit tests completed successfully" - Build-And-Test-Web: needs: Prepare timeout-minutes: 90 @@ -204,7 +200,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '22' - name: Restore npm cache uses: actions/cache@v4 @@ -240,66 +236,3 @@ jobs: name: e2e-tests-report path: tests/report/ retention-days: 30 - - Release-on-NPM: - if: github.ref == 'refs/heads/main' - timeout-minutes: 180 - runs-on: ubuntu-latest - needs: [Build-And-Test-Server, Run-Unit-Tests, Build-And-Test-Web] - steps: - - name: Restore repository - uses: actions/cache@v4 - with: - path: . - key: repo-${{ github.sha }} - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Build o1js - run: | - npm ci - npm run prepublishOnly - - - name: Publish to NPM if version has changed - uses: JS-DevTools/npm-publish@v3 - with: - token: ${{ secrets.NPM_TOKEN }} - strategy: upgrade - env: - INPUT_TOKEN: ${{ secrets.NPM_TOKEN }} - - Release-mina-signer-on-NPM: - if: github.ref == 'refs/heads/main' - timeout-minutes: 180 - runs-on: ubuntu-latest - needs: [Build-And-Test-Server, Run-Unit-Tests, Build-And-Test-Web] - steps: - - name: Restore repository - uses: actions/cache@v4 - with: - path: . - key: repo-${{ github.sha }} - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Build mina-signer - run: | - npm ci - cd src/mina-signer - npm ci - npm run prepublishOnly - - - name: Publish to NPM if version has changed - uses: JS-DevTools/npm-publish@v3 - with: - token: ${{ secrets.NPM_TOKEN }} - package: './src/mina-signer/package.json' - strategy: upgrade - env: - INPUT_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml deleted file mode 100644 index 6bd443361..000000000 --- a/.github/workflows/doc.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: o1js typedoc -on: - push: - branches: - - main - -jobs: - Build-Doc: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '18' - - name: Run typedoc - run: | - GIT_LFS_SKIP_SMUDGE=1 git submodule update --init --recursive - npm ci - npx typedoc --tsconfig tsconfig.node.json src/index.ts - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 67e89f95b..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,82 +0,0 @@ -# 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') - WEEK_NUM=$((10#$WEEK_NUM)) - 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 "action@github.com" - 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 [CHECK SEMVER BEFORE MERGE]" --body "This is an automated PR to update to version $NEW_VERSION. Please check [SemVer](https://semver.org/) for correct versioning before merging this PR." - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN}}