-
Notifications
You must be signed in to change notification settings - Fork 293
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
feat: Parallel native/wasm bb builds. Better messaging around using ci cache. #4766
Changes from 33 commits
1e38125
31cf1a9
a99b05d
60a38d3
3af0393
42d1dea
97822b1
f4d59db
6ac2000
bd3a1bd
c52fec8
ad2659c
332e1a3
e40e51d
6ece897
2465a8d
25f3036
f7c9978
5adcb50
cb8a8e6
8d66cea
8b5b459
aaf417a
92aa9c7
ad3cdcb
af51314
462a4d4
d82e323
6fd63b6
ae51b95
f29ea9c
b90c770
e943d08
07f7e14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,8 +31,11 @@ fi | |
# Download ignition transcripts. | ||
(cd ./srs_db && ./download_ignition.sh 0) | ||
|
||
# Install wasi-sdk. | ||
./scripts/install-wasi-sdk.sh | ||
|
||
# Attempt to just pull artefacts from CI and exit on success. | ||
./bootstrap_cache.sh && exit | ||
[ -n "${USE_CACHE:-}" ] && ./bootstrap_cache.sh && exit | ||
|
||
# Pick native toolchain file. | ||
ARCH=$(uname -m) | ||
|
@@ -54,23 +57,34 @@ echo "# Building with preset: $PRESET" | |
echo "# When running cmake directly, remember to use: --build --preset $PRESET" | ||
echo "#################################" | ||
|
||
# Build native. | ||
cmake --preset $PRESET -DCMAKE_BUILD_TYPE=RelWithAssert | ||
cmake --build --preset $PRESET --target bb | ||
function build_native { | ||
cmake --preset $PRESET -DCMAKE_BUILD_TYPE=RelWithAssert | ||
cmake --build --preset $PRESET --target bb | ||
} | ||
|
||
function build_wasm { | ||
cmake --preset wasm | ||
cmake --build --preset wasm | ||
} | ||
|
||
function build_wasm_threads { | ||
cmake --preset wasm-threads | ||
cmake --build --preset wasm-threads | ||
} | ||
|
||
g="\033[32m" # Green | ||
b="\033[34m" # Blue | ||
p="\033[35m" # Purple | ||
r="\033[0m" # Reset | ||
|
||
(build_native > >(awk -v g="$g" -v r="$r" '$0=g"native: "r $0')) & | ||
(build_wasm > >(awk -v b="$b" -v r="$r" '$0=b"wasm: "r $0')) & | ||
(build_wasm_threads > >(awk -v p="$p" -v r="$r" '$0=p"wasm_threads: "r $0')) & | ||
Comment on lines
+80
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! Just one comment/concern: could we potentially have race conditions? Looking at the output, seems that the path of the created objects is either
If that's true, especially the last 2 could overwrite each other. (I haven't looked into full detail.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They have their own independent build dirs. |
||
|
||
wait | ||
|
||
if [ ! -d ./srs_db/grumpkin ]; then | ||
# The Grumpkin SRS is generated manually at the moment, only up to a large enough size for tests | ||
# If tests require more points, the parameter can be increased here. | ||
(cd ./build && cmake --build . --parallel --target grumpkin_srs_gen && ./bin/grumpkin_srs_gen 8192) | ||
cd ./build && cmake --build . --parallel --target grumpkin_srs_gen && ./bin/grumpkin_srs_gen 8192 | ||
fi | ||
|
||
# Install wasi-sdk. | ||
./scripts/install-wasi-sdk.sh | ||
|
||
# Build WASM. | ||
cmake --preset wasm | ||
cmake --build --preset wasm | ||
|
||
# Build WASM with new threading. | ||
cmake --preset wasm-threads | ||
cmake --build --preset wasm-threads |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang | ||
FROM aztecprotocol/barretenberg-x86_64-linux-clang | ||
WORKDIR /usr/src/barretenberg/cpp | ||
RUN apk update && apk add curl libstdc++ jq | ||
RUN ./scripts/ci/ultra_honk_bench.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
type docker &> /dev/null && [ -f ~/.aws/credentials ] || exit 1 |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this after trying to use cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should only run once, and i think it makes sense to install it even if we take the output artefacts from the cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although you're making me second guess myself :)