-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
47 lines (37 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
test:
cargo test
cd crates/bodhi && npm test -- --run
cd openai-pysdk-compat && poetry run pytest || true
format:
cd crates/bodhi && npm run format && npm run lint
cargo fmt --all
cd openai-pysdk-compat && poetry run ruff format .
ci.clean:
PACKAGES=$$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name' | sed 's/^/-p /'); \
cargo clean $$PACKAGES
ci.coverage:
$(MAKE) coverage
coverage:
cargo build -p llama_server_proc; \
PACKAGES=$$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name' | sed 's/^/-p /'); \
cargo llvm-cov test --no-fail-fast --all-features $$PACKAGES --lcov --output-path lcov.info
ci.update-version:
@echo "Updating version to $(VERSION) in Cargo.toml files"
@for dir in crates/* crates/bodhi/src-tauri; do \
if [ -f $$dir/Cargo.toml ]; then \
sed -i.bak "s/^version = .*/version = \"$(VERSION)\"/" $$dir/Cargo.toml && \
rm $$dir/Cargo.toml.bak; \
fi \
done
ci.build:
cd crates/bodhi/src-tauri && \
cargo tauri build $${TARGET:+--target $${TARGET}} --ci --config '{"tauri": {"updater": {"active": false}}}'
ci.setup-vercel-ai:
cd vercel-ai && pnpm recursive install --frozen-lockfile
cd vercel-ai/packages/core && pnpm install --frozen-lockfile
cd vercel-ai && pnpm run build --filter=ai...
ci.app-pnpm:
cd crates/bodhi && pnpm install
ci.ui:
cd crates/bodhi && pnpm run test run --coverage
.PHONY: test format coverage ci.clean ci.coverage ci.update-version ci.build ci.setup-vercel-ai ci.ui