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

Optimize build time in dev mode #1215

Merged
merged 5 commits into from
Apr 29, 2024
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
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,15 @@ brew install protobuf
git clone https://github.com/spiceai/spiceai.git
cd spiceai

# Build and install OSS project
# Build and install OSS project in release mode
make install

# Build and install OSS project in dev mode
make install-dev

# Also you can specify specific features
SPICED_CUSTOM_FEATURES="postgres sqlite" make install

# Run the following to temporarily add spice to your PATH.
# Add it to the end of your .bashrc or .zshrc to permanently add spice to your PATH.
export PATH="$PATH:$HOME/.spice/bin"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ docker-run:
.PHONY: deps-licenses
dep-licenses:
@cargo install cargo-license --quiet
@cargo license -d
@cargo license -d

.PHONY: display-deps
display-deps:
Expand Down Expand Up @@ -95,7 +95,7 @@ install-runtime: build-runtime
install-dev: build-dev
mkdir -p ~/.spice/bin
install -m 755 target/release/spice ~/.spice/bin/spice
install -m 755 target/release/spiced ~/.spice/bin/spiced
install -m 755 target/debug/spiced ~/.spice/bin/spiced

################################################################################
# Target: modtidy #
Expand Down
5 changes: 4 additions & 1 deletion bin/spiced/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
OPT_LEVEL = --release

ifdef REL_VERSION
SPICED_FEATURES := --features release
endif

ifdef DEV
SPICED_FEATURES := --features dev
OPT_LEVEL = --profile dev
endif

ifdef SPICED_TARGET_DIR
Expand All @@ -18,4 +21,4 @@ endif

.PHONY: all
all:
cargo build --release $(SPICED_FEATURES) --target-dir $(TARGET_DIR) $(CUSTOM_FEATURES)
cargo build ${OPT_LEVEL} $(SPICED_FEATURES) --target-dir $(TARGET_DIR) $(CUSTOM_FEATURES)
Loading