This repository has been archived by the owner on Nov 24, 2022. It is now read-only.
forked from mitsuhiko/minijinja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (44 loc) · 1.85 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
48
49
50
51
52
53
54
55
DOC_FEATURES=source,json,urlencode
TEST_FEATURES=unstable_machinery,builtins,source,json,urlencode,debug,internal_debug,macros,multi-template
all: test
build:
@cargo build --all
doc:
@cd minijinja; RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--cfg=docsrs --html-in-header doc-header.html" cargo doc -p minijinja -p minijinja-autoreload -p minijinja-stack-ref --no-deps --features=$(DOC_FEATURES)
test:
@$(MAKE) run-tests FEATURES=$(TEST_FEATURES)
@$(MAKE) run-tests FEATURES=$(TEST_FEATURES),preserve_order,key_interning,unicode
@echo "CARGO TEST ALL FEATURES"
@cd minijinja; cargo test --all-features
snapshot-tests:
@cd minijinja; cargo insta test --all-features --review
run-tests:
@rustup component add rustfmt 2> /dev/null
@echo "CARGO TESTS"
@cd minijinja; cargo test --features=json,urlencode,internal_debug
@echo "CARGO TEST SPEEDUPS"
@cd minijinja; cargo test --no-default-features --features=speedups,$(FEATURES)
@echo "CARGO CHECK NO_DEFAULT_FEATURES"
@cd minijinja; cargo check --no-default-features --features=debug
check:
@echo "check no default features:"
@cd minijinja; cargo check --no-default-features
@echo "check all features:"
@cd minijinja; cargo check --all-features
@echo "check macro only:"
@cd minijinja; cargo check --no-default-features --features macros
@echo "check multi-template only:"
@cd minijinja; cargo check --no-default-features --features multi-template
@echo "check minijinja-autoreload:"
@cd minijinja-autoreload; cargo check
@cd minijinja-autoreload; cargo check --no-default-features
format:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all
format-check:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all -- --check
lint:
@rustup component add clippy 2> /dev/null
@cargo clippy --all -- -F clippy::dbg-macro -D warnings
.PHONY: all doc test run-tests format format-check lint check snapshot-tests