mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-02 18:22:40 +01:00
* vector: build without a system protoc lance's build scripts run $PROTOC and fail without one. Point it at the protoc that protoc-bin-vendored ships, at the version in Cargo.lock, so building inside seaweed-vector/ needs only the Rust toolchain. An explicit PROTOC still wins, and a registry without the crate falls back to PATH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * test(s3vectors): build weed-vector inside its workspace Cargo reads seaweed-vector/.cargo/config.toml only when it runs there, so build from that directory to pick up the vendored protoc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * ci(vector): drop the PROTOC step the workspace config replaces Builds run inside seaweed-vector/, where the cargo config already points lance at the vendored protoc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * test(s3vectors): resolve CARGO_TARGET_DIR before changing directory A relative CARGO_TARGET_DIR given to make would point cargo, which now runs in seaweed-vector/, and the cp after it at different directories. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * vector: pick the vendored protoc on every Linux host it ships for protoc-bin-vendored also carries ppc64le, s390x and x86_32 binaries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.3 KiB
Makefile
47 lines
1.3 KiB
Makefile
WEED := ./weed
|
|
VEC := ./weed-vector
|
|
WORKER_MANIFEST := ../../rust/sw-vector-distributed/Cargo.toml
|
|
ifneq ($(wildcard $(WORKER_MANIFEST)),)
|
|
WORKER := ./weed-vector-worker
|
|
endif
|
|
VOLUME := ./weed-volume
|
|
CARGO_PROFILE ?= release
|
|
CARGO_TARGET_DIR ?= $(abspath ../../seaweed-vector/target)
|
|
override CARGO_TARGET_DIR := $(abspath $(CARGO_TARGET_DIR))
|
|
CARGO_OUTPUT := $(CARGO_TARGET_DIR)/$(if $(filter dev,$(CARGO_PROFILE)),debug,$(CARGO_PROFILE))
|
|
export CARGO_TARGET_DIR
|
|
|
|
.PHONY: all test perf build clean FORCE
|
|
|
|
all: test
|
|
|
|
$(WEED): FORCE
|
|
go build -o $(WEED) ../../weed
|
|
|
|
$(VEC): FORCE
|
|
cd ../../seaweed-vector && cargo build --locked --profile $(CARGO_PROFILE) -p weed-vector-server
|
|
cp $(CARGO_OUTPUT)/weed-vector $(VEC)
|
|
|
|
ifneq ($(WORKER),)
|
|
$(WORKER): $(VEC) FORCE
|
|
cargo build --locked --profile $(CARGO_PROFILE) --manifest-path ../../rust/Cargo.toml -p sw-vector-distributed --bin weed-vector
|
|
cp $(CARGO_OUTPUT)/weed-vector $(WORKER)
|
|
endif
|
|
|
|
$(VOLUME): $(VEC) $(WORKER) FORCE
|
|
cargo build --locked --profile $(CARGO_PROFILE) --manifest-path ../../seaweed-volume/Cargo.toml --bin weed-volume
|
|
cp $(CARGO_OUTPUT)/weed-volume $(VOLUME)
|
|
|
|
FORCE:
|
|
|
|
build: $(WEED) $(VEC) $(WORKER) $(VOLUME)
|
|
|
|
test: build
|
|
./run_test.sh
|
|
|
|
perf: build
|
|
./run_perf.sh
|
|
|
|
clean:
|
|
rm -f $(WEED) $(VEC) ./weed-vector-worker $(VOLUME)
|