Skip to content

Commit 506e719

Browse files
chore: use repo BB for gate diff (AztecProtocol#3852)
Compile BB to do the gate count. We should probably move this to a GH action to use cached BB builds. --------- Co-authored-by: Dan Lee <dan@aztecprotocol.com>
1 parent 53fec42 commit 506e719

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

.github/workflows/protocol-circuits-gate-diff.yml

+40-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,46 @@ on:
88

99
jobs:
1010
compare_protocol_circuits_gates:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
steps:
13-
- name: Checkout
13+
- name: Checkout Code
1414
uses: actions/checkout@v3
1515
with:
16-
fetch-depth: 0
16+
ref: ${{ inputs.tag || env.GITHUB_REF }}
17+
18+
- name: Install bleeding edge cmake
19+
run: |
20+
sudo apt -y remove --purge cmake
21+
sudo snap install cmake --classic
22+
23+
- name: Create Build Environment
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get -y install ninja-build
27+
28+
- name: Install Clang16
29+
run: |
30+
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
31+
tar -xvf clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
32+
sudo cp clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/* /usr/local/bin/
33+
sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/include/* /usr/local/include/
34+
sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/* /usr/local/lib/
35+
sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/share/* /usr/local/share/
36+
37+
- uses: actions/cache@v3
38+
with:
39+
path: |
40+
barretenberg/cpp/build
41+
barretenberg/cpp/build-wasm
42+
barretenberg/cpp/build-threads
43+
key: ${{ runner.os }}-bb-build
44+
45+
- name: Compile Barretenberg
46+
run: |
47+
cd barretenberg/cpp
48+
49+
cmake --preset default -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_BUILD_TYPE=RelWithAssert -DTARGET_ARCH=westmere
50+
cmake --build --preset default --target bb
1751
1852
- name: Install noirup
1953
run: |
@@ -48,6 +82,9 @@ jobs:
4882
run: |
4983
nargo info --json > protocol_circuits_report.json
5084
mv protocol_circuits_report.json ../../../protocol_circuits_report.json
85+
env:
86+
NARGO_BACKEND_PATH: ../../../barretenberg/cpp/build/bin/bb
87+
5188
- name: Compare gates reports
5289
id: gates_diff
5390
uses: TomAFrench/noir-gates-diff@e7cf131b7e7f044c01615f93f0b855f65ddc02d4

0 commit comments

Comments
 (0)