-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a4b42f
commit 28603a5
Showing
7 changed files
with
66 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,53 @@ | ||
FROM alpine:3.18 | ||
RUN apk update \ | ||
&& apk upgrade \ | ||
&& apk add --no-cache \ | ||
build-base \ | ||
clang16 \ | ||
openmp-dev \ | ||
cmake \ | ||
ninja \ | ||
git \ | ||
curl \ | ||
perl | ||
FROM ubuntu:lunar as builder | ||
|
||
RUN apt update && apt install -y \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
cmake \ | ||
lsb-release \ | ||
wget \ | ||
software-properties-common \ | ||
gnupg \ | ||
ninja-build \ | ||
npm \ | ||
libssl-dev \ | ||
jq \ | ||
bash \ | ||
libstdc++6 | ||
|
||
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 16 | ||
|
||
WORKDIR /usr/src/barretenberg/cpp | ||
|
||
COPY ./cpp . | ||
# Build everything to ensure everything builds. All tests will be run from the result of this build. | ||
RUN cmake --preset clang16 && cmake --build --preset clang16 --target solidity_key_gen solidity_proof_gen | ||
|
||
FROM docker.io/frolvlad/alpine-glibc:alpine-3.17_glibc-2.34 as builder | ||
RUN apk update && apk add git curl build-base openmp-dev bash | ||
|
||
COPY --from=0 /usr/src/barretenberg/cpp/build/bin /usr/src/barretenberg/cpp/build/bin | ||
COPY --from=0 /usr/src/barretenberg/cpp/srs_db /usr/src/barretenberg/cpp/srs_db | ||
# FROM docker.io/frolvlad/alpine-glibc:alpine-3.17_glibc-2.34 as builder | ||
# RUN apk update && apk add git curl build-base openmp-dev bash | ||
FROM ubuntu:lunar | ||
RUN apt update && apt install -y \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
bash \ | ||
libomp-dev | ||
|
||
COPY --from=builder /usr/src/barretenberg/cpp/build/bin /usr/src/barretenberg/cpp/build/bin | ||
COPY --from=builder /usr/src/barretenberg/cpp/srs_db /usr/src/barretenberg/cpp/srs_db | ||
WORKDIR /usr/src/barretenberg/sol | ||
COPY ./sol . | ||
|
||
# Copy forge binary directly from foundry | ||
COPY --from=ghcr.io/foundry-rs/foundry:latest /usr/local/bin/forge /usr/local/bin/forge | ||
# COPY --from=ghcr.io/foundry-rs/foundry:latest /usr/local/bin/forge /usr/local/bin/forge | ||
RUN curl -L https://foundry.paradigm.xyz | bash | ||
ENV PATH="${PATH}:/root/.foundry/bin" | ||
RUN foundryup | ||
|
||
RUN cd ../cpp/srs_db && ./download_ignition.sh 3 && cd ../../sol | ||
|
||
RUN ./scripts/init.sh | ||
|
||
# TestBase is excluded as it is just boilerplate | ||
RUN forge test --no-match-contract TestBase | ||
RUN forge test --no-match-contract TestBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters