代码拉取完成,页面将自动刷新
ENABLE_FEATURES ?= default
ifeq ($(ROCKSDB_SYS_STATIC),1)
ENABLE_FEATURES += static-link
endif
ifeq ($(ROCKSDB_SYS_PORTABLE),1)
ENABLE_FEATURES += portable
endif
DEPS_PATH = $(CURDIR)/tmp
BIN_PATH = $(CURDIR)/bin
GOROOT ?= $(DEPS_PATH)/go
default: release
.PHONY: all
all: format build test
dev:
@export ENABLE_FEATURES=dev && make all
build:
cargo build --features "${ENABLE_FEATURES}"
run:
cargo run --features "${ENABLE_FEATURES}"
release:
cargo build --release --features "${ENABLE_FEATURES}"
@mkdir -p bin
cp -f ./target/release/tikv-ctl ./target/release/tikv-server ./bin
static_release:
ROCKSDB_SYS_STATIC=1 ROCKSDB_SYS_PORTABLE=1 make release
test:
# When SIP is enabled, DYLD_LIBRARY_PATH will not work in subshell, so we have to set it
# again here. LOCAL_DIR is defined in .travis.yml.
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${LOCAL_DIR}/lib" && \
export LOG_LEVEL=DEBUG && \
export RUST_BACKTRACE=1 && \
cargo test --features "${ENABLE_FEATURES}" -- --nocapture && \
cargo test --features "${ENABLE_FEATURES}" --bench benches -- --nocapture
# TODO: remove above target once https://github.com/rust-lang/cargo/issues/2984 is resolved.
bench:
LOG_LEVEL=ERROR RUST_BACKTRACE=1 cargo bench --features "${ENABLE_FEATURES}" -- --nocapture && \
RUST_BACKTRACE=1 cargo run --release --bin bench-tikv --features "${ENABLE_FEATURES}"
format:
@cargo fmt -- --write-mode diff | grep -E "Diff .*at line" > /dev/null && cargo fmt -- --write-mode overwrite || exit 0
@rustfmt --write-mode diff tests/tests.rs benches/benches.rs | grep -E "Diff .*at line" > /dev/null && rustfmt --write-mode overwrite tests/tests.rs benches/benches.rs || exit 0
clean:
cargo clean
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。