-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 829 Bytes
/
Makefile
File metadata and controls
42 lines (31 loc) · 829 Bytes
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
# Makefile for Rust Project
# Variables
CARGO ?= cargo
# Default target
all: build
# Build the project in debug mode
build:
$(CARGO) build
# Build the project in release mode
release:
$(CARGO) build --release
# Run tests
test:
$(CARGO) test
integration-test: build
cd tests && \
if [ ! -d "venv" ]; then \
python3 -m venv venv; \
fi && \
. venv/bin/activate && \
pip install --upgrade pip setuptools wheel && \
pip install -r requirements.txt && \
pytest
# Install project as binary (if applicable)
install:
$(CARGO) install --path .
# Uninstall project binary (if applicable)
uninstall:
$(CARGO) uninstall $(shell $(CARGO) read-manifest | jq -r .name)
# PHONY targets
.PHONY: all build release run run-release test test-verbose clean format format-check lint doc update install uninstall bench examples