From db93b194c067491fa7e224cf10a63f60eec47e17 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Mon, 10 Jul 2023 14:57:40 -0500 Subject: [PATCH 01/14] remove apt install directives --- apps/admin/frontend/Makefile | 2 -- apps/central-scan/backend/Makefile | 10 ---------- apps/central-scan/frontend/Makefile | 1 - apps/design/frontend/Makefile | 1 - apps/mark-scan/frontend/Makefile | 1 - apps/mark/frontend/Makefile | 1 - apps/scan/backend/Makefile | 10 ---------- apps/scan/frontend/Makefile | 1 - libs/auth/Makefile | 1 - script/bootstrap | 3 --- services/converter-ms-sems/Makefile | 9 +-------- 11 files changed, 1 insertion(+), 39 deletions(-) diff --git a/apps/admin/frontend/Makefile b/apps/admin/frontend/Makefile index 7e33139f5d..4ae3a03be1 100644 --- a/apps/admin/frontend/Makefile +++ b/apps/admin/frontend/Makefile @@ -2,9 +2,7 @@ # a phony dependency that can be used as a dependency to force builds FORCE: -# install any required dependencies here, i.e. `sudo apt install -y DEPS` install: - sudo apt install -y fdisk dosfstools exfat-utils build: FORCE pnpm install && pnpm build diff --git a/apps/central-scan/backend/Makefile b/apps/central-scan/backend/Makefile index 03d48eef4c..56972772e4 100644 --- a/apps/central-scan/backend/Makefile +++ b/apps/central-scan/backend/Makefile @@ -6,16 +6,6 @@ TIMESTAMP := $(shell date --iso-8601=seconds --utc | sed 's/+.*$\//g' | tr ':' ' FORCE: install: - sudo apt-get -y update -ifeq ($(OS),bionic) - sudo apt-get install -y libsane build-essential libx11-dev libjpeg-dev libpng-dev libpcsclite1 libpcsclite-dev -endif -ifeq ($(OS),focal) - sudo apt install -y libsane build-essential libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev libpcsclite1 libpcsclite-dev -endif -ifeq ($(OS),bullseye) - sudo apt install -y libsane libpng-dev libjpeg-dev libx11-dev libpixman-1-dev libcairo2-dev libpango1.0-dev libgif-dev libpcsclite1 libpcsclite-dev -endif build: FORCE pnpm install && pnpm build diff --git a/apps/central-scan/frontend/Makefile b/apps/central-scan/frontend/Makefile index db4998630e..4ae3a03be1 100644 --- a/apps/central-scan/frontend/Makefile +++ b/apps/central-scan/frontend/Makefile @@ -2,7 +2,6 @@ # a phony dependency that can be used as a dependency to force builds FORCE: -# install any required dependencies here, i.e. `sudo apt install -y DEPS` install: build: FORCE diff --git a/apps/design/frontend/Makefile b/apps/design/frontend/Makefile index db4998630e..4ae3a03be1 100644 --- a/apps/design/frontend/Makefile +++ b/apps/design/frontend/Makefile @@ -2,7 +2,6 @@ # a phony dependency that can be used as a dependency to force builds FORCE: -# install any required dependencies here, i.e. `sudo apt install -y DEPS` install: build: FORCE diff --git a/apps/mark-scan/frontend/Makefile b/apps/mark-scan/frontend/Makefile index 5658de32af..3b9f943788 100644 --- a/apps/mark-scan/frontend/Makefile +++ b/apps/mark-scan/frontend/Makefile @@ -3,7 +3,6 @@ BACKEND := ../backend # a phony dependency that can be used as a dependency to force builds FORCE: -# install any required dependencies here, i.e. `sudo apt install -y DEPS` install: build-backend: diff --git a/apps/mark/frontend/Makefile b/apps/mark/frontend/Makefile index 5658de32af..3b9f943788 100644 --- a/apps/mark/frontend/Makefile +++ b/apps/mark/frontend/Makefile @@ -3,7 +3,6 @@ BACKEND := ../backend # a phony dependency that can be used as a dependency to force builds FORCE: -# install any required dependencies here, i.e. `sudo apt install -y DEPS` install: build-backend: diff --git a/apps/scan/backend/Makefile b/apps/scan/backend/Makefile index 03d48eef4c..56972772e4 100644 --- a/apps/scan/backend/Makefile +++ b/apps/scan/backend/Makefile @@ -6,16 +6,6 @@ TIMESTAMP := $(shell date --iso-8601=seconds --utc | sed 's/+.*$\//g' | tr ':' ' FORCE: install: - sudo apt-get -y update -ifeq ($(OS),bionic) - sudo apt-get install -y libsane build-essential libx11-dev libjpeg-dev libpng-dev libpcsclite1 libpcsclite-dev -endif -ifeq ($(OS),focal) - sudo apt install -y libsane build-essential libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev libpcsclite1 libpcsclite-dev -endif -ifeq ($(OS),bullseye) - sudo apt install -y libsane libpng-dev libjpeg-dev libx11-dev libpixman-1-dev libcairo2-dev libpango1.0-dev libgif-dev libpcsclite1 libpcsclite-dev -endif build: FORCE pnpm install && pnpm build diff --git a/apps/scan/frontend/Makefile b/apps/scan/frontend/Makefile index db4998630e..4ae3a03be1 100644 --- a/apps/scan/frontend/Makefile +++ b/apps/scan/frontend/Makefile @@ -2,7 +2,6 @@ # a phony dependency that can be used as a dependency to force builds FORCE: -# install any required dependencies here, i.e. `sudo apt install -y DEPS` install: build: FORCE diff --git a/libs/auth/Makefile b/libs/auth/Makefile index 878fc84e6a..33213ad7b9 100644 --- a/libs/auth/Makefile +++ b/libs/auth/Makefile @@ -1,5 +1,4 @@ install-script-dependencies: - sudo apt install -y default-jdk wget wget 'https://github.com/martinpaljak/GlobalPlatformPro/releases/download/v20.08.12/gp.jar' @echo 'Checking hash of downloaded gp.jar' @sha256sum gp.jar | diff scripts/gp.jar.sha256sum - || (echo '❌ Hash check of downloaded gp.jar failed' && rm gp.jar && exit 1) diff --git a/script/bootstrap b/script/bootstrap index 7d15728367..c2013723e9 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -2,9 +2,6 @@ set -euo pipefail -# pixman-1 is effectively a dependency in all pnpm calls, go ahead and install it -sudo apt install -y libsane libpng-dev libjpeg-dev libx11-dev libpixman-1-dev libcairo2-dev libpango1.0-dev libgif-dev build-essential - DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" for app in ${DIR}/../frontends/* ${DIR}/../services/* ${DIR}/../apps/*/frontend ${DIR}/../apps/*/backend; do diff --git a/services/converter-ms-sems/Makefile b/services/converter-ms-sems/Makefile index 67c424603a..655f5f7f0a 100644 --- a/services/converter-ms-sems/Makefile +++ b/services/converter-ms-sems/Makefile @@ -1,11 +1,4 @@ - -add-ppa: - apt-cache search --names-only "^python3.9$$" | grep python || sudo add-apt-repository -y ppa:deadsnakes/ppa # add deadsnakes only if we need to - -install-python: add-ppa - sudo apt install -y python3.9 python3.9-dev python3-distutils python3-pip - -install: install-python +install: install-dependencies: python3.9 -m pip install pipenv From de41b34e041d8c94cff39194f2ae89003825a765 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Mon, 10 Jul 2023 15:17:23 -0500 Subject: [PATCH 02/14] remove more apt references --- apps/admin/backend/Makefile | 2 -- apps/mark-scan/backend/Makefile | 2 -- apps/mark/backend/Makefile | 2 -- 3 files changed, 6 deletions(-) diff --git a/apps/admin/backend/Makefile b/apps/admin/backend/Makefile index ece669d6f9..b30eb6a1bb 100644 --- a/apps/admin/backend/Makefile +++ b/apps/admin/backend/Makefile @@ -4,8 +4,6 @@ NODE_ENV ?= development FORCE: install: - sudo apt -y update - sudo apt -y install libpcsclite1 libpcsclite-dev build: FORCE pnpm install && pnpm build diff --git a/apps/mark-scan/backend/Makefile b/apps/mark-scan/backend/Makefile index a1b8c83334..3e6514781f 100644 --- a/apps/mark-scan/backend/Makefile +++ b/apps/mark-scan/backend/Makefile @@ -7,8 +7,6 @@ build: FORCE bootstrap: build install: - sudo apt -y update - sudo apt -y install libpcsclite1 libpcsclite-dev run: pnpm start diff --git a/apps/mark/backend/Makefile b/apps/mark/backend/Makefile index a1b8c83334..3e6514781f 100644 --- a/apps/mark/backend/Makefile +++ b/apps/mark/backend/Makefile @@ -7,8 +7,6 @@ build: FORCE bootstrap: build install: - sudo apt -y update - sudo apt -y install libpcsclite1 libpcsclite-dev run: pnpm start From 7751f0eb28af88bca1e7eb773bbc6d1a1c551b4b Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Mon, 10 Jul 2023 15:54:35 -0500 Subject: [PATCH 03/14] cargo fetch test --- libs/ballot-interpreter-nh/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/ballot-interpreter-nh/package.json b/libs/ballot-interpreter-nh/package.json index dd30f69b65..24a8e1360a 100644 --- a/libs/ballot-interpreter-nh/package.json +++ b/libs/ballot-interpreter-nh/package.json @@ -7,12 +7,13 @@ "scripts": { "type-check": "tsc --build", "build": "pnpm build:rust-addon && pnpm build:ts", - "build:rust-addon": "cargo-cp-artifact -nc build/rust-addon.node -- cargo build --message-format=json-render-diagnostics --release", + "build:rust-addon": "cargo-cp-artifact -nc build/rust-addon.node -- cargo build --message-format=json-render-diagnostics --release --offline", "build:ts": "tsc --build tsconfig.build.json", "clean": "cargo clean && rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", - "install": "pnpm build:rust-addon", + "install": "pnpm install:rust-addon", + "install:rust-addon": "cargo fetch", "test:rust-addon": "cargo test", "test:ts": "is-ci test:ts:coverage test:ts:watch", "test:ts:coverage": "jest --coverage", From 448dbeb75fa66db6a9befb0de4a99c98483f836d Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Tue, 11 Jul 2023 11:18:00 -0500 Subject: [PATCH 04/14] disable building converter-ms-sems by default --- script/src/prod-build/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/src/prod-build/index.ts b/script/src/prod-build/index.ts index e3bc57ac45..ea5ddcda04 100644 --- a/script/src/prod-build/index.ts +++ b/script/src/prod-build/index.ts @@ -17,7 +17,7 @@ import { rmrf } from './utils/rmrf'; export function main({ stdout }: IO): void { // Ensure pipenv places the virtualenv in the project. - process.env.PIPENV_VENV_IN_PROJECT = '1'; + process.env.PIPENV_VENV_IN_PROJECT = '0'; const root = getDependencyGraph(process.cwd(), PackageType.Frontend); stdout.write(`ℹ️ Building ${root.path} for production\n`); From 69633c4480ab2e4c59b3d74859d7e74a32bff5b8 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Tue, 11 Jul 2023 13:21:03 -0500 Subject: [PATCH 05/14] disable converter-sems build directive --- services/converter-ms-sems/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/converter-ms-sems/Makefile b/services/converter-ms-sems/Makefile index 655f5f7f0a..7845cc6cf3 100644 --- a/services/converter-ms-sems/Makefile +++ b/services/converter-ms-sems/Makefile @@ -7,7 +7,9 @@ install-dependencies: install-dev-dependencies: python3.9 -m pipenv install --dev -build: install-dependencies +build: + +build_deprecated: install-dependencies bootstrap: install build install-dev-dependencies From 5017abbc15f2c46ba7bc4c4859375b95c5503929 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Wed, 12 Jul 2023 15:05:15 -0500 Subject: [PATCH 06/14] rust dependency changes --- apps/admin/frontend/package.json | 1 - apps/central-scan/frontend/Makefile | 2 +- apps/mark-scan/frontend/Makefile | 2 +- apps/scan/frontend/Makefile | 2 +- libs/ballot-interpreter-nh/package.json | 3 +-- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/admin/frontend/package.json b/apps/admin/frontend/package.json index 7b5d9aaf26..0a03d108a0 100644 --- a/apps/admin/frontend/package.json +++ b/apps/admin/frontend/package.json @@ -224,7 +224,6 @@ "vx": { "isBundled": true, "services": [ - "../../../services/converter-ms-sems", "../backend" ] } diff --git a/apps/central-scan/frontend/Makefile b/apps/central-scan/frontend/Makefile index 4ae3a03be1..4388729d44 100644 --- a/apps/central-scan/frontend/Makefile +++ b/apps/central-scan/frontend/Makefile @@ -5,7 +5,7 @@ FORCE: install: build: FORCE - pnpm install && pnpm build + pnpm install && pnpm --dir ../../../libs/ballot-interpreter-nh build && pnpm build bootstrap: install build diff --git a/apps/mark-scan/frontend/Makefile b/apps/mark-scan/frontend/Makefile index 3b9f943788..5672a0fa7e 100644 --- a/apps/mark-scan/frontend/Makefile +++ b/apps/mark-scan/frontend/Makefile @@ -17,7 +17,7 @@ run-all: (trap 'kill 0' SIGINT SIGHUP; make -C $(BACKEND) run & cd prodserver && node index.js) build: FORCE - pnpm install && pnpm build + pnpm install && pnpm --dir ../../../libs/ballot-interpreter-nh build && pnpm build bootstrap: install build diff --git a/apps/scan/frontend/Makefile b/apps/scan/frontend/Makefile index 4ae3a03be1..5626ed7f61 100644 --- a/apps/scan/frontend/Makefile +++ b/apps/scan/frontend/Makefile @@ -5,7 +5,7 @@ FORCE: install: build: FORCE - pnpm install && pnpm build + pnpm install && pnpm --dir ../../../libs/ballot-interpreter-nh build && pnpm build bootstrap: install build diff --git a/libs/ballot-interpreter-nh/package.json b/libs/ballot-interpreter-nh/package.json index 24a8e1360a..128aaacdfb 100644 --- a/libs/ballot-interpreter-nh/package.json +++ b/libs/ballot-interpreter-nh/package.json @@ -6,13 +6,12 @@ "types": "./build/index.d.ts", "scripts": { "type-check": "tsc --build", - "build": "pnpm build:rust-addon && pnpm build:ts", + "build": "pnpm install:rust-addon && pnpm build:rust-addon && pnpm build:ts", "build:rust-addon": "cargo-cp-artifact -nc build/rust-addon.node -- cargo build --message-format=json-render-diagnostics --release --offline", "build:ts": "tsc --build tsconfig.build.json", "clean": "cargo clean && rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", - "install": "pnpm install:rust-addon", "install:rust-addon": "cargo fetch", "test:rust-addon": "cargo test", "test:ts": "is-ci test:ts:coverage test:ts:watch", From 9b9661c0b99bf98cb9b9c29219a6a90813dd3629 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Wed, 6 Sep 2023 10:45:02 -0500 Subject: [PATCH 07/14] we no longer use the services structure with the removal of converter-ms-sems --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index c2013723e9..b8943d2e74 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -4,7 +4,7 @@ set -euo pipefail DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -for app in ${DIR}/../frontends/* ${DIR}/../services/* ${DIR}/../apps/*/frontend ${DIR}/../apps/*/backend; do +for app in ${DIR}/../frontends/* ${DIR}/../apps/*/frontend ${DIR}/../apps/*/backend; do if [ -d "${app}" ]; then make -C "${app}" bootstrap fi From a3d874a446efa30744fb1aefaab06457d50601cc Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Wed, 6 Sep 2023 10:47:02 -0500 Subject: [PATCH 08/14] fix path so cargo is available --- script/bootstrap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script/bootstrap b/script/bootstrap index b8943d2e74..e0ed5e5499 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -2,6 +2,12 @@ set -euo pipefail +local_user=`logname` +local_user_home_dir=$( getent passwd "${local_user}" | cut -d: -f6 ) + +# Make sure PATH includes cargo and /sbin +export PATH="${local_user_home_dir}/.cargo/bin:${PATH}:/sbin/" + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" for app in ${DIR}/../frontends/* ${DIR}/../apps/*/frontend ${DIR}/../apps/*/backend; do From 3315c24f164d4265bac2604a647ca312e4af9465 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Wed, 6 Sep 2023 10:58:47 -0500 Subject: [PATCH 09/14] working on localdev bootstrap --- apps/design/backend/Makefile | 7 +++++++ script/bootstrap | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 apps/design/backend/Makefile diff --git a/apps/design/backend/Makefile b/apps/design/backend/Makefile new file mode 100644 index 0000000000..cd39fa01fc --- /dev/null +++ b/apps/design/backend/Makefile @@ -0,0 +1,7 @@ +# Placeholder for build + +install: + +build: + +bootstrap: diff --git a/script/bootstrap b/script/bootstrap index e0ed5e5499..1a8304cfc0 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -10,7 +10,7 @@ export PATH="${local_user_home_dir}/.cargo/bin:${PATH}:/sbin/" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -for app in ${DIR}/../frontends/* ${DIR}/../apps/*/frontend ${DIR}/../apps/*/backend; do +for app in ${DIR}/../apps/*/frontend ${DIR}/../apps/*/backend; do if [ -d "${app}" ]; then make -C "${app}" bootstrap fi From bd1085a98ebae73b5357f09388675824e18f8766 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Wed, 6 Sep 2023 13:58:24 -0500 Subject: [PATCH 10/14] update path to ballot-interpreter after directory rename --- apps/central-scan/frontend/Makefile | 2 +- apps/mark-scan/frontend/Makefile | 2 +- apps/scan/frontend/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/central-scan/frontend/Makefile b/apps/central-scan/frontend/Makefile index 4388729d44..c50797760c 100644 --- a/apps/central-scan/frontend/Makefile +++ b/apps/central-scan/frontend/Makefile @@ -5,7 +5,7 @@ FORCE: install: build: FORCE - pnpm install && pnpm --dir ../../../libs/ballot-interpreter-nh build && pnpm build + pnpm install && pnpm --dir ../../../libs/ballot-interpreter build && pnpm build bootstrap: install build diff --git a/apps/mark-scan/frontend/Makefile b/apps/mark-scan/frontend/Makefile index 5672a0fa7e..73d7fe1bd6 100644 --- a/apps/mark-scan/frontend/Makefile +++ b/apps/mark-scan/frontend/Makefile @@ -17,7 +17,7 @@ run-all: (trap 'kill 0' SIGINT SIGHUP; make -C $(BACKEND) run & cd prodserver && node index.js) build: FORCE - pnpm install && pnpm --dir ../../../libs/ballot-interpreter-nh build && pnpm build + pnpm install && pnpm --dir ../../../libs/ballot-interpreter build && pnpm build bootstrap: install build diff --git a/apps/scan/frontend/Makefile b/apps/scan/frontend/Makefile index 5626ed7f61..56f64e85f7 100644 --- a/apps/scan/frontend/Makefile +++ b/apps/scan/frontend/Makefile @@ -5,7 +5,7 @@ FORCE: install: build: FORCE - pnpm install && pnpm --dir ../../../libs/ballot-interpreter-nh build && pnpm build + pnpm install && pnpm --dir ../../../libs/ballot-interpreter build && pnpm build bootstrap: install build From fa6594d45b878e94015a7d925a53baf05ec4456c Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Thu, 21 Sep 2023 10:05:41 -0500 Subject: [PATCH 11/14] update circleci config for trusted build changes to rust/cargo --- .circleci/config.yml | 4 +++- libs/monorepo-utils/src/circleci.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae4f78b2ba..78d16c2a5d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1233,6 +1233,8 @@ commands: - run: name: Setup Dependencies command: | + pnpm --dir libs/ballot-interpreter install:rust-addon + pnpm --dir libs/ballot-interpreter build:rust-addon pnpm install --frozen-lockfile - save_cache: key: @@ -1241,4 +1243,4 @@ commands: paths: - /root/.local/share/pnpm/store/v3 - /root/.cache/ms-playwright - - /root/.cargo \ No newline at end of file + - /root/.cargo diff --git a/libs/monorepo-utils/src/circleci.ts b/libs/monorepo-utils/src/circleci.ts index f4e8064b4b..e09534aeb7 100644 --- a/libs/monorepo-utils/src/circleci.ts +++ b/libs/monorepo-utils/src/circleci.ts @@ -178,6 +178,8 @@ commands: - run: name: Setup Dependencies command: | + pnpm --dir libs/ballot-interpreter install:rust-addon + pnpm --dir libs/ballot-interpreter build:rust-addon pnpm install --frozen-lockfile - save_cache: key: From 49fc5b327ae92ce0b3bb6041cce55e917b972a53 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Thu, 21 Sep 2023 10:08:12 -0500 Subject: [PATCH 12/14] ordering --- .circleci/config.yml | 2 +- libs/monorepo-utils/src/circleci.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 78d16c2a5d..1ba327af6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1233,9 +1233,9 @@ commands: - run: name: Setup Dependencies command: | + pnpm install --frozen-lockfile pnpm --dir libs/ballot-interpreter install:rust-addon pnpm --dir libs/ballot-interpreter build:rust-addon - pnpm install --frozen-lockfile - save_cache: key: dotcache-cache-{{checksum ".circleci/config.yml" }}-{{ checksum diff --git a/libs/monorepo-utils/src/circleci.ts b/libs/monorepo-utils/src/circleci.ts index e09534aeb7..f1a8de17a5 100644 --- a/libs/monorepo-utils/src/circleci.ts +++ b/libs/monorepo-utils/src/circleci.ts @@ -178,9 +178,9 @@ commands: - run: name: Setup Dependencies command: | + pnpm install --frozen-lockfile pnpm --dir libs/ballot-interpreter install:rust-addon pnpm --dir libs/ballot-interpreter build:rust-addon - pnpm install --frozen-lockfile - save_cache: key: dotcache-cache-{{checksum ".circleci/config.yml" }}-{{ checksum From 356c729dfa46b2944c5c52b444fe9befe966b8b8 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Thu, 21 Sep 2023 10:17:04 -0500 Subject: [PATCH 13/14] remove newline --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ba327af6e..10e3b8c444 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1243,4 +1243,4 @@ commands: paths: - /root/.local/share/pnpm/store/v3 - /root/.cache/ms-playwright - - /root/.cargo + - /root/.cargo \ No newline at end of file From 6e3f5c98d28aec4290ed48f7f854d9c1b8b2b180 Mon Sep 17 00:00:00 2001 From: Adam McManus Date: Thu, 21 Sep 2023 10:30:57 -0500 Subject: [PATCH 14/14] fix rust-addon type in build step --- libs/ballot-interpreter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ballot-interpreter/package.json b/libs/ballot-interpreter/package.json index 8e90ece05e..f36a6dcc8b 100644 --- a/libs/ballot-interpreter/package.json +++ b/libs/ballot-interpreter/package.json @@ -13,7 +13,7 @@ "scripts": { "benchmark": "jest --runInBand --projects benchmarks", "build": "pnpm install:rust-addon && pnpm build:rust-addon && pnpm build:ts", - "build:rust-addon": "cargo-cp-artifact -nc build/hmpb-ts/rust-addon.node -- cargo build --message-format=json-render-diagnostics --release --offline", + "build:rust-addon": "cargo-cp-artifact -nc build/hmpb-ts/rust_addon.node -- cargo build --message-format=json-render-diagnostics --release --offline", "build:ts": "tsc --build tsconfig.build.json", "clean": "cargo clean && rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", "install:rust-addon": "cargo fetch",