Skip to content

Commit

Permalink
Merge branch 'master' into pw/multi-platform-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilWindle committed Sep 14, 2023
2 parents 61166fb + cd8f349 commit a8c039e
Show file tree
Hide file tree
Showing 222 changed files with 1,716 additions and 1,665 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/mirror_barretenberg_repo.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/mirror_build_system_repo.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/mirror_docs_repo.yml

This file was deleted.

100 changes: 100 additions & 0 deletions .github/workflows/mirror_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# We push using git subrepo (https://github.com/ingydotnet/git-subrepo)
# with some logic to recover from squashed parent commits
# We first identify ourselves, needed to commit.
# Then push to subrepo, commit to master. The commit is needed
# to continue to replay. If we still hit issues such as this
# action failing due to upstream changes, a manual resolution
# PR with ./scripts/git_subrepo.sh pull will be needed.
name: Mirror Repositories

concurrency:
group: mirror-repositories
on:
schedule:
# Run the workflow every night at 2:00 AM UTC.
- cron: '0 2 * * *'

jobs:
mirror-to-docs-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Push to docs repo
run: |
SUBREPO_PATH=docs
git config --global user.name AztecBot
git config --global user.email tech@aztecprotocol.com
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=main; then
git fetch # in case a commit came after this
git rebase origin/master
git commit --amend -m "$(git log -1 --pretty=%B) [skip ci]"
git push
fi
mirror-to-build-system-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Push to build-system repo
run: |
SUBREPO_PATH=build-system
git config --global user.name AztecBot
git config --global user.email tech@aztecprotocol.com
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=main; then
git fetch # in case a commit came after this
git rebase origin/master
git commit --amend -m "$(git log -1 --pretty=%B) [skip ci]"
git push
fi
mirror-to-barretenberg-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Push to barretenberg repo
run: |
SUBREPO_PATH=barretenberg
git config --global user.name AztecBot
git config --global user.email tech@aztecprotocol.com
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=main; then
git fetch # in case a commit came after this
git rebase origin/master
git commit --amend -m "$(git log -1 --pretty=%B) [skip ci]"
git push
fi
mirror-to-aztec-nr-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Push to aztec-nr repo
run: |
SUBREPO_PATH=yarn-project/aztec-nr
git config --global user.name AztecBot
git config --global user.email tech@aztecprotocol.com
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=main; then
git fetch # in case a commit came after this
git rebase origin/master
git commit --amend -m "$(git log -1 --pretty=%B) [skip ci]"
git push
fi
6 changes: 3 additions & 3 deletions barretenberg/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
;
[subrepo]
remote = https://github.com/AztecProtocol/barretenberg
branch = master
commit = 7edb1644d0ae472a70fc3554b7d2cfc6c5496168
parent = 404ec34d38e1a9c3fbe7a3cdb6e88c28f62f72e4
branch = main
commit = ae9f99c3caf0213882d843577374b03871cc7092
parent = c8a5cfb375b498475503c12cc83fcdba39f2ec5f
method = merge
cmdver = 0.4.6
54 changes: 31 additions & 23 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
#!/bin/bash
# Usage:
# Bootstraps the repo. End to end tests should be runnable after a bootstrap:
# ./bootstrap.sh
# Run a second time to perform a "light bootstrap", rebuilds code that's changed:
# ./bootstrap.sh
# Force a clean of the repo before performing a full bootstrap, erases untracked files, be careful!
# ./bootstrap.sh clean
set -eu

export CMD=${1:-}

cd "$(dirname "$0")"

# Lightweight bootstrap. Run `./bootstrap.sh clean` to bypass.
if [ -f .bootstrapped ]; then
echo -e '\033[1mRebuild L1 contracts...\033[0m'
(cd l1-contracts && forge build)

echo -e '\n\033[1mUpdate npm deps...\033[0m'
(cd yarn-project && yarn install)

echo -e '\n\033[1mRebuild Noir contracts...\033[0m'
(cd yarn-project/noir-contracts && yarn noir:build:all 2> /dev/null)

echo -e '\n\033[1mRebuild barretenberg wasm...\033[0m'
(cd barretenberg/cpp && cmake --build --preset wasm && cmake --build --preset wasm-threads)

echo -e '\n\033[1mRebuild circuits wasm...\033[0m'
(cd circuits/cpp && cmake --build --preset wasm -j --target aztec3-circuits.wasm)

exit 0
fi
# Bump this number to force a full bootstrap.
VERSION=1

# Remove all untracked files and directories.
if [ -n "$CMD" ]; then
Expand All @@ -34,21 +24,39 @@ if [ -n "$CMD" ]; then
if [ "$user_input" != "y" ] && [ "$user_input" != "Y" ]; then
exit 1
fi
rm .bootstrapped
rm -f .bootstrapped
rm -rf .git/hooks/*
rm -rf .git/modules/*
git clean -fd
for SUBMODULE in $(git config --file .gitmodules --get-regexp path | awk '{print $2}'); do
rm -rf $SUBMODULE
done
git submodule update --init --recursive
exit 0
else
echo "Unknown command: $CLEAN"
exit 1
fi
fi

# Lightweight bootstrap. Run `./bootstrap.sh clean` to bypass.
if [[ -f .bootstrapped && $(cat .bootstrapped) -eq "$VERSION" ]]; then
echo -e '\033[1mRebuild L1 contracts...\033[0m'
(cd l1-contracts && .foundry/bin/forge build)

echo -e '\n\033[1mUpdate npm deps...\033[0m'
(cd yarn-project && yarn install)

echo -e '\n\033[1mRebuild Noir contracts...\033[0m'
(cd yarn-project/noir-contracts && yarn noir:build:all 2> /dev/null)

echo -e '\n\033[1mRebuild barretenberg wasm...\033[0m'
(cd barretenberg/cpp && cmake --build --preset default && cmake --build --preset wasm && cmake --build --preset wasm-threads)

echo -e '\n\033[1mRebuild circuits wasm...\033[0m'
(cd circuits/cpp && cmake --build --preset wasm -j --target aztec3-circuits.wasm)

exit 0
fi

git submodule update --init --recursive

if [ ! -f ~/.nvm/nvm.sh ]; then
Expand All @@ -66,4 +74,4 @@ barretenberg/cpp/bootstrap.sh
circuits/cpp/bootstrap.sh
yarn-project/bootstrap.sh

touch .bootstrapped
echo $VERSION > .bootstrapped
Loading

0 comments on commit a8c039e

Please sign in to comment.