Skip to content

Commit 44987a2

Browse files
committed
feat: make jar release condition to unit and replay passing by default'
1 parent 8ad8613 commit 44987a2

File tree

3 files changed

+88
-110
lines changed

3 files changed

+88
-110
lines changed

.github/workflows/gradle-tests.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -71,42 +71,6 @@ jobs:
7171
replay-tests:
7272
if: github.event.pull_request.draft == false && github.base_ref != 'main'
7373
needs: [ build ]
74-
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
75-
steps:
76-
- name: Checkout repository
77-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
78-
with:
79-
submodules: false
80-
81-
- name: Setup Environment
82-
uses: ./.github/actions/setup-environment
83-
with:
84-
enable-ssh: ${{ inputs.tests-with-ssh }}
85-
86-
- name: Run replay tests
87-
run: GOMEMLIMIT=26GiB ./gradlew :arithmetization:fastReplayTests
88-
env:
89-
JAVA_OPTS: -Dorg.gradle.daemon=false
90-
JUNIT_TESTS_PARALLELISM: 4
91-
GOCORSET_FLAGS: -b1024 -v --ansi-escapes=false --report --air
92-
93-
- name: Upload test report
94-
if: ${{ always() }}
95-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
96-
with:
97-
name: replay-tests-report
98-
path: arithmetization/build/reports/tests/**/*
99-
100-
- name: Upload jacoco fast replay tests coverage report
101-
if: always()
102-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
103-
with:
104-
name: jacoco-fast-replay-tests-coverage-report
105-
path: arithmetization/build/reports/jacoco/jacocoFastReplayTestsReport/**/*
106-
107-
- name: Upload jacoco fast replay tests exec file
108-
if: always()
109-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
110-
with:
111-
name: jacoco-fast-replay-tests-exec-file
112-
path: arithmetization/build/jacoco/fastReplayTests.exec
74+
uses: ./.github/workflows/reusable-fast-replay-tests.yml
75+
with:
76+
tests-with-ssh: ${{ inputs.tests-with-ssh || false}}

.github/workflows/manual-release.yml

Lines changed: 32 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
required: true
1515
type: string
1616
default: "v1.2.3"
17+
wait-for-tests-bef-publish:
18+
description: 'If "false", the release jar will be published when ready without waiting for the unit and replay tests to pass.'
19+
required: false
20+
type: string
21+
default: 'true'
1722

1823
jobs:
1924
# ==================================================================
@@ -72,34 +77,6 @@ jobs:
7277
# ==================================================================
7378
# Unit Tests
7479
# ==================================================================
75-
unit-tests-london:
76-
needs: [ build ]
77-
uses: ./.github/workflows/reusable-unit-tests.yml
78-
with:
79-
zkevm_fork: LONDON
80-
tests-with-ssh: false
81-
82-
unit-tests-paris:
83-
needs: [ build ]
84-
uses: ./.github/workflows/reusable-unit-tests.yml
85-
with:
86-
zkevm_fork: PARIS
87-
tests-with-ssh: false
88-
89-
unit-tests-shanghai:
90-
needs: [ build ]
91-
uses: ./.github/workflows/reusable-unit-tests.yml
92-
with:
93-
zkevm_fork: SHANGHAI
94-
tests-with-ssh: false
95-
96-
unit-tests-cancun:
97-
needs: [ build ]
98-
uses: ./.github/workflows/reusable-unit-tests.yml
99-
with:
100-
zkevm_fork: CANCUN
101-
tests-with-ssh: false
102-
10380
unit-tests-prague:
10481
needs: [ build ]
10582
uses: ./.github/workflows/reusable-unit-tests.yml
@@ -112,53 +89,16 @@ jobs:
11289
# ==================================================================
11390
replay-tests:
11491
needs: [ build ]
115-
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
116-
steps:
117-
- name: Checkout repository
118-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
119-
with:
120-
submodules: false
121-
122-
- name: Setup Environment
123-
uses: ./.github/actions/setup-environment
124-
with:
125-
enable-ssh: false
126-
127-
- name: Run replay tests
128-
run: GOMEMLIMIT=26GiB ./gradlew :arithmetization:fastReplayTests
129-
env:
130-
JAVA_OPTS: -Dorg.gradle.daemon=false
131-
JUNIT_TESTS_PARALLELISM: 4
132-
GOCORSET_FLAGS: -b1024 -v --ansi-escapes=false --report --air
133-
ZKEVM_FORK: LONDON
134-
135-
- name: Upload test report
136-
if: ${{ always() }}
137-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
138-
with:
139-
name: replay-tests-report
140-
path: arithmetization/build/reports/tests/**/*
141-
142-
- name: Upload jacoco fast replay tests coverage report
143-
if: always()
144-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
145-
with:
146-
name: jacoco-fast-replay-tests-coverage-report
147-
path: arithmetization/build/reports/jacoco/jacocoFastReplayTestsReport/**/*
148-
149-
- name: Upload jacoco fast replay tests exec file
150-
if: always()
151-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
152-
with:
153-
name: jacoco-fast-replay-tests-exec-file
154-
path: arithmetization/build/jacoco/fastReplayTests.exec
92+
uses: ./.github/workflows/reusable-fast-replay-tests.yml
93+
with:
94+
tests-with-ssh: ${{ inputs.tests-with-ssh || false}}
15595

15696
# ==================================================================
15797
# Publish release post tests
15898
# ==================================================================
159-
publish:
160-
needs: [ build ]
161-
if: github.event_name != 'pull_request'
99+
publish-conditional-to-units-and-replay-tests:
100+
needs: [ build, unit-tests-prague, replay-tests ]
101+
if: ${{ github.event_name != 'pull_request' && inputs.wait-for-tests-bef-publish == 'true'}}
162102
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-med
163103
env:
164104
architecture: "amd64"
@@ -176,3 +116,24 @@ jobs:
176116
env:
177117
CLOUDSMITH_USER: ${{ secrets.CLOUDSMITH_USER }}
178118
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
119+
120+
publish-as-soon-as-ready:
121+
needs: [ build ]
122+
if: ${{ github.event_name != 'pull_request' && inputs.wait-for-tests-bef-publish == 'false'}}
123+
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-med
124+
env:
125+
architecture: "amd64"
126+
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4"
127+
128+
steps:
129+
- name: Checkout
130+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
131+
132+
- name: Setup Environment
133+
uses: ./.github/actions/setup-environment
134+
135+
- name: Publish Java artifacts
136+
run: ./gradlew publish
137+
env:
138+
CLOUDSMITH_USER: ${{ secrets.CLOUDSMITH_USER }}
139+
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Reusable fast replay tests workflow"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
tests-with-ssh:
7+
required: true
8+
type: boolean
9+
10+
jobs:
11+
# ==================================================================
12+
# Fast replay Tests
13+
# ==================================================================
14+
fast-replay-tests:
15+
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
with:
20+
submodules: false
21+
22+
- name: Setup Environment
23+
uses: ./.github/actions/setup-environment
24+
with:
25+
enable-ssh: ${{ inputs.tests-with-ssh }}
26+
27+
- name: Run replay tests
28+
run: GOMEMLIMIT=26GiB ./gradlew :arithmetization:fastReplayTests
29+
env:
30+
JAVA_OPTS: -Dorg.gradle.daemon=false
31+
JUNIT_TESTS_PARALLELISM: 4
32+
GOCORSET_FLAGS: -b1024 -v --ansi-escapes=false --report --air
33+
34+
- name: Upload test report
35+
if: ${{ always() }}
36+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
37+
with:
38+
name: replay-tests-report
39+
path: arithmetization/build/reports/tests/**/*
40+
41+
- name: Upload jacoco fast replay tests coverage report
42+
if: always()
43+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
44+
with:
45+
name: jacoco-fast-replay-tests-coverage-report
46+
path: arithmetization/build/reports/jacoco/jacocoFastReplayTestsReport/**/*
47+
48+
- name: Upload jacoco fast replay tests exec file
49+
if: always()
50+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
51+
with:
52+
name: jacoco-fast-replay-tests-exec-file
53+
path: arithmetization/build/jacoco/fastReplayTests.exec

0 commit comments

Comments
 (0)