-
Notifications
You must be signed in to change notification settings - Fork 52
173 lines (163 loc) · 8.36 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: main
on:
push:
jobs:
store-image-name-and-tags:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml
filter-commit-changes:
runs-on: ubuntu-latest
name: Filter commit changes
outputs:
coordinator: ${{ steps.filter.outputs.coordinator }}
postman: ${{ steps.filter.outputs.postman }}
prover: ${{ steps.filter.outputs.prover }}
traces-api-facade: ${{ steps.filter.outputs.traces-api-facade }}
finalized-tag-updater: ${{ steps.filter.outputs.finalized-tag-updater }}
no-changes: ${{ steps.filter.outputs.coordinator == 'false' && steps.filter.outputs.postman == 'false' && steps.filter.outputs.prover == 'false' && steps.filter.outputs.traces-api-facade == 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Filter commit changes
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
list-files: "json"
filters: |
coordinator:
- 'coordinator/**'
- 'testdata/**'
- 'buildSrc/**'
- 'jvm-libs/**'
- 'prover/lib/compressor/**'
- 'gradle/**'
- 'build.gradle'
- 'gradle.properties'
- 'settings.gradle'
- '.github/workflows/coordinator-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'config/common/traces-limits-v1.toml'
- 'config/common/traces-limits-v2.toml'
- 'config/coordinator/**'
- 'e2e/**'
- 'contracts/abi/**'
- 'contracts/contracts/**'
- 'docker/compose.yml'
- 'docker/compose-local-dev.overrides.yml'
- 'docker/compose-local-dev-traces-v2.overrides.yml'
postman:
- 'sdk/**'
- '.github/workflows/postman-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
prover:
- 'prover/**'
- '.github/workflows/prover-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'constraints'
traces-api-facade:
- 'traces-api-facade/**'
- 'jvm-libs/**'
- 'config/common/traces-limits-v1.toml'
- '.github/workflows/traces-api-facade-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'buildSrc/**'
- 'gradle/**'
- 'build.gradle'
- 'gradle.properties'
- 'settings.gradle'
finalized-tag-updater:
- 'finalized-tag-updater/**'
- '.github/workflows/main.yml'
- '.github/workflows/finalized-tag-updater-github-release.yml'
check-and-tag-images:
needs: [ store-image-name-and-tags, filter-commit-changes ]
uses: ./.github/workflows/reuse-check-images-tags-and-push.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
last_commit_tag: ${{ needs.store-image-name-and-tags.outputs.last_commit_tag }}
common_ancestor_tag: ${{ needs.store-image-name-and-tags.outputs.common_ancestor_tag }}
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
secrets: inherit
docker-build:
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
uses: ./.github/workflows/build-and-publish.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
last_commit_tag: ${{ needs.store-image-name-and-tags.outputs.last_commit_tag }}
common_ancestor_tag: ${{ needs.store-image-name-and-tags.outputs.common_ancestor_tag }}
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
prover_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_prover }}
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
secrets: inherit
# Comment out the auto build and release step below as the plugin release should be
# by manual Github action for versioning control
# finalized-tag-updater-jar-build-release:
# needs: [ filter-commit-changes ]
# if: ${{ always() && needs.filter-commit-changes.outputs.finalized-tag-updater == 'true' }}
# uses: ./.github/workflows/finalized-tag-updater-github-release.yml
# with:
# version: '0.0.1'
testing:
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
if: ${{ always() && needs.filter-commit-changes.outputs.no-changes == 'false' }}
uses: ./.github/workflows/testing.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
coordinator_changed: ${{ needs.filter-commit-changes.outputs.coordinator }}
postman_changed: ${{ needs.filter-commit-changes.outputs.postman }}
prover_changed: ${{ needs.filter-commit-changes.outputs.prover }}
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
coordinator_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_coordinator }}
postman_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_postman }}
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
secrets: inherit
run-e2e-tests-geth-tracing:
needs: [ store-image-name-and-tags, docker-build ]
if: ${{ always() && needs.docker-build.result == 'success' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
tracing-engine: 'geth'
e2e-tests-logs-dump: true
secrets: inherit
run-e2e-tests:
needs: [ store-image-name-and-tags, docker-build ]
if: ${{ always() && needs.docker-build.result == 'success' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
tracing-engine: 'besu'
e2e-tests-logs-dump: true
secrets: inherit
tag-after-run-tests-success:
needs: [ store-image-name-and-tags, testing, run-e2e-tests, run-e2e-tests-geth-tracing ]
if: ${{ always() && needs.testing.result == 'success' && needs.run-e2e-tests.outputs.tests_outcome == 'success' && needs.run-e2e-tests-geth-tracing.outputs.tests_outcome == 'success' }}
uses: ./.github/workflows/reuse-tag-without-untested-suffix.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
develop_tag: ${{ needs.store-image-name-and-tags.outputs.develop_tag }}
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
image_names: '["consensys/linea-coordinator", "consensys/linea-postman", "consensys/linea-prover", "consensys/linea-traces-api-facade"]'
secrets: inherit