Skip to content

Commit

Permalink
Merge branch 'master' into zpedro/boxes_codespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Apr 19, 2024
2 parents f96e945 + 165e62f commit 8528913
Show file tree
Hide file tree
Showing 806 changed files with 18,150 additions and 12,900 deletions.
96 changes: 48 additions & 48 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -531,35 +531,35 @@ jobs:
# Semantics are similar to Dockerfile

# NOTE: Unlike other e2e, these will be re-enabled here as currently the logs functionality is not in the new earthfile setup
# bench-publish-rollup:
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Benchmark"
# command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_publish_rollup.test.ts DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
# aztec_manifest_key: end-to-end
# <<: *defaults_e2e_test

# bench-process-history:
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Benchmark"
# command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_process_history.test.ts DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
# aztec_manifest_key: end-to-end
# <<: *defaults_e2e_test

# bench-tx-size:
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Benchmark"
# command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_tx_size_fees.test.ts ENABLE_GAS=1 DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
# aztec_manifest_key: end-to-end
# <<: *defaults_e2e_test
bench-publish-rollup:
steps:
- *checkout
- *setup_env
- run:
name: "Benchmark"
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_publish_rollup.test.ts DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
aztec_manifest_key: end-to-end
<<: *defaults_e2e_test

bench-process-history:
steps:
- *checkout
- *setup_env
- run:
name: "Benchmark"
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_process_history.test.ts DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
aztec_manifest_key: end-to-end
<<: *defaults_e2e_test

bench-tx-size:
steps:
- *checkout
- *setup_env
- run:
name: "Benchmark"
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_tx_size_fees.test.ts ENABLE_GAS=1 DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
aztec_manifest_key: end-to-end
<<: *defaults_e2e_test

build-docs:
machine:
Expand Down Expand Up @@ -597,15 +597,15 @@ jobs:
name: "Noop"
command: echo Noop

# bench-summary:
# machine:
# image: default
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Assemble benchmark summary from uploaded logs"
# command: ./scripts/ci/assemble_e2e_benchmark.sh
bench-summary:
machine:
image: default
steps:
- *checkout
- *setup_env
- run:
name: "Assemble benchmark summary from uploaded logs"
command: ./scripts/ci/assemble_e2e_benchmark.sh

# Deploy & release jobs.
deploy-and-release:
Expand All @@ -629,7 +629,7 @@ jobs:
command: |
should_deploy || exit 0
deploy_terraform_services iac/mainnet-fork mainnet-fork mainnet-fork aws_efs_file_system.aztec_mainnet_fork_data_store
./iac/scripts/wait_for_fork
./iac/mainnet-fork/scripts/wait_for_fork
- run:
name: "Release canary to NPM: bb.js"
command: |
Expand Down Expand Up @@ -898,15 +898,15 @@ workflows:
<<: *defaults

# Benchmark jobs.
# - bench-publish-rollup: *e2e_test
# - bench-process-history: *e2e_test
# - bench-tx-size: *e2e_test
# - bench-summary:
# requires:
# - bench-publish-rollup
# - bench-process-history
# - bench-tx-size
# <<: *defaults
- bench-publish-rollup: *e2e_test
- bench-process-history: *e2e_test
- bench-tx-size: *e2e_test
- bench-summary:
requires:
- bench-publish-rollup
- bench-process-history
- bench-tx-size
<<: *defaults

# Production releases.
- deploy-and-release: *defaults_deploy
3 changes: 2 additions & 1 deletion .devcontainer/token/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"target": "/root/workspace/.devcontainer/scripts",
"type": "bind"
}
]
],
"forwardPorts": [8080]
}
2 changes: 1 addition & 1 deletion .github/ci-setup-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ runs:
echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" > "/run/${{ inputs.concurrency_key }}.lock"
echo "/run/${{ inputs.concurrency_key }}.lock acquired."
post: |
rm "/run/${{ inputs.concurrency_key }}.lock"
rm "/run/${{ inputs.concurrency_key }}.lock" || true
echo "/run/${{ inputs.concurrency_key }}.lock removed."
15 changes: 15 additions & 0 deletions .github/workflows/ci-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,18 @@ jobs:
working-directory: ./yarn-project/end-to-end/
timeout-minutes: 15
run: earthly -P --no-output +uniswap-trade-on-l1-from-l2 --e2e_mode=cache

notify:
needs: [e2e]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && failure() }}
steps:
- name: Send notification to aztec3-ci channel if workflow failed on master
uses: slackapi/[email protected]
with:
payload: |
{
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WORKFLOW_TRIGGER_URL }}
44 changes: 37 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
runner_label: ${{ github.actor }}-x86
ebs_cache_size_gb: 256
runner_concurrency: 50
runner_concurrency: 20
subaction: ${{ github.event.inputs.runner_action || 'start' }}
ec2_instance_type: m6a.32xlarge
ec2_ami_id: ami-04d8422a9ba4de80f
Expand All @@ -44,7 +44,7 @@ jobs:
# prepare images locally, tagged by commit hash
- name: "Build E2E Image"
timeout-minutes: 40
run: earthly ./yarn-project+export-end-to-end
run: earthly-ci ./yarn-project+export-end-to-end
# We base our e2e list used in e2e-x86 off the targets in ./yarn-project/end-to-end
# (Note ARM uses just 2 tests as a smoketest)
- name: Create list of end-to-end jobs
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Test
working-directory: ./yarn-project/end-to-end/
timeout-minutes: 25
run: earthly -P --no-output +${{ matrix.test }} --e2e_mode=cache
run: earthly-ci -P --no-output +${{ matrix.test }} --e2e_mode=cache
# TODO
# - name: Upload logs
# run: BRANCH=${{ github.ref_name }} PULL_REQUEST=${{ github.event.number }} scripts/ci/upload_logs_to_s3 ./yarn-project/end-to-end/log
Expand All @@ -93,7 +93,7 @@ jobs:
working-directory: ./barretenberg/cpp/
timeout-minutes: 25
# limit our parallelism to half our cores
run: earthly --no-output +test --hardware_concurrency=64
run: earthly-ci --no-output +test --hardware_concurrency=64

# push benchmarking binaries to dockerhub registry
bb-bench-binaries:
Expand All @@ -109,7 +109,7 @@ jobs:
if: ${{ github.event.inputs.just_start_spot != 'true' }}
timeout-minutes: 15
working-directory: ./barretenberg/cpp/
run: earthly --push +bench-binaries
run: earthly-ci --push +bench-binaries

setup-bench:
uses: ./.github/workflows/setup-runner.yml
Expand Down Expand Up @@ -137,9 +137,39 @@ jobs:
- name: Client IVC Bench
working-directory: ./barretenberg/cpp/
timeout-minutes: 15
run: earthly --no-output +bench-client-ivc --bench_mode=cache
run: earthly-ci --no-output +bench-client-ivc --bench_mode=cache

- name: Ultrahonk Bench
working-directory: ./barretenberg/cpp/
timeout-minutes: 15
run: earthly --no-output +bench-ultra-honk --bench_mode=cache
run: earthly-ci --no-output +bench-ultra-honk --bench_mode=cache

merge-check:
runs-on: ${{ github.actor }}-x86
needs: [e2e, bb-native-tests, bb-bench]
if: always() # Ensures this job runs regardless of the success or failure of dependencies.
steps:
- run: |
echo "E2E Test Status: ${{ needs.e2e.result }}"
echo "Native Tests Status: ${{ needs.bb-native-tests.result }}"
echo "Bench Tests Status: ${{ needs.bb-bench.result }}"
if [[ "${{ needs.e2e.result }}" != 'success' || "${{ needs.bb-native-tests.result }}" != 'success' || "${{ needs.bb-bench.result }}" != 'success' ]]; then
echo "Pull request merging not allowed due to failures."
exit 1
fi
echo "Pull request merging now allowed."
notify:
needs: [e2e, bb-native-tests, bb-bench]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && failure() }}
steps:
- name: Send notification to aztec3-ci channel if workflow failed on master
uses: slackapi/[email protected]
with:
payload: |
{
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WORKFLOW_TRIGGER_URL }}
21 changes: 15 additions & 6 deletions .github/workflows/setup-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# just for the CI job. These are specced per user and run the entire CI.
# TODO These have a persistent EBS volume that forms a fast-online docker image cache (used by Earthly), meaning
# TODO build steps that ran in previous invocations are quickly ran from cache.
name: Reusable Spot Instance and Setup Workflow
name: Setup Runner and CI
on:
workflow_call:
inputs:
Expand All @@ -19,6 +19,7 @@ on:
ec2_ami_id:
required: true
type: string
# how much time to add to shutdown when a job finishes or starts
ec2_instance_ttl:
required: true
type: number
Expand Down Expand Up @@ -52,9 +53,12 @@ on:
jobs:
start-builder:
runs-on: ubuntu-latest
# we want to avoid race conditions when making spot across multiple PRs as we only use one runner
concurrency:
group: start-builder-${{ inputs.runner_label }}
steps:
- name: Start EC2 runner
uses: AztecProtocol/ec2-action-builder@v0.8
uses: AztecProtocol/ec2-action-builder@v0.14e
with:
github_token: ${{ secrets.GH_SELF_HOSTED_RUNNER_TOKEN }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -93,22 +97,27 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: ./scripts/attach_ebs_cache.sh ${{ inputs.runner_label }} ${{ inputs.ebs_cache_size_gb }}

- name: Configure and Restart Docker
- name: Configure Machine
shell: bash
run: |
# We need to restart after attaching disk cache
# Both only happen once, so we just make sure this happens once
# One-time config
if ! [ -f /etc/docker/daemon.json ] ; then
echo '{"default-address-pools":[{"base":"172.17.0.0/12","size":20}, {"base":"10.99.0.0/12","size":20}, {"base":"192.168.0.0/16","size":24}]}' > /etc/docker/daemon.json
sudo service docker restart
echo "Configured docker daemon for making many networks."
# Run maybe_exit_spot.sh every minute
cp scripts/ci/spot_runner_graceful_exit.sh /run/spot_runner_graceful_exit.sh
cp scripts/ci/maybe_exit_spot.sh /run/maybe_exit_spot.sh
chmod +x /run/spot_runner_graceful_exit.sh
chmod +x /run/maybe_exit_spot.sh
echo "* * * * * /run/maybe_exit_spot.sh" | crontab -
else
echo "Docker daemon already configured."
fi
- name: Run Docker Prune
# helps to not overuse space
run: docker system prune -f
run: docker system prune -f || true

- name: Run Earthly Bootstrap
run: earthly bootstrap
20 changes: 9 additions & 11 deletions .github/workflows/start-spot.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
# Useful if the spot runners are in a bad state
name: Stop Personal Spot
name: Start Personal Spot
on:
workflow_dispatch: {}
jobs:
stop-build-x86:
uses: ./.github/workflows/setup-runner.yml
with:
runner_label: ${{ github.actor }}-x86
subaction: stop
# not used:
ebs_cache_size_gb: 256
runner_concurrency: 50
runner_concurrency: 20
subaction: start
ec2_instance_type: m6a.32xlarge
ec2_ami_id: ami-0d8a9b0419ddb331a
ec2_instance_ttl: 40
ec2_ami_id: ami-04d8422a9ba4de80f
ec2_instance_ttl: 40 # refreshed by jobs
secrets: inherit

stop-bench:
uses: ./.github/workflows/setup-runner.yml
with:
runner_label: ${{ github.actor }}-bench-x86
subaction: stop
# not used:
ebs_cache_size_gb: 64
runner_concurrency: 1
subaction: start
ec2_instance_type: m6a.4xlarge
ec2_ami_id: ami-0d8a9b0419ddb331a
ec2_instance_ttl: 15
secrets: inherit
ec2_ami_id: ami-04d8422a9ba4de80f
ec2_instance_ttl: 15 # refreshed by jobs
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/stop-spot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
subaction: stop
# not used:
ebs_cache_size_gb: 128
runner_concurrency: 50
runner_concurrency: 20
ec2_instance_type: m6a.32xlarge
ec2_ami_id: ami-0d8a9b0419ddb331a
ec2_instance_ttl: 40
Expand Down
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1d96937a8e94a91c0c17c97102498d067fca76c3
6cc105ee441e093b4fccdd5fcc3db922eb28a3fb
10 changes: 5 additions & 5 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
".": "0.34.0",
"yarn-project/cli": "0.34.0",
"yarn-project/aztec": "0.34.0",
"barretenberg": "0.34.0",
"barretenberg/ts": "0.34.0"
".": "0.35.1",
"yarn-project/cli": "0.35.1",
"yarn-project/aztec": "0.35.1",
"barretenberg": "0.35.1",
"barretenberg/ts": "0.35.1"
}
Loading

0 comments on commit 8528913

Please sign in to comment.