blob: 111949342d45d803450f9ba1f7065784cf4cda69 (
plain)
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
|
profile := dev
target = $(shell rustc -vV | grep host | awk '{print $$2}')
default: build
set_rust:
rustup default stable
prepare:
rustup target add $(target)
build: prepare
cargo build --profile $(profile) --target $(target)
test:
cargo test
examples:
cargo run --example generate_map
coverage:
cargo tarpaulin --fail-under 100
benchmark:
cargo bench
format:
cargo fmt && cargo clippy --fix
lint:
cargo fmt -- --check && cargo clippy
release:
cargo publish
ci: lint coverage
ifneq (,$(findstring refs/tags/,$(GIT_REF)))
$(MAKE) release
endif
.PHONY: default set_rust prepare build test coverage format lint benchmark release ci examples
|