From 63451ff20ef89fea06ec0f2d2442a1006edb43b5 Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 16:52:05 +0000 Subject: [PATCH 1/9] merge queue CI --- .github/workflows/ci.yml | 73 +++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99625e35fb3..a1053e28691 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ on: concurrency: # force parallelism in master - group: ci-${{ github.ref_name == 'master' && github.run_id || github.ref_name }} + group: ci-${{ (contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master') && github.run_id || github.ref_name }} cancel-in-progress: true env: @@ -158,7 +158,7 @@ jobs: # prepare images locally, tagged by commit hash - name: "Build E2E Image" timeout-minutes: 40 - if: (needs.configure.outputs.non-docs == 'true' && needs.configure.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master' + if: (needs.configure.outputs.non-docs == 'true' && needs.configure.outputs.non-barretenberg-cpp == 'true') || env.RUN_FULL_TESTS == 'true' run: | earthly-ci ./yarn-project+export-e2e-test-images # We base our e2e list used in e2e-x86 off the targets in ./yarn-project/end-to-end @@ -185,10 +185,31 @@ jobs: echo Labels: $LABELS echo "list=$(./scripts/ci/get_bench_jobs.sh ${{github.ref_name}} "$LABELS")" >> $GITHUB_OUTPUT + bench-test-gate: + needs: [build, configure] + if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench-all') }} + runs-on: ubuntu-20.04 + steps: + - run: "echo Full bench tests enabled." + + e2e-test-gate: + needs: [build, configure] + if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} + runs-on: ubuntu-20.04 + steps: + - run: "echo Full E2E tests enabled." + + network-test-gate: + needs: [build, configure] + if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} + runs-on: ubuntu-20.04 + steps: + - run: "echo Full network tests enabled." + # all the non-bench end-to-end integration tests for aztec e2e: - needs: [build, configure] - if: (needs.configure.outputs.non-docs == 'true' && needs.configure.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e') + needs: [build, e2e-test-gate, configure] + if: needs.configure.outputs.non-docs == 'true' runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -222,8 +243,8 @@ jobs: # all the benchmarking end-to-end integration tests for aztec (not required to merge) bench-e2e: - needs: [build, configure] - if: needs.build.outputs.bench_list != '[]' && ((needs.configure.outputs.non-docs == 'true' && needs.configure.outputs.non-barretenberg-cpp == 'true') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench')) + needs: [build, bench-test-gate, configure] + if: needs.build.outputs.bench_list != '[]' && needs.configure.outputs.non-docs == 'true' runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -264,9 +285,7 @@ jobs: acir-bench: runs-on: ubuntu-20.04 - needs: [build, configure] - # Note: not fully accurate, but to work with bench-summary needs to be the same as bench-e2e - if: needs.configure.outputs.non-barretenberg-cpp == 'true' + needs: [bench-test-gate, configure] steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } @@ -598,7 +617,7 @@ jobs: yarn-project-formatting: needs: [build, configure] - if: needs.configure.outputs.yarn-project == 'true' || github.ref_name == 'master' + if: needs.configure.outputs.yarn-project == 'true' runs-on: ${{ needs.configure.outputs.username }}-x86 steps: - uses: actions/checkout@v4 @@ -612,7 +631,6 @@ jobs: yarn-project-test: needs: [build, configure] - if: needs.configure.outputs.yarn-project == 'true' || github.ref_name == 'master' runs-on: ${{ needs.configure.outputs.username }}-x86 steps: - uses: actions/checkout@v4 @@ -627,7 +645,6 @@ jobs: prover-client-test: needs: [build, configure] runs-on: ${{ needs.configure.outputs.username }}-x86 - if: needs.configure.outputs.yarn-project == 'true' || github.ref_name == 'master' steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } @@ -638,16 +655,27 @@ jobs: timeout-minutes: 40 run: earthly-ci --no-output ./yarn-project/+prover-client-test - # proving disabled + network-transfer-test: + needs: [network-test-gate, configure] + runs-on: ${{ needs.configure.outputs.username }}-x86 + steps: + - uses: actions/checkout@v4 + with: { ref: "${{ env.GIT_COMMIT }}" } + - uses: ./.github/ci-setup-action + with: + concurrency_key: network-test-${{ matrix.test }} + - name: "Setup and Local Network Tests" + timeout-minutes: 60 + run: sudo shutdown -P 60 ; earthly-ci --no-output ./yarn-project/+network-test --test=./${{ matrix.test }} + network-test: - needs: [build, configure] - if: needs.configure.outputs.yarn-project == 'true' || github.ref_name == 'master' + needs: [network-test-gate, configure] runs-on: ${{ needs.configure.outputs.username }}-x86 strategy: max-parallel: 1 fail-fast: false matrix: - test: [test-transfer.sh, test-4epochs.sh] + test: [test-4epochs.sh] steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } @@ -656,8 +684,6 @@ jobs: concurrency_key: network-test-${{ matrix.test }} - name: "Setup and Local Network Tests" timeout-minutes: 60 - # Only allow transfer test to run on every (non-network-all) PR - if: matrix.test == 'test-transfer.sh' || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') run: sudo shutdown -P 60 ; earthly-ci --no-output ./yarn-project/+network-test --test=./${{ matrix.test }} kind-smoke-test: @@ -839,9 +865,8 @@ jobs: max-items-in-chart: 50 boxes: - needs: [build, configure] + needs: [e2e-test-gate, configure] runs-on: ${{ needs.configure.outputs.username }}-x86 - if: github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'boxes') || contains(github.event.pull_request.labels.*.name, 'e2e-all') steps: - uses: actions/checkout@v4 with: { ref: "${{ github.event.pull_request.head.sha }}" } @@ -854,7 +879,7 @@ jobs: run: earthly-ci +export-boxes boxes-test: - needs: [boxes, configure] + needs: [e2e-test-gate, configure] runs-on: ${{ needs.configure.outputs.username }}-x86 strategy: fail-fast: false @@ -876,7 +901,7 @@ jobs: run: earthly-ci -P --no-output +test --box=${{ matrix.box }} --browser=${{ matrix.browser }} --mode=cache rough-rhino-installer: - needs: [configure] + needs: [e2e-test-gate, configure] runs-on: ${{ needs.configure.outputs.username }}-x86 steps: - uses: actions/checkout@v4 @@ -890,7 +915,7 @@ jobs: protocol-circuits-gates-report: needs: [build, configure] - if: needs.configure.outputs.non-docs == 'true' && needs.configure.outputs.non-barretenberg-cpp == 'true' + if: needs.configure.outputs.non-docs == 'true' && needs.configure.outputs.non-misc-ci == 'true' runs-on: ${{ needs.configure.outputs.username }}-x86 permissions: pull-requests: write @@ -1044,7 +1069,7 @@ jobs: actions: write needs: - merge-check - if: github.event.pull_request.draft == false && !cancelled() + if: github.event.pull_request.draft == false && !cancelled() && !contains(github.ref_name, 'gh-readonly-queue') steps: - name: Check for Rerun env: From 7b4dd8e6bfd4e36eef572f1d96f2a4b155ebdd93 Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 18:28:18 +0000 Subject: [PATCH 2/9] try with true --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1053e28691..6c81a519ffa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: - master - provernet - "*/ci-push*" + merge_group: pull_request: types: - opened @@ -18,7 +19,7 @@ on: concurrency: # force parallelism in master - group: ci-${{ (contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master') && github.run_id || github.ref_name }} + group: ci-${{ (true || github.ref_name == 'master') && github.run_id || github.ref_name }} cancel-in-progress: true env: @@ -187,21 +188,21 @@ jobs: bench-test-gate: needs: [build, configure] - if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench-all') }} + if: ${{ true || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench-all') }} runs-on: ubuntu-20.04 steps: - run: "echo Full bench tests enabled." e2e-test-gate: needs: [build, configure] - if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} + if: ${{ true || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} runs-on: ubuntu-20.04 steps: - run: "echo Full E2E tests enabled." network-test-gate: needs: [build, configure] - if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} + if: ${{ true || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') }} runs-on: ubuntu-20.04 steps: - run: "echo Full network tests enabled." @@ -1069,7 +1070,7 @@ jobs: actions: write needs: - merge-check - if: github.event.pull_request.draft == false && !cancelled() && !contains(github.ref_name, 'gh-readonly-queue') + if: github.event.pull_request.draft == false && !cancelled() && !true steps: - name: Check for Rerun env: From f3f3426a08877f116a0c83c81e83be9d7f68240e Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 18:45:24 +0000 Subject: [PATCH 3/9] fix ci --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c81a519ffa..86346987037 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -667,9 +667,9 @@ jobs: concurrency_key: network-test-${{ matrix.test }} - name: "Setup and Local Network Tests" timeout-minutes: 60 - run: sudo shutdown -P 60 ; earthly-ci --no-output ./yarn-project/+network-test --test=./${{ matrix.test }} + run: sudo shutdown -P 60 ; earthly-ci --no-output ./yarn-project/+network-test --test=./test-transfer.sh - network-test: + network-full-test: needs: [network-test-gate, configure] runs-on: ${{ needs.configure.outputs.username }}-x86 strategy: @@ -717,8 +717,7 @@ jobs: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin NAMESPACE=smoke FRESH_INSTALL=true VALUES_FILE=default.yaml ./scripts/network_test.sh ./src/spartan/smoke.test.ts - # note: proving disabled - kind-network-test: + kind-network-full-test: needs: [build, configure] if: contains(github.event.pull_request.labels.*.name, 'network-all') || (needs.configure.outputs.yarn-project == 'true' && github.ref_name == 'master') runs-on: ${{ needs.configure.outputs.username }}-x86 From c5bca1db75c580330f68135c6b5577dc3180d376 Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 18:53:23 +0000 Subject: [PATCH 4/9] kind tests --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86346987037..ba767c9431d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1020,9 +1020,10 @@ jobs: - yarn-project-formatting - yarn-project-test - prover-client-test - - network-test + - network-transfer-test + - network-full-test # OK if skipped - kind-smoke-test - - kind-network-test + - kind-network-full-test # OK if skipped - l1-contracts-test - docs-preview # - bb-bench # non-blocking From b32e4b6fa5845006feef540801a6924fbfc53d90 Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 19:14:20 +0000 Subject: [PATCH 5/9] fix dependency tree --- .github/workflows/ci.yml | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba767c9431d..0428109b422 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -166,6 +166,8 @@ jobs: # (Note ARM uses just 2 tests as a smoketest) - name: Create list of non-bench end-to-end jobs id: e2e_list + env: + REF: (true) && 'master' || github.ref_name run: | if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then LABELS=$(jq -r '.pull_request.labels | map(.name) | join(",")' "$GITHUB_EVENT_PATH") @@ -173,18 +175,20 @@ jobs: LABELS="" fi echo Labels: $LABELS - echo "list=$(./scripts/ci/get_e2e_jobs.sh ${{github.ref_name}} "$LABELS")" - echo "list=$(./scripts/ci/get_e2e_jobs.sh ${{github.ref_name}} "$LABELS")" >> $GITHUB_OUTPUT + echo "list=$(./scripts/ci/get_e2e_jobs.sh $REF "$LABELS")" + echo "list=$(./scripts/ci/get_e2e_jobs.sh $REF "$LABELS")" >> $GITHUB_OUTPUT - name: Create list of bench end-to-end jobs id: bench_list + env: + REF: (true) && 'master' || github.ref_name run: | if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then LABELS=$(jq -r '.pull_request.labels | map(.name) | join(",")' "$GITHUB_EVENT_PATH") else LABELS="" fi - echo Labels: $LABELS - echo "list=$(./scripts/ci/get_bench_jobs.sh ${{github.ref_name}} "$LABELS")" >> $GITHUB_OUTPUT + echo "list=$(./scripts/ci/get_bench_jobs.sh $REF "$LABELS")" + echo "list=$(./scripts/ci/get_bench_jobs.sh $REF "$LABELS")" >> $GITHUB_OUTPUT bench-test-gate: needs: [build, configure] @@ -864,20 +868,6 @@ jobs: alert-comment-cc-users: "@ludamad @codygunton" max-items-in-chart: 50 - boxes: - needs: [e2e-test-gate, configure] - runs-on: ${{ needs.configure.outputs.username }}-x86 - steps: - - uses: actions/checkout@v4 - with: { ref: "${{ github.event.pull_request.head.sha }}" } - - uses: ./.github/ci-setup-action - with: - concurrency_key: boxes - - name: Build - working-directory: ./boxes - timeout-minutes: 40 - run: earthly-ci +export-boxes - boxes-test: needs: [e2e-test-gate, configure] runs-on: ${{ needs.configure.outputs.username }}-x86 @@ -893,8 +883,11 @@ jobs: with: { ref: "${{ github.event.pull_request.head.sha }}" } - uses: ./.github/ci-setup-action with: - # must be globally unique for build x runner - concurrency_key: boxes-${{ needs.configure.outputs.username }}-x86-${{ matrix.box }}-${{ matrix.browser }} + concurrency_key: boxes-${{ matrix.box }}-${{ matrix.browser }} + - name: Build + working-directory: ./boxes + timeout-minutes: 40 + run: earthly-ci +export-boxes - name: Box test working-directory: ./boxes timeout-minutes: 40 @@ -1027,8 +1020,7 @@ jobs: - l1-contracts-test - docs-preview # - bb-bench # non-blocking - - boxes - - boxes-test + - boxes-test # OK if skipped # - protocol-circuits-gates-report # non-blocking if: always() outputs: From 6476ebeaf8c9499fcdaa857bc68f3429fce2c95f Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 19:36:10 +0000 Subject: [PATCH 6/9] instate gh-readonly-queue handling --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0428109b422..a1e722fcef2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,7 +167,7 @@ jobs: - name: Create list of non-bench end-to-end jobs id: e2e_list env: - REF: (true) && 'master' || github.ref_name + REF: contains(github.ref_name, 'gh-readonly-queue') && 'master' || github.ref_name run: | if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then LABELS=$(jq -r '.pull_request.labels | map(.name) | join(",")' "$GITHUB_EVENT_PATH") @@ -180,7 +180,7 @@ jobs: - name: Create list of bench end-to-end jobs id: bench_list env: - REF: (true) && 'master' || github.ref_name + REF: contains(github.ref_name, 'gh-readonly-queue') && 'master' || github.ref_name run: | if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then LABELS=$(jq -r '.pull_request.labels | map(.name) | join(",")' "$GITHUB_EVENT_PATH") @@ -192,21 +192,21 @@ jobs: bench-test-gate: needs: [build, configure] - if: ${{ true || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench-all') }} + if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench-all') }} runs-on: ubuntu-20.04 steps: - run: "echo Full bench tests enabled." e2e-test-gate: needs: [build, configure] - if: ${{ true || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} + if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} runs-on: ubuntu-20.04 steps: - run: "echo Full E2E tests enabled." network-test-gate: needs: [build, configure] - if: ${{ true || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') }} + if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') }} runs-on: ubuntu-20.04 steps: - run: "echo Full network tests enabled." From 4cb9a24597fc573689d758a53b75322d4dba090e Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 20:00:58 +0000 Subject: [PATCH 7/9] update --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1e722fcef2..2857f691a97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,8 @@ on: inputs: {} concurrency: - # force parallelism in master - group: ci-${{ (true || github.ref_name == 'master') && github.run_id || github.ref_name }} + # allow parallelism in master and merge queue + group: ci-${{ (contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master') && github.run_id || github.ref_name }} cancel-in-progress: true env: @@ -159,7 +159,7 @@ jobs: # prepare images locally, tagged by commit hash - name: "Build E2E Image" timeout-minutes: 40 - if: (needs.configure.outputs.non-docs == 'true' && needs.configure.outputs.non-barretenberg-cpp == 'true') || env.RUN_FULL_TESTS == 'true' + if: needs.configure.outputs.non-docs == 'true' run: | earthly-ci ./yarn-project+export-e2e-test-images # We base our e2e list used in e2e-x86 off the targets in ./yarn-project/end-to-end From da7b9716b62834ec33a426b2318555184b80b77e Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 15:09:41 -0500 Subject: [PATCH 8/9] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2857f691a97..88abb030e65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,7 +206,7 @@ jobs: network-test-gate: needs: [build, configure] - if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') }} + if: github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') }} runs-on: ubuntu-20.04 steps: - run: "echo Full network tests enabled." From 4a451b8d5d9f9480a29ae3f7357bcf884c3bb2d6 Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 11 Dec 2024 15:13:11 -0500 Subject: [PATCH 9/9] Update ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88abb030e65..1b0da3a15b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,21 +192,21 @@ jobs: bench-test-gate: needs: [build, configure] - if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench-all') }} + if: contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'bench-all') runs-on: ubuntu-20.04 steps: - run: "echo Full bench tests enabled." e2e-test-gate: needs: [build, configure] - if: ${{ contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') }} + if: contains(github.ref_name, 'gh-readonly-queue') || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'e2e-all') runs-on: ubuntu-20.04 steps: - run: "echo Full E2E tests enabled." network-test-gate: needs: [build, configure] - if: github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') }} + if: github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') runs-on: ubuntu-20.04 steps: - run: "echo Full network tests enabled."