-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update build process for metrics-store
Signed-off-by: Rudraksh Pareek <[email protected]>
- Loading branch information
1 parent
6ad4a5a
commit 8a4491f
Showing
4 changed files
with
33 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
build: | ||
cd singleton-queue && cargo +nightly build --target=wasm32-unknown-unknown --release | ||
cd metrics-collector && cargo +nightly build --target=wasm32-unknown-unknown --release | ||
# check wether compiled with wasm-pack | ||
ifeq ($(shell test -e ./metrics-collector/pkg/metrics_collector_bg.wasm && echo -n y),y) | ||
METRICS_COLLECTOR_WASM=./metrics_collector/pkg/metrics_collector_bg.wasm | ||
endif | ||
ifeq ($(shell test -e ./singleton-queue/pkg/singleton_queue_bg.wasm && echo -n y),y) | ||
SINGLETON_QUEUE_WASM=./singleton-queue/pkg/singleton_queue_bg.wasm | ||
endif | ||
|
||
# a small optimized binary without debug info, useful for releases | ||
build: clean | ||
cd singleton-queue && wasm-pack build --release | ||
cd metrics-collector && wasm-pack build --release | ||
|
||
build-unoptimized: clean | ||
cd metrics-collector; \ | ||
cargo +nightly build --target=wasm32-unknown-unknown --release; | ||
cd singleton-queue; \ | ||
cargo +nightly build --target=wasm32-unknown-unknown --release; | ||
|
||
deploy: | ||
docker-compose up --build --remove-orphans | ||
METRICS_COLLECTOR_WASM=$(METRICS_COLLECTOR_WASM) \ | ||
SINGLETON_QUEUE_WASM=$(SINGLETON_QUEUE_WASM) \ | ||
docker-compose up --build --remove-orphans; | ||
|
||
# shows only the logs related to WASM filter/singleton | ||
deploy-filtered: | ||
docker-compose up --build --remove-orphans | grep "\[wasm\]\|Starting" | ||
METRICS_COLLECTOR_WASM=$(METRICS_COLLECTOR_WASM) \ | ||
SINGLETON_QUEUE_WASM=$(SINGLETON_QUEUE_WASM) \ | ||
docker-compose up --build --remove-orphans | grep "\[wasm\]\|Starting"; | ||
|
||
run: build deploy | ||
|
||
run-filtered: build deploy-filtered | ||
|
||
clean: | ||
cd singleton-queue && cargo clean | ||
cd metrics-collector && cargo clean | ||
cd singleton-queue && cargo clean && rm -rf ./pkg | ||
cd metrics-collector && cargo clean && rm -rf ./pkg |
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