From 3d53bc7313aebe18ac1d1e58d7a854bdf01bc1df Mon Sep 17 00:00:00 2001 From: Geometer1729 <16kuhnb@gmail.com> Date: Tue, 20 May 2025 16:35:19 -0400 Subject: [PATCH 1/5] port changes on top of ci fix --- .github/actions/build/action.yml | 24 ++++++++++++++++---- .github/workflows/checks.yml | 38 ++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 7a501b83e0..34c74d4d1c 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -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: @@ -22,6 +28,16 @@ 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 @@ -29,9 +45,9 @@ runs: 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 @@ -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 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6c345f9355..dca5b127e9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -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 }} @@ -26,6 +44,9 @@ jobs: submodules: recursive - name: Build uses: ./.github/actions/build + with: + repository: ${{ inputs.target_repo || github.repository }} + ref: ${{ inputs.target_ref || github.ref }} Lint-Format-and-TypoCheck: strategy: @@ -81,6 +102,7 @@ jobs: Upload-bindings: name: upload bindings artifact + if: ${{ inputs.proof_systems_commit == '' }} needs: [Prepare] runs-on: ubuntu-latest steps: @@ -120,6 +142,9 @@ jobs: - name: build uses: ./.github/actions/build + with: + repository: ${{ inputs.target_repo || github.repository }} + ref: ${{ inputs.target_ref || github.ref }} - name: Prepare for tests run: touch profiling.md - name: Execute tests @@ -148,6 +173,9 @@ jobs: submodules: recursive - name: build uses: ./.github/actions/build + with: + repository: ${{ inputs.target_repo || github.repository }} + ref: ${{ inputs.target_ref || github.ref }} - name: Count tests id: count_tests run: | @@ -281,6 +309,9 @@ jobs: uses: actions/checkout@v4 - name: build uses: ./.github/actions/build + with: + repository: ${{ inputs.target_repo || github.repository }} + ref: ${{ inputs.target_ref || github.ref }} - name: Use shared steps for live testing jobs uses: ./.github/actions/live-tests-shared with: @@ -309,6 +340,9 @@ jobs: uses: actions/checkout@v4 - name: build uses: ./.github/actions/build + with: + repository: ${{ inputs.target_repo || github.repository }} + ref: ${{ inputs.target_ref || github.ref }} - name: Use shared steps for live testing jobs uses: ./.github/actions/live-tests-shared with: From 99e6fc6938fbbc410d9d5e65bbf47a2ccc302f1a Mon Sep 17 00:00:00 2001 From: Geometer1729 <16kuhnb@gmail.com> Date: Tue, 20 May 2025 16:50:19 -0400 Subject: [PATCH 2/5] fix checkout actions --- .github/workflows/checks.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index dca5b127e9..179fdfd250 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -42,6 +42,8 @@ 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: @@ -58,6 +60,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: @@ -109,6 +114,8 @@ jobs: - 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: @@ -139,6 +146,8 @@ 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 @@ -171,6 +180,8 @@ 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: @@ -307,6 +318,9 @@ 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: @@ -338,6 +352,9 @@ 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: From 8d0fadcd8031be4ad46e2caa40be59b6decc860e Mon Sep 17 00:00:00 2001 From: Geometer1729 <16kuhnb@gmail.com> Date: Wed, 21 May 2025 09:38:18 -0400 Subject: [PATCH 3/5] pass proof-systems commit --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 179fdfd250..c488cde21f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -49,6 +49,7 @@ jobs: 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: From e0253c502fbd1389e90b7ba4eb2bc6451658222b Mon Sep 17 00:00:00 2001 From: Geometer1729 <16kuhnb@gmail.com> Date: Wed, 21 May 2025 11:07:25 -0400 Subject: [PATCH 4/5] pass proof_system_commit everywhere --- .github/workflows/checks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c488cde21f..258fbb2e87 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -155,6 +155,7 @@ jobs: 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 @@ -188,6 +189,7 @@ jobs: 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: | @@ -327,6 +329,7 @@ jobs: 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: @@ -361,6 +364,7 @@ jobs: 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: From f0c7ad27cf2581a9cfec1b9900c4ac0ca2da4c5e Mon Sep 17 00:00:00 2001 From: Geometer1729 <16kuhnb@gmail.com> Date: Wed, 21 May 2025 12:07:12 -0400 Subject: [PATCH 5/5] move npmDepsHash to ubuntu-latest too --- .github/workflows/pull_requests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 4b018f8f53..d7d9385b2f 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -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