Skip to content

Commit

Permalink
Intentionally do a bad merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad committed Sep 6, 2023
2 parents 94d5afd + 28a877b commit 890c374
Show file tree
Hide file tree
Showing 1,093 changed files with 41,147 additions and 25,193 deletions.
328 changes: 270 additions & 58 deletions .circleci/config.yml

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull Request

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
conventional-title:
name: Validate PR title is Conventional Commit
runs-on: ubuntu-latest
steps:
- name: Check title
if: github.event_name == 'pull_request'
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
chore
refactor
docs
test
46 changes: 46 additions & 0 deletions .github/workflows/release_please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: release-please

# Trigger on merges to 'master' branch
on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
# Our release type is simple as all we really want is to update the changelog and trigger a github release
release-type: simple
# Self explanatory
package-name: aztec-packages
# Marks github releases as 'Pre-Release'
prerelease: true
# Our default branch
default-branch: master
# Uses the 'prerelease' versioning strategy to update the pre-release number only e.g. 0.1.0-alpha23 -> 0.1.0-alpha24
versioning-strategy: prerelease
# Don't include the component name in the tag name
include-component-in-tag: false
# Influences the versioning strategy to only update the pre-release number
bump-minor-pre-major: true
# Influences the versioning strategy to only update the pre-release number
bump-patch-for-minor-pre-major: true
# Just a bit of test at the top of the 'Release PR'
pull-request-header: ":robot: I have created a new Aztec Packages release"
# The sections into which changes are grouped on the github release notes
changelog-types: >
[
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":false},
{"type":"test","section":"Miscellaneous","hidden":false},
{"type":"refactor","section":"Miscellaneous","hidden":false},
{"type":"docs","section":"Documentation","hidden":false}
]
10 changes: 6 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@
"**/.yarn": true,
"**/.yalc": true,
"**/node_modules": true,
"**/.pnp.*": true
"**/.pnp.*": true,
"circuits/cpp/barretenberg/**": true,
"**/msgpack-c/**": true
},
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform"
Expand All @@ -128,8 +130,8 @@
// C++/Circuits settings
///////////////////////////////////////
"[cpp]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd",
"editor.formatOnSave": true,
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd",
"editor.formatOnSave": true
},
//
// Clangd. Note that this setting may be overridden by user settings
Expand Down Expand Up @@ -164,7 +166,7 @@
// which ensures SRS can be read
"testMate.cpp.test.workingDirectory": "${workspaceFolder}/circuits/cpp/build",
// Filter all binaries that are not tests
"testMate.cpp.test.executables": "${workspaceFolder}/circuits/cpp/build/bin/*{test,Test,TEST}*",
"testMate.cpp.test.executables": "${workspaceFolder}/circuits/cpp/build/bin/*{test,Test,TEST}*"
// End C++/Circuits settings
///////////////////////////////////////
}
334 changes: 334 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ To build the C++ code, follow the [instructions in the circuits subdirectory](./

To build Typescript code, make sure to have [`nvm`](https://github.com/nvm-sh/nvm) (node version manager) installed.

To build noir code, make sure that you are using the `aztec` tagged version of nargo. This is the latest pin version the team works on to ensure local and ci environments are in sync. This should be installed through `noir-contracts/bootstrap.sh` and the regular `bootstrap.sh` script. However if you find yourself wanting to update to the latest `aztec` tag outside of these channels, you can run `noirup -v aztec` to manually download the latest binaries.

## Continuous Integration

This repository uses CircleCI for continuous integration. Build steps are managed using [`build-system`](https://github.com/AztecProtocol/build-system). Small packages are built and tested as part of a docker build operation, while larger ones and end-to-end tests spin up a large AWS spot instance. Each successful build step creates a new docker image that gets tagged with the package name and commit.
Expand All @@ -28,6 +30,9 @@ All packages need to be included in the [build manifest](`build_manifest.json`),

Logging goes through the [`info` and `debug`](circuits/cpp/barretenberg/cpp/src/barretenberg/common/log.hpp) functions in C++, and through the [DebugLogger](yarn-project/foundation/src/log/debug.ts) module in Typescript. To see the log output, set a `DEBUG` environment variable to the name of the module you want to debug, to `aztec:*`, or to `*` to see all logs.

## Releases

Releases are driven by [release-please](https://github.com/googleapis/release-please), which maintains a 'Release PR' containing an updated CHANGELOG.md since the last release. Triggering a new release is simply a case of merging this PR to master. A [github workflow](./.github/workflows/release_please.yml) will create the tagged release triggering CircleCI to build and deploy the version at that tag.

## Contribute

Expand Down
1 change: 1 addition & 0 deletions barretenberg
42 changes: 1 addition & 41 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,44 +35,4 @@ if [ ! -f ~/.nvm/nvm.sh ]; then
fi

circuits/cpp/bootstrap.sh

# Build the canary
cd canary
yarn install --immutable
yarn build
cd ..

if [ "$(uname)" = "Darwin" ]; then
# works around https://github.com/AztecProtocol/aztec3-packages/issues/158
echo "Note: not sourcing nvm on Mac, see github #158"
else
\. ~/.nvm/nvm.sh
fi
nvm install

cd yarn-project
yarn install --immutable

# Build the necessary dependencies for noir contracts typegen.
for DIR in foundation noir-compiler circuits.js; do
echo "Building $DIR..."
cd $DIR
yarn build
cd ..
done

# Run remake bindings before building noir contracts or l1 contracts as they depend on files created by it.
yarn --cwd circuits.js remake-bindings
yarn --cwd circuits.js remake-constants

(cd noir-contracts && ./bootstrap.sh)
(cd .. && l1-contracts/bootstrap.sh)

# Until we push .yarn/cache, we still need to install.
yarn
# We do not need to build individual packages, yarn build will build the root tsconfig.json
yarn build
cd ..

echo
echo "Success! You could now run e.g.: ./scripts/tmux-splits e2e_deploy_contract"
yarn-project/bootstrap.sh
20 changes: 12 additions & 8 deletions bootstrap_docker.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash
# This script builds the projects listed in build_mainifest.sh, terminating when it reaches TARGET_PROJECT.
# This script builds the projects listed in build_mainifest.sh, terminating when it reaches PROJECT_NAME.
# If run from within a project, it will build only that project, unless env var ONLY_TARGET=false.
#
# Usage:
# boostrap_docker.sh [PROJECT_NAME]
#
# To build everything in build_manifest.sh:
# bootstrap_docker.sh
#
Expand All @@ -18,25 +21,26 @@

set -e

TARGET_PROJECT=$1
PROJECT_NAME=${1:-}
COMMIT_HASH=$(git rev-parse HEAD)
ONLY_TARGET=${ONLY_TARGET:-}

# If we're calling this script from within a project directory, that's the target project.
if [ -z "$TARGET_PROJECT" ]; then
if [ -z "$PROJECT_NAME" ]; then
PATH_PREFIX=$(git rev-parse --show-prefix)
if [ -n "$PATH_PREFIX" ]; then
# We are in a project folder.
ONLY_TARGET=${ONLY_TARGET:-true}
TARGET_PROJECT=$(basename $PATH_PREFIX)
PROJECT_NAME=$(basename $PATH_PREFIX)
cd $(git rev-parse --show-cdup)
fi
fi

source ./build-system/scripts/setup_env $COMMIT_HASH '' mainframe_$USER $(git rev-parse --show-toplevel)
build_local $TARGET_PROJECT $ONLY_TARGET
source ./build-system/scripts/setup_env $COMMIT_HASH '' mainframe_$USER
build_local $PROJECT_NAME $ONLY_TARGET

if [ -z "$TARGET_PROJECT" ]; then
if [ -z "$PROJECT_NAME" ]; then
echo
echo "Success! You could now run e.g.:"
echo " docker run -ti --rm aztecprotocol/end-to-end:latest e2e_private_token_contract.test"
fi
fi
4 changes: 2 additions & 2 deletions build-system/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/AztecProtocol/build-system
branch = master
commit = 37d0fe2b9a61853b87107c0730bdc6d577603b7d
parent = b30f43fa9ffd5d62b20ffd843c0deeef5e132e4f
commit = ae59957de8ba622d2d5327dba89607a2d16a4f87
parent = b3db0d0ae6d6b7d8a6d7338a556e2b9507e2631a
method = merge
cmdver = 0.4.6
6 changes: 3 additions & 3 deletions build-system/remote_build/remote_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu

ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

Expand All @@ -14,7 +14,7 @@ git remote add origin $GIT_REPOSITORY_URL
# Only download metadata when fetching.
git config remote.origin.promisor true
git config remote.origin.partialclonefilter blob:none
git fetch --depth 50 origin $COMMIT_HASH
git fetch --depth 1 origin $COMMIT_HASH
git checkout FETCH_HEAD
# Checkout barretenberg submodule only.
git submodule update --init build-system
Expand All @@ -25,4 +25,4 @@ BASH_ENV=/tmp/bash_env
echo "Calling setup env..."
source ./build-system/scripts/setup_env "$COMMIT_HASH" "$COMMIT_TAG" "$JOB_NAME" "$GIT_REPOSITORY_URL"
echo "Calling build..."
build $@
build $@
Loading

0 comments on commit 890c374

Please sign in to comment.