Skip to content

Commit

Permalink
chore: use bbup to install bb (#5073)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

`bbup` is now in master so we can use it to install `bb`

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored May 22, 2024
1 parent 436bbda commit 533d10e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ jobs:
- name: Install `bb`
run: |
./scripts/install_bb.sh
echo "$HOME/.barretenberg/" >> $GITHUB_PATH
export PATH="$PATH:$HOME/.barretenberg/"
echo "$HOME/.bb/" >> $GITHUB_PATH
- name: Download nargo binary
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -512,8 +511,7 @@ jobs:
- name: Install `bb`
run: |
./scripts/install_bb.sh
echo "$HOME/.barretenberg/" >> $GITHUB_PATH
export PATH="$PATH:$HOME/.barretenberg/"
echo "$HOME/.bb/" >> $GITHUB_PATH
- name: Download nargo binary
uses: actions/download-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"barebones",
"barretenberg",
"barustenberg",
"bbup",
"bincode",
"bindgen",
"bitand",
Expand Down
18 changes: 6 additions & 12 deletions docs/docs/getting_started/barretenberg/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,25 @@ Open a terminal on your machine, and write:
##### macOS (Apple Silicon)

```bash
mkdir -p $HOME/.barretenberg && \
curl -o ./barretenberg-aarch64-apple-darwin.tar.gz -L https://github.com/AztecProtocol/aztec-packages/releases/download/aztec-packages-v0.38.0/barretenberg-aarch64-apple-darwin.tar.gz && \
tar -xvf ./barretenberg-aarch64-apple-darwin.tar.gz -C $HOME/.barretenberg/ && \
echo 'export PATH=$PATH:$HOME/.barretenberg/' >> ~/.zshrc && \
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/barretenberg/cpp/installation/install | bash
source ~/.zshrc
bbup -v 0.41.0
```

##### macOS (Intel)

```bash
mkdir -p $HOME/.barretenberg && \
curl -o ./barretenberg-x86_64-apple-darwin.tar.gz -L https://github.com/AztecProtocol/aztec-packages/releases/download/aztec-packages-v0.38.0/barretenberg-x86_64-apple-darwin.tar.gz && \
tar -xvf ./barretenberg-x86_64-apple-darwin.tar.gz -C $HOME/.barretenberg/ && \
echo 'export PATH=$PATH:$HOME/.barretenberg/' >> ~/.zshrc && \
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/barretenberg/cpp/installation/install | bash
source ~/.zshrc
bbup -v 0.41.0
```

##### Linux (Bash)

```bash
mkdir -p $HOME/.barretenberg && \
curl -o ./barretenberg-x86_64-linux-gnu.tar.gz -L https://github.com/AztecProtocol/aztec-packages/releases/download/aztec-packages-v0.38.0/barretenberg-x86_64-linux-gnu.tar.gz && \
tar -xvf ./barretenberg-x86_64-linux-gnu.tar.gz -C $HOME/.barretenberg/ && \
echo -e 'export PATH=$PATH:$HOME/.barretenberg/' >> ~/.bashrc && \
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/barretenberg/cpp/installation/install | bash
source ~/.bashrc
bbup -v 0.41.0
```

Now we're ready to start working on [our first Noir program!](../hello_noir/index.md)
14 changes: 8 additions & 6 deletions scripts/install_bb.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

# We use this script just for CI so we assume we're running on x86 linux
VERSION="0.41.0"

mkdir -p $HOME/.barretenberg
curl -o ./barretenberg-x86_64-linux-gnu.tar.gz -L https://github.com/AztecProtocol/aztec-packages/releases/download/aztec-packages-v0.41.0/barretenberg-x86_64-linux-gnu.tar.gz
tar -xvf ./barretenberg-x86_64-linux-gnu.tar.gz -C $HOME/.barretenberg/
echo 'export PATH=$PATH:$HOME/.barretenberg/' >> ~/.bashrc
source ~/.bashrc
BBUP_PATH=~/.bb/bbup

if ! [ -f $BBUP_PATH ]; then
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/barretenberg/cpp/installation/install | bash
fi

$BBUP_PATH -v $VERSION

0 comments on commit 533d10e

Please sign in to comment.