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

fix(noir-ci): reinstate artifact builds #1396

Merged
merged 5 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ jobs:
name: "Build and test"
command: build key-store

noir-contracts:
noir-contracts-build:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
Expand All @@ -481,7 +481,18 @@ jobs:
- *setup_env
- run:
name: "Build and test"
command: cond_spot_run_build noir-contracts 32
command: cond_spot_run_build noir-contracts-build 32

noir-contracts:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build noir-contracts

noir-compiler:
machine:
Expand Down Expand Up @@ -1094,13 +1105,13 @@ workflows:
<<: *defaults

- l1-contracts: *defaults
- noir-contracts: *defaults
- noir-contracts-build: *defaults

- yarn-project-base:
requires:
- circuits-wasm-linux-clang
- l1-contracts
- noir-contracts
- noir-contracts-build
<<: *defaults

- aztec-js: *yarn_project
Expand All @@ -1119,6 +1130,7 @@ workflows:
- p2p-bootstrap: *yarn_project
- l1-artifacts: *yarn_project
- noir-compiler: *yarn_project
- noir-contracts: *yarn_project
- sequencer-client: *yarn_project
- types: *yarn_project
- circuits-js: *yarn_project
Expand All @@ -1143,6 +1155,7 @@ workflows:
- p2p-bootstrap
- l1-artifacts
- noir-compiler
- noir-contracts
- sequencer-client
- types
- circuits-js
Expand Down
60 changes: 48 additions & 12 deletions build_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,77 @@
"barretenberg-x86_64-linux-clang": {
"buildDir": "circuits/cpp/barretenberg/cpp",
"dockerfile": "dockerfiles/Dockerfile.x86_64-linux-clang",
"rebuildPatterns": ["^circuits/cpp/barretenberg/cpp/"],
"rebuildPatterns": [
"^circuits/cpp/barretenberg/cpp/"
],
"dependencies": []
},
"barretenberg-x86_64-linux-clang-assert": {
"buildDir": "circuits/cpp/barretenberg/cpp",
"dockerfile": "dockerfiles/Dockerfile.x86_64-linux-clang-assert",
"rebuildPatterns": ["^circuits/cpp/barretenberg/cpp/"],
"rebuildPatterns": [
"^circuits/cpp/barretenberg/cpp/"
],
"dependencies": []
},
"barretenberg-x86_64-linux-clang-fuzzing": {
"buildDir": "circuits/cpp/barretenberg/cpp",
"dockerfile": "dockerfiles/Dockerfile.x86_64-linux-clang-fuzzing",
"rebuildPatterns": ["^circuits/cpp/barretenberg/cpp/"],
"rebuildPatterns": [
"^circuits/cpp/barretenberg/cpp/"
],
"dependencies": []
},
"barretenberg-x86_64-linux-gcc": {
"buildDir": "circuits/cpp/barretenberg/cpp",
"dockerfile": "dockerfiles/Dockerfile.x86_64-linux-gcc",
"rebuildPatterns": ["^circuits/cpp/barretenberg/cpp/"],
"rebuildPatterns": [
"^circuits/cpp/barretenberg/cpp/"
],
"dependencies": []
},
"barretenberg-wasm-linux-clang": {
"buildDir": "circuits/cpp/barretenberg/cpp",
"dockerfile": "dockerfiles/Dockerfile.wasm-linux-clang",
"rebuildPatterns": ["^circuits/cpp/barretenberg/cpp/"],
"rebuildPatterns": [
"^circuits/cpp/barretenberg/cpp/"
],
"dependencies": []
},
"barretenberg-circuits-x86_64-linux-clang-builder-runner": {
"buildDir": "circuits/cpp/barretenberg/cpp",
"dockerfile": "dockerfiles/Dockerfile.circuits-x86_64-linux-clang-builder-runner",
"rebuildPatterns": ["^circuits/cpp/barretenberg/cpp/"],
"rebuildPatterns": [
"^circuits/cpp/barretenberg/cpp/"
],
"dependencies": []
},
"barretenberg-circuits-wasm-linux-clang-builder-runner": {
"buildDir": "circuits/cpp/barretenberg/cpp",
"dockerfile": "dockerfiles/Dockerfile.circuits-wasm-linux-clang-builder-runner",
"rebuildPatterns": ["^circuits/cpp/barretenberg/cpp/"],
"rebuildPatterns": [
"^circuits/cpp/barretenberg/cpp/"
],
"dependencies": []
},
"bb.js": {
"buildDir": "circuits/cpp/barretenberg/ts",
"rebuildPatterns": ["^circuits/cpp/barretenberg/ts/"],
"dependencies": ["barretenberg-wasm-linux-clang"]
"rebuildPatterns": [
"^circuits/cpp/barretenberg/ts/"
],
"dependencies": [
"barretenberg-wasm-linux-clang"
]
},
"barretenberg-acir-tests": {
"buildDir": "circuits/cpp/barretenberg/acir_tests",
"rebuildPatterns": ["^circuits/cpp/barretenberg/acir_tests/"],
"dependencies": ["bb.js", "barretenberg-x86_64-linux-clang-assert"]
"rebuildPatterns": [
"^circuits/cpp/barretenberg/acir_tests/"
],
"dependencies": [
"bb.js",
"barretenberg-x86_64-linux-clang-assert"
]
},
"circuits-wasm-linux-clang": {
"buildDir": "circuits/cpp",
Expand Down Expand Up @@ -307,6 +330,19 @@
"types"
]
},
"noir-contracts-build": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/noir-contracts",
"dockerfile": "noir-contracts/Dockerfile.build",
"rebuildPatterns": [
"^yarn-project/noir-contracts/"
],
"dependencies": [
"aztec.js",
"foundation",
"noir-compiler"
]
},
"noir-contracts": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/noir-contracts",
Expand Down Expand Up @@ -445,4 +481,4 @@
"types"
]
}
}
}
25 changes: 10 additions & 15 deletions yarn-project/noir-contracts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# Running on ubuntu until noir supports an alpine build
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder

# Builder stage to build the noir artifacts
FROM ubuntu:kinetic

RUN apt-get update && apt-get install -y \
curl \
git \
sed

WORKDIR /usr/src/yarn-project
COPY . .

WORKDIR /usr/src/yarn-project/noir-contracts
WORKDIR /usr/src/yarn-project/noir-contracts
RUN yarn build && yarn test

# Download and extract nargo
RUN ./scripts/install_noir.sh
ENV PATH="/usr/src/yarn-project/noir-contracts/.nargo/bin:${PATH}"
# Prune dev dependencies. See comment in base image.
RUN yarn cache clean
RUN yarn workspaces focus --production > /dev/null

RUN ./scripts/compile_ci.sh
FROM node:18-alpine
COPY --from=builder /usr/src/yarn-project/noir-contracts /usr/src/yarn-project/noir-contracts
WORKDIR /usr/src/yarn-project/noir-contracts
ENTRYPOINT ["yarn"]
20 changes: 20 additions & 0 deletions yarn-project/noir-contracts/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Running on ubuntu until noir supports an alpine build

# Builder stage to build the noir artifacts
FROM ubuntu:kinetic

RUN apt-get update && apt-get install -y \
curl \
git \
sed

WORKDIR /usr/src/yarn-project
COPY . .

WORKDIR /usr/src/yarn-project/noir-contracts

# Download and extract nargo
RUN ./scripts/install_noir.sh
ENV PATH="/usr/src/yarn-project/noir-contracts/.nargo/bin:${PATH}"

RUN ./scripts/compile_ci.sh
2 changes: 1 addition & 1 deletion yarn-project/yarn-project-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/circuits-wasm-linux-clang as circuits
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/l1-contracts as contracts
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-contracts as noir
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-contracts-build as noir

FROM node:18-alpine AS builder_
RUN apk update && apk add --no-cache build-base git python3 curl bash jq sed
Expand Down