From 0b2928634fe1ee5dd00abb8986575e82dd78ae4f Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:25:54 +0000 Subject: [PATCH] exp: run bb bin test in its own dockerfile --- .circleci/config.yml | 15 +++++++++++++++ build_manifest.json | 11 +++++++++++ circuits/cpp/barretenberg/ts/Dockerfile | 4 ---- circuits/cpp/barretenberg/ts/Dockerfile.bin-test | 6 ++++++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 circuits/cpp/barretenberg/ts/Dockerfile.bin-test diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a7130521354..742f70ec37ff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -264,6 +264,17 @@ jobs: name: "Test" command: cond_spot_run_tests bb.js + bb-bin-test: + machine: + image: ubuntu-2004:202010-01 + resource_class: large + steps: + - *checkout + - *setup_env + - run: + name: "Build" + command: build bb-bin-test + barretenberg-acir-tests: docker: - image: aztecprotocol/alpine-build-image @@ -1209,6 +1220,10 @@ workflows: requires: - bb-js <<: *defaults + - bb-bin-test: + requires: + - bb-js + <<: *defaults - barretenberg-acir-tests: requires: - barretenberg-x86_64-linux-clang-assert diff --git a/build_manifest.json b/build_manifest.json index c3ac0c9dd8ca..40b00cc511bc 100644 --- a/build_manifest.json +++ b/build_manifest.json @@ -57,6 +57,17 @@ }, "bb.js": { "buildDir": "circuits/cpp/barretenberg/ts", + "dockerfile": "Dockerfile", + "rebuildPatterns": [ + "^circuits/cpp/barretenberg/ts/" + ], + "dependencies": [ + "barretenberg-wasm-linux-clang" + ] + }, + "bb-bin-test": { + "buildDir": "circuits/cpp/barretenberg/ts", + "dockerfile": "Dockerfile.bin-test", "rebuildPatterns": [ "^circuits/cpp/barretenberg/ts/" ], diff --git a/circuits/cpp/barretenberg/ts/Dockerfile b/circuits/cpp/barretenberg/ts/Dockerfile index 14f47a9ea566..e664aebf15c4 100644 --- a/circuits/cpp/barretenberg/ts/Dockerfile +++ b/circuits/cpp/barretenberg/ts/Dockerfile @@ -14,8 +14,4 @@ COPY . . ENV DOCKER_ENV=true RUN yarn formatting && yarn build:ts:browser && yarn build:ts:node -# Run bb.js binary tests -WORKDIR /usr/src/barretenberg/ts/bin-test -RUN ./bin-test.sh - CMD ["yarn", "test"] diff --git a/circuits/cpp/barretenberg/ts/Dockerfile.bin-test b/circuits/cpp/barretenberg/ts/Dockerfile.bin-test new file mode 100644 index 000000000000..f582381e5a01 --- /dev/null +++ b/circuits/cpp/barretenberg/ts/Dockerfile.bin-test @@ -0,0 +1,6 @@ +FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/bb.js +COPY --from=0 . . + +# Run bb.js binary tests +WORKDIR /usr/src/barretenberg/ts/bin-test +RUN ./bin-test.sh