forked from AztecProtocol/aztec-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Noir subrepo. (AztecProtocol#3369)
Finally. Builds the now subrepo'd noir repository. At present this just builds nargo for x86 and arm, meaning our sandbox install script can now provide a wrapper `aztec-nargo` that is guaranteed to always be exactly what we want, regardless of any modifications to macros, compilers, packages, or whatever. Decouples aztec from being dependent on Noirs deployment pipeline, while still providing the ability to push changes back to Noir. Still need to do work to build npm packages and portal them into yarn-project. Will do in separate PR. * Removes old benchmarking stuff and commented canary stuff from pipeline. * Adds nargo x86 and arm builds, outputing a multiarch image that also runs efficiently on macs. * Removes a load of ARCH specific hack stuff in build-system, in favour of all cache image URI's now just have their arch appended to their tag. The arch is determined by the arch of the build system. This required a small "hack(?)" whereby we will fall back from an unfound arch (arm) to x86, as we build some of our arm images from previously build x86 images, but i anticipate that'll change at some point. * Remove some project scripts that bleed the build-system abstraction (e.g. deploy_docker.sh). * Introduces `[ci dry-deploy]` commit message command for doing dry run of deploys. We no longer have conditional workflow filters for deployment to enable this. I.e. there is always deploy jobs, they just noop out asap. If dry-deploy is enabled, the deploy jobs will run to "completion" but doesn't actually execute pushes to dockerhub, and just runs `npm publish` in dry-run mode. * Gets rid of `VERSION` files and the sanity check is it got in the way of the above, and I don't even remember why it was there. * `build-system` can now launch arm spot instances. This can be requested e.g. `cond_spot_run_build noir 32 arm64`. * Added a script to help bootstrap build-instances in case we need to create new AMI's again in future (I had to create and arm one). * Deleted some build-system scripts I couldn't see used anywhere. * `deploy_dockerhub` script now takes list of arches and does the manifest generation itself. * Introduces a `should_deploy` script which enables the early out of deployment jobs. At present this causes exit if there is no COMMIT_TAG. In future it'll want to run the deploy steps if BRANCH is master as well. Follow up PRs will: * Build NPM packages and portal them into yarn-project. * Modify sandbox install script to pull noir image, install `aztec-nargo` wrapper. * Update vscode plugin to allow selection between global `nargo` or `aztec-nargo` if both found. * Someone will do some magic to use the nargo container in github codespaces so users can press `.` and play.
- Loading branch information
1 parent
9557a66
commit d94d88b
Showing
42 changed files
with
304 additions
and
665 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
aztec3-packages | ||
aztec |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt update | ||
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common awscli docker-ce | ||
sudo usermod -aG docker ${USER} | ||
mkdir .aws | ||
echo "Add build-instance credentials to ~/.aws/credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace | ||
set -eu | ||
|
||
REPOSITORY=$1 | ||
ARCH=${2:-$(uname -m)} | ||
[ "$ARCH" == "aarch64" ] && ARCH=arm64 | ||
CONTENT_HASH=$(calculate_content_hash $REPOSITORY) | ||
echo "cache-$CONTENT_HASH-$ARCH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#!/bin/bash | ||
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace | ||
set -eu | ||
set -euo pipefail | ||
|
||
REPOSITORY=$1 | ||
CPUS=$2 | ||
ARCH=${3:-x86_64} | ||
|
||
cond_spot_run_script $REPOSITORY $CPUS build $REPOSITORY | ||
cond_spot_run_script $REPOSITORY $CPUS $ARCH build $REPOSITORY $ARCH | add_timestamps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.