Skip to content

Commit

Permalink
Merge branch 'master' into sync-noir
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jul 15, 2024
2 parents 41fd496 + 598e33d commit b8b0597
Show file tree
Hide file tree
Showing 441 changed files with 10,788 additions and 6,082 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/sandbox_only/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Sandbox Only",
"image": "node:lts-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"onCreateCommand": "cp -R /root/workspace /root/scripts && rm -rf /root/workspace/* && sh /root/scripts/onCreateCommand.sh sandbox_only",
"postAttachCommand": "sh /root/scripts/postAttachCommand.sh",
"customizations": {
"vscode": {
"settings": {},
"extensions": ["noir-lang.vscode-noir"]
}
},
"workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/scripts,target=/root/workspace,type=bind",
"workspaceFolder": "/root/workspace",
"forwardPorts": [8080]
}
21 changes: 12 additions & 9 deletions .devcontainer/scripts/onCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ fi
if ! grep -q "alias sandbox" ~/.bashrc; then
echo "alias sandbox=\"npx aztec-app sandbox\"" >> ~/.bashrc
fi
corepack enable

source ~/.bashrc
yes | npx aztec-app -t $TYPE -n $NAME -s
mv $NAME/* $NAME/.* .
rm -rf $NAME
if [ "$TYPE" != "sandbox_only" ]; then
source ~/.bashrc
yes | npx create-aztec-app -t $TYPE -n $NAME -s
mv $NAME/* $NAME/.* .
rm -rf $NAME

yarn

yarn

npx -y playwright install --with-deps
yarn add @aztec/builder
yarn prep
npx -y playwright install --with-deps
yarn add @aztec/builder
yarn prep
fi
3 changes: 1 addition & 2 deletions .devcontainer/scripts/postAttachCommand.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
TYPE=$1
NAME=$2

apt update
apt install gh
gh codespace ports visibility 8080:public -c $CODESPACE_NAME

Expand Down
2 changes: 1 addition & 1 deletion .github/earthly-ci-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global:
cache_size_pct: 50
buildkit_max_parallelism: 10
buildkit_max_parallelism: 5
container_frontend: docker-shell
buildkit_additional_args: ["-e", "BUILDKIT_STEP_LOG_MAX_SIZE=-1"]
138 changes: 100 additions & 38 deletions .github/workflows/ci-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,114 @@ env:
# kludge until we move away from runners
WAIT_FOR_RUNNERS: false
jobs:
setup:
uses: ./.github/workflows/setup-runner.yml
with:
username: ${{ github.event.pull_request.user.login || github.actor }}
runner_type: builder-arm
secrets: inherit

changes:
runs-on: ubuntu-20.04
# Required permissions.
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
build-images: ${{ steps.filter.outputs.build-images }}
steps:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: |
build-images:
- 'build-images/**'
build-images:
needs: [setup, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-arm
steps:
# permission kludge before checkout, see https://github.com/actions/checkout/issues/211#issuecomment-611986243
- run: sudo chown -R $USER:$USER /home/ubuntu/
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
with:
concurrency_key: build-images-arm
- name: "Push Build Images If Changed"
if: ${{ needs.changes.outputs.build-images }}
timeout-minutes: 40
run: |
earthly-ci --push ./build-images/+build
build:
runs-on: ubuntu-latest
needs: [build-images]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-arm
steps:
# permission kludge before checkout, see https://github.com/actions/checkout/issues/211#issuecomment-611986243
- run: sudo chown -R $USER:$USER /home/ubuntu/
- uses: actions/checkout@v4
with: { ref: "${{ github.event.pull_request.head.sha }}" }
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
with:
concurrency_key: build-arm
# prepare images locally, tagged by commit hash
- name: "Build E2E Image"
timeout-minutes: 40
uses: ./.github/ensure-builder
with:
runner_type: builder-arm
run: |
set -eux
git submodule update --init --recursive --recommend-shallow
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin
scripts/earthly-ci ./yarn-project+export-e2e-test-images
run: |
earthly-ci ./yarn-project+export-e2e-test-images
# all the end-to-end integration tests for aztec
# all the non-bench end-to-end integration tests for aztec
e2e:
needs: build
runs-on: ubuntu-latest
needs: [build]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-arm
steps:
# permission kludge before checkout, see https://github.com/actions/checkout/issues/211#issuecomment-611986243
- run: sudo chown -R $USER:$USER /home/ubuntu/
- uses: actions/checkout@v4
with: { ref: "${{ github.event.pull_request.head.sha }}" }
- name: "Test"
timeout-minutes: 25
uses: ./.github/ensure-builder
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
with:
runner_type: builder-arm
run: |
sudo shutdown -P 25 # hack until core part of the scripts
set -eux
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin
scripts/earthly-ci -P --no-output ./yarn-project/end-to-end/+uniswap-trade-on-l1-from-l2
concurrency_key: e2e-arm
# prepare images locally, tagged by commit hash
- name: "Build E2E Image"
timeout-minutes: 40
run: |
earthly-ci ./yarn-project/end-to-end+uniswap-trade-on-l1-from-l2
# not notifying failures right now
# 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 }}
rerun-check:
runs-on: ubuntu-20.04
permissions:
actions: write
needs: [setup, build-images, build, e2e]
if: ${{ !cancelled() }}
steps:
- name: Check for Rerun
env:
# We treat any skipped or failing jobs as a failure for the workflow as a whole.
HAD_FAILURE: ${{ contains(needs.*.result, 'failure') }}
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
if [[ $HAD_FAILURE == true ]] && [[ $RUN_ATTEMPT -lt 2 ]] ; then
echo "Retrying first workflow failure. This is a stop-gap until things are more stable."
gh workflow run rerun.yml -F run_id=${{ github.run_id }}
fi
# NOTE: we only notify failures after a rerun has occurred
notify:
needs: [e2e]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && failure() && github.run_attempt >= 2 }}
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 }}
Loading

0 comments on commit b8b0597

Please sign in to comment.