Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Move barretenberg to top of repo. Make circuits build off barretenberg build. #2221

Merged
merged 37 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
bc151fd
rm bb
charlielye Sep 11, 2023
966c611
Move bb.
charlielye Sep 11, 2023
d865ed1
Make circuits build from bb build.
charlielye Sep 11, 2023
5940b40
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 11, 2023
65d5f3a
fix
charlielye Sep 11, 2023
f8034bc
rename paths.
charlielye Sep 11, 2023
eaf704e
Attempt to cleanup graph.
charlielye Sep 11, 2023
2fc0f1a
handle scratch image
charlielye Sep 11, 2023
afda584
Fix formatting
charlielye Sep 11, 2023
5921253
fix
charlielye Sep 11, 2023
d33637b
fixes.
charlielye Sep 11, 2023
4d03606
Allow rebuild_patterns to be in a file.
charlielye Sep 12, 2023
fcb152e
Absolute paths.
charlielye Sep 12, 2023
e0c18cb
Copy all to remote.
charlielye Sep 12, 2023
647b078
Effort to santise cond/spot/local/runner scripts.
charlielye Sep 12, 2023
82d9b4b
wip
charlielye Sep 12, 2023
79f0c97
wip
charlielye Sep 12, 2023
a66c383
wip
charlielye Sep 12, 2023
a768658
wip
charlielye Sep 12, 2023
ee5bf9a
wip
charlielye Sep 12, 2023
9c85e52
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 12, 2023
9ebbafc
wip
charlielye Sep 12, 2023
fd8d106
wip
charlielye Sep 12, 2023
782a75e
wip
charlielye Sep 12, 2023
3b6c9c8
wip
charlielye Sep 12, 2023
5cf8302
wip
charlielye Sep 13, 2023
9b8814e
wip
charlielye Sep 13, 2023
4c3814a
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 13, 2023
d00e95b
Add yarn-project-base to all ts project deps, improve performance of …
charlielye Sep 13, 2023
6a46efa
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 13, 2023
fa9d147
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 13, 2023
e3dc1f7
No more build manifest stuff in docker.
charlielye Sep 13, 2023
1289076
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 13, 2023
911624d
Still check other things.
charlielye Sep 13, 2023
9418428
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 13, 2023
e4d666c
Root script handles git hooks
charlielye Sep 13, 2023
795c209
Merge remote-tracking branch 'origin/master' into cl/move_bb
charlielye Sep 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
203 changes: 86 additions & 117 deletions .circleci/config.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/mirror_barretenberg_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
branches:
- master
paths:
- 'circuits/cpp/barretenberg/**'
- '!circuits/cpp/barretenberg/.gitrepo'
- "barretenberg/**"
- "!barretenberg/.gitrepo"

jobs:
build:
Expand All @@ -23,7 +23,7 @@ jobs:
run: |
# we push using git subrepo (https://github.com/ingydotnet/git-subrepo)
# with some logic to recover from squashed parent commits
SUBREPO_PATH=circuits/cpp/barretenberg
SUBREPO_PATH=barretenberg
# identify ourselves, needed to commit
git config --global user.name AztecBot
git config --global user.email [email protected]
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/publish-bb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ jobs:

- name: Compile Barretenberg
run: |
cd circuits/cpp/barretenberg/cpp
cd barretenberg/cpp

cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb

- name: Tar and GZip bb Binary (Ubuntu)
working-directory: circuits/cpp/barretenberg/cpp/build/bin
working-directory: barretenberg/cpp/build/bin
run: tar -cvzf barretenberg-x86_64-linux-gnu.tar.gz bb

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: release-linux
path: |
./circuits/cpp/barretenberg/cpp/build/bin/barretenberg-x86_64-linux-gnu.tar.gz
./barretenberg/cpp/build/bin/barretenberg-x86_64-linux-gnu.tar.gz

build-wasm-ts:
name: Build WASM and deploy to TS
Expand Down Expand Up @@ -100,21 +100,21 @@ jobs:
sudo apt -y update && sudo apt -y install yarn
- name: Install WASI-SDK
run: |
cd circuits/cpp/barretenberg/cpp
cd barretenberg/cpp

./scripts/install-wasi-sdk.sh

- name: Compile Typescript
run: |
cd circuits/cpp/barretenberg/ts
cd barretenberg/ts
yarn install && yarn && yarn build

- name: Tar and GZip barretenberg.wasm
working-directory: circuits/cpp/barretenberg/cpp/build-wasm/bin
working-directory: barretenberg/cpp/build-wasm/bin
run: tar -cvzf barretenberg.wasm.tar.gz barretenberg.wasm

- name: Tar and GZip acvm_backend.wasm
working-directory: circuits/cpp/barretenberg/cpp/build-wasm/bin
working-directory: barretenberg/cpp/build-wasm/bin
run: tar -cvzf acvm_backend.wasm.tar.gz acvm_backend.wasm

- name: Setup Node.js
Expand All @@ -126,7 +126,7 @@ jobs:
- name: Deploy Typescript to NPM
if: github.event.inputs.tag != 'nightly' && github.event.inputs.tag != '' # Do not deploy to npm if it is a nightly build
run: |
cd circuits/cpp/barretenberg/ts
cd barretenberg/ts
yarn deploy
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Expand All @@ -136,8 +136,8 @@ jobs:
with:
name: release-wasm
path: |
./circuits/cpp/barretenberg/cpp/build-wasm/bin/barretenberg.wasm.tar.gz
./circuits/cpp/barretenberg/cpp/build-wasm/bin/acvm_backend.wasm.tar.gz
./barretenberg/cpp/build-wasm/bin/barretenberg.wasm.tar.gz
./barretenberg/cpp/build-wasm/bin/acvm_backend.wasm.tar.gz

build-mac:
name: Build on Mac (${{ matrix.target }})
Expand All @@ -163,20 +163,20 @@ jobs:

- name: Compile Barretenberg (x86_64)
if: matrix.target == 'x86_64-apple-darwin'
working-directory: circuits/cpp/barretenberg/cpp
working-directory: barretenberg/cpp
run: |
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb

- name: Compile Barretenberg (ARM)
if: matrix.target == 'aarch64-apple-darwin'
working-directory: circuits/cpp/barretenberg/cpp
working-directory: barretenberg/cpp
run: |
cmake --toolchain ./cmake/toolchains/aarch64-darwin.cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb

- name: Package barretenberg artifact
working-directory: circuits/cpp/barretenberg/cpp/build/bin
working-directory: barretenberg/cpp/build/bin
run: |
mkdir dist
cp ./bb ./dist/bb
Expand All @@ -186,7 +186,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: barretenberg-${{ matrix.target }}
path: ./circuits/cpp/barretenberg/cpp/build/bin/barretenberg-${{ matrix.target }}.tar.gz
path: ./barretenberg/cpp/build/bin/barretenberg-${{ matrix.target }}.tar.gz
retention-days: 3

release:
Expand Down
14 changes: 7 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[submodule "legacy-barretenberg-build-system"]
path = circuits/cpp/barretenberg/build-system
path = barretenberg/build-system
url = https://github.com/AztecProtocol/build-system
[submodule "l1-contracts/lib/openzeppelin-contracts"]
path = l1-contracts/lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
[submodule "l1-contracts/lib/forge-std"]
path = l1-contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "circuits/cpp/barretenberg/sol/lib/forge-std"]
path = circuits/cpp/barretenberg/sol/lib/forge-std
[submodule "barretenberg/sol/lib/forge-std"]
path = barretenberg/sol/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "circuits/cpp/barretenberg/sol/lib/solidity-stringutils"]
path = circuits/cpp/barretenberg/sol/lib/solidity-stringutils
[submodule "barretenberg/sol/lib/solidity-stringutils"]
path = barretenberg/sol/lib/solidity-stringutils
url = https://github.com/Arachnid/solidity-stringutils
[submodule "circuits/cpp/barretenberg/sol/lib/openzeppelin-contracts"]
path = circuits/cpp/barretenberg/sol/lib/openzeppelin-contracts
[submodule "barretenberg/sol/lib/openzeppelin-contracts"]
path = barretenberg/sol/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
4 changes: 2 additions & 2 deletions .ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/circuits/cpp/barretenberg/ts
/circuits/cpp/barretenberg/foundation
/barretenberg/ts
/barretenberg/foundation
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
".": "0.7.0",
"circuits/cpp/barretenberg": "0.7.0",
"circuits/cpp/barretenberg/ts": "0.7.0"
"barretenberg": "0.7.0",
"barretenberg/ts": "0.7.0"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All packages need to be included in the [build manifest](`build_manifest.json`),

## Debugging

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.
Logging goes through the [`info` and `debug`](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

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading