Skip to content

Commit

Permalink
chore: Copying world state binary to yarn project is on generate (#9194)
Browse files Browse the repository at this point in the history
Copy native build artifacts in a separate "generate" step.

---------

Co-authored-by: Alex Gherghisan <[email protected]>
Co-authored-by: Alex Gherghisan <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent e42e219 commit 8d75dd4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions barretenberg/cpp/bootstrap_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ cp -r $TMP/barretenberg-preset-wasm-threads/build build-wasm-threads/
mkdir -p build
cp -r $TMP/barretenberg-preset-release/build/* build/
cp -r $TMP/barretenberg-preset-release-world-state/build/* build/

mkdir -p ../../yarn-project/world-state/build/
cp $TMP/barretenberg-preset-release-world-state/build/bin/world_state_napi.node ../../yarn-project/world-state/build/
5 changes: 3 additions & 2 deletions yarn-project/world-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"tsconfig": "./tsconfig.json"
},
"scripts": {
"build": "yarn clean && mkdir -p build && (([ -f ../../barretenberg/cpp/build-pic/lib/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build-pic/lib/world_state_napi.node build) || ([ -f ../../barretenberg/cpp/build/bin/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build/bin/world_state_napi.node build) || true) && tsc -b",
"build": "yarn clean && yarn generate && tsc -b",
"build:cpp": "./scripts/build.sh cpp",
"build:dev": "tsc -b --watch",
"clean": "rm -rf ./dest ./build .tsbuildinfo",
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests"
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests",
"generate": "mkdir -p build && (([ -f ../../barretenberg/cpp/build/bin/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build/bin/world_state_napi.node build) || ([ -f ../../barretenberg/cpp/build-pic/lib/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build-pic/lib/world_state_napi.node build) || true)"
},
"inherits": [
"../package.common.json",
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/world-state/package.local.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"build": "yarn clean && mkdir -p build && (([ -f ../../barretenberg/cpp/build-pic/lib/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build-pic/lib/world_state_napi.node build) || ([ -f ../../barretenberg/cpp/build/bin/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build/bin/world_state_napi.node build) || true) && tsc -b",
"build": "yarn clean && yarn generate && tsc -b",
"generate": "mkdir -p build && (([ -f ../../barretenberg/cpp/build/bin/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build/bin/world_state_napi.node build) || ([ -f ../../barretenberg/cpp/build-pic/lib/world_state_napi.node ] && cp -v ../../barretenberg/cpp/build-pic/lib/world_state_napi.node build) || true)",
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests",
"clean": "rm -rf ./dest ./build .tsbuildinfo"
}
Expand Down

0 comments on commit 8d75dd4

Please sign in to comment.