-
Notifications
You must be signed in to change notification settings - Fork 268
/
Earthfile
240 lines (180 loc) · 7.67 KB
/
Earthfile
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
VERSION 0.8
E2E_COMPOSE_TEST:
FUNCTION
ARG test
ARG compose_file=./scripts/docker-compose.yml
ARG debug="aztec:*"
ARG hardware_concurrency=""
LOCALLY
ENV TEST=$test
ENV DEBUG=$debug
ENV HARDWARE_CONCURRENCY=$hardware_concurrency
LET project_name=$(echo $test | sed 's/\./_/g' | sed 's/\//_/g')
IF docker compose > /dev/null 2>&1
LET CMD="docker compose"
ELSE
LET CMD="docker-compose"
END
# Let docker compose know about the pushed tags above
ENV AZTEC_DOCKER_TAG=$(git rev-parse HEAD)
# Optimize to not cause serial behavior if image already exists
IF ! docker image ls --format '{{.Repository}}:{{.Tag}}' | grep "aztecprotocol/aztec:$AZTEC_DOCKER_TAG" || \
! docker image ls --format '{{.Repository}}:{{.Tag}}' | grep "aztecprotocol/end-to-end:$AZTEC_DOCKER_TAG"
WAIT
BUILD ../+export-e2e-test-images
END
END
# Run our docker compose, ending whenever sandbox ends, filtering out noisy eth_getLogs
ENV JOB_NAME=$project_name
RUN $CMD -p $project_name -f $compose_file up --exit-code-from=end-to-end --force-recreate
E2E_TEST:
FUNCTION
ARG hardware_concurrency=""
ARG test
ARG allow_fail=false
LOCALLY
# Let docker compose know about the pushed tags above
ENV AZTEC_DOCKER_TAG=$(git rev-parse HEAD)
# Optimize to not cause serial behavior if image already exists
IF ! docker image ls --format '{{.Repository}}:{{.Tag}}' | grep "aztecprotocol/end-to-end:$AZTEC_DOCKER_TAG"
WAIT
BUILD ../+export-end-to-end
END
END
# Run our docker compose, ending whenever sandbox ends, filtering out noisy eth_getLogs
RUN docker run -e HARDWARE_CONCURRENCY=$hardware_concurrency --rm aztecprotocol/end-to-end:$AZTEC_DOCKER_TAG $test || $allow_fail
e2e-2-pxes:
DO +E2E_TEST --test=./src/e2e_2_pxes.test.ts
e2e-prover-full:
DO +E2E_TEST --test=./src/e2e_prover/full --hardware_concurrency=${HARDWARE_CONCURRENCY:-32}
e2e-prover-with-padding:
DO +E2E_TEST --test=./src/e2e_prover/with_padding --hardware_concurrency=${HARDWARE_CONCURRENCY:-32}
e2e-account-contracts:
DO +E2E_TEST --test=./src/e2e_account_contracts.test.ts
e2e-auth-contract:
DO +E2E_TEST --test=./src/e2e_auth_contract.test.ts
e2e-authwit:
DO +E2E_TEST --test=./src/e2e_authwit.test.ts
e2e-avm-simulator:
DO +E2E_TEST --test=./src/e2e_avm_simulator.test.ts
e2e-blacklist-token-contract:
DO +E2E_TEST --test=./src/e2e_blacklist_token_contract
e2e-block-building:
DO +E2E_TEST --test=./src/e2e_block_building.test.ts
e2e-card-game:
DO +E2E_TEST --test=./src/e2e_card_game.test.ts
e2e-cheat-codes:
DO +E2E_TEST --test=./src/e2e_cheat_codes.test.ts
e2e-counter-contract:
DO +E2E_TEST --test=./src/e2e_counter_contract.test.ts
e2e-cross-chain-messaging:
DO +E2E_TEST --test=./src/e2e_cross_chain_messaging.test.ts
e2e-crowdfunding-and-claim:
DO +E2E_TEST --test=./src/e2e_crowdfunding_and_claim.test.ts
e2e-delegate-calls:
DO +E2E_TEST --test=./src/e2e_delegate_calls
e2e-deploy-contract:
DO +E2E_TEST --test=./src/e2e_deploy_contract
e2e-encryption:
DO +E2E_TEST --test=./src/e2e_encryption.test.ts
e2e-escrow-contract:
DO +E2E_TEST --test=./src/e2e_escrow_contract.test.ts
e2e-key-registry:
DO +E2E_TEST --test=./src/e2e_key_registry.test.ts
e2e-keys:
DO +E2E_TEST --test=./src/e2e_keys.test.ts
e2e-lending-contract:
DO +E2E_TEST --test=./src/e2e_lending_contract.test.ts
e2e-max-block-number:
DO +E2E_TEST --test=./src/e2e_max_block_number.test.ts
e2e-multiple-accounts-1-enc-key:
DO +E2E_TEST --test=./src/e2e_multiple_accounts_1_enc_key.test.ts
e2e-nested-contract:
DO +E2E_TEST --test=./src/e2e_nested_contract
e2e-non-contract-account:
DO +E2E_TEST --test=./src/e2e_non_contract_account.test.ts
e2e-note-getter:
DO +E2E_TEST --test=./src/e2e_note_getter.test.ts
e2e-ordering:
DO +E2E_TEST --test=./src/e2e_ordering.test.ts
e2e-outbox:
DO +E2E_TEST --test=./src/e2e_outbox.test.ts
e2e-pending-note-hashes-contract:
DO +E2E_TEST --test=./src/e2e_pending_note_hashes_contract.test.ts
e2e-private-voting-contract:
DO +E2E_TEST --test=./src/e2e_private_voting_contract.test.ts
e2e-fees-private-payments:
DO +E2E_TEST --test=./src/e2e_fees/private_payments.test.ts
e2e-fees-gas-estimation:
DO +E2E_TEST --test=./src/e2e_fees/gas_estimation.test.ts
e2e-fees-dapp-subscription:
DO +E2E_TEST --test=./src/e2e_fees/dapp_subscription.test.ts
e2e-fees-failures:
DO +E2E_TEST --test=./src/e2e_fees/failures.test.ts
e2e-fees-native-payments:
DO +E2E_TEST --test=./src/e2e_fees/native_payments.test.ts
e2e-fees-account-init:
DO +E2E_TEST --test=./src/e2e_fees/account_init.test.ts
e2e-public-cross-chain-messaging:
DO +E2E_TEST --test=./src/e2e_public_cross_chain_messaging
e2e-public-to-private-messaging:
DO +E2E_TEST --test=./src/e2e_public_to_private_messaging.test.ts
e2e-state-vars:
DO +E2E_TEST --test=./src/e2e_state_vars.test.ts
e2e-logs:
DO +E2E_TEST --test=./src/e2e_event_logs.test.ts
e2e-static-calls:
DO +E2E_TEST --test=./src/e2e_static_calls.test.ts
e2e-token-contract:
DO +E2E_TEST --test=./src/e2e_token_contract
flakey-e2e-tests:
DO +E2E_TEST --test=./src/flakey --allow_fail=true
e2e-sandbox-example:
DO +E2E_COMPOSE_TEST --test=e2e_sandbox_example.test.ts
uniswap-trade-on-l1-from-l2:
DO +E2E_COMPOSE_TEST --test=uniswap_trade_on_l1_from_l2.test.ts
integration-l1-publisher:
DO +E2E_COMPOSE_TEST --test=integration_l1_publisher.test.ts
# Disabled, TODO https://github.com/AztecProtocol/aztec-packages/issues/6624
# integration-proof-verification:
# DO +E2E_COMPOSE_TEST --compose_file=./scripts/docker-compose-no-sandbox.yml --test=integration_proof_verification.test.ts
e2e-browser:
DO +E2E_COMPOSE_TEST --test=e2e_aztec_js_browser.test.ts
pxe:
DO +E2E_COMPOSE_TEST --test=pxe.test.ts
e2e-docs-examples:
DO +E2E_COMPOSE_TEST --test=docs_examples.test.ts
guides-writing-an-account-contract:
DO +E2E_COMPOSE_TEST --test=guides/writing_an_account_contract.test.ts
guides-dapp-testing:
DO +E2E_COMPOSE_TEST --test=guides/dapp_testing.test.ts
# TODO intermittent failure
# guides-sample-dapp:
# DO +E2E_COMPOSE_TEST --test=sample-dapp
# TODO currently hangs for hour+
# guides-up-quick-start:
# DO +E2E_COMPOSE_TEST --test=guides/up_quick_start.test.ts
bench-publish-rollup:
ARG PULL_REQUEST
ARG BRANCH
ARG COMMIT_HASH
DO +E2E_COMPOSE_TEST --test=benchmarks/bench_publish_rollup.test.ts --debug="aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees" --compose_file=./scripts/docker-compose-no-sandbox.yml
DO ../../+UPLOAD_LOGS --PULL_REQUEST=$PULL_REQUEST --BRANCH=$BRANCH --COMMIT_HASH=$COMMIT_HASH
bench-process-history:
ARG PULL_REQUEST
ARG BRANCH
ARG COMMIT_HASH
DO +E2E_COMPOSE_TEST --test=benchmarks/bench_process_history.test.ts --debug="aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees" --compose_file=./scripts/docker-compose-no-sandbox.yml
DO ../../+UPLOAD_LOGS --PULL_REQUEST=$PULL_REQUEST --BRANCH=$BRANCH --COMMIT_HASH=$COMMIT_HASH
bench-tx-size:
ARG PULL_REQUEST
ARG BRANCH
ARG COMMIT_HASH
DO +E2E_COMPOSE_TEST --test=benchmarks/bench_tx_size_fees.test.ts --debug="aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees" --enable_gas=1 --compose_file=./scripts/docker-compose-no-sandbox.yml
DO ../../+UPLOAD_LOGS --PULL_REQUEST=$PULL_REQUEST --BRANCH=$BRANCH --COMMIT_HASH=$COMMIT_HASH
bench-prover:
ARG PULL_REQUEST
ARG BRANCH
ARG COMMIT_HASH
DO +E2E_COMPOSE_TEST --test=bench_prover --debug="aztec:benchmarks:*,aztec:prover*,aztec:bb*,aztec:pxe*" --enable_gas=1 --compose_file=./scripts/docker-compose-no-sandbox.yml --hardware_concurrency=${HARDWARE_CONCURRENCY:-32}
DO ../../+UPLOAD_LOGS --PULL_REQUEST=$PULL_REQUEST --BRANCH=$BRANCH --COMMIT_HASH=$COMMIT_HASH