forked from nervosnetwork/molecule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (66 loc) · 1.39 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
ci:
@set -eu; \
export RUSTFLAGS='-D warnings'; \
make fmt clippy; \
make cargo-test ci-examples ci-crates; \
echo "Success!"
RUST_DEV_PROJS = examples/ci-tests tests
RUST_PROD_PROJS = bindings/rust tools/codegen tools/compiler
RUST_PROJS = ${RUST_DEV_PROJS} ${RUST_PROD_PROJS}
C_PROJS = examples/ci-tests
clean:
@set -eu; \
for dir in ${RUST_PROJS}; do \
cd "$${dir}"; \
cargo clean; \
cd - > /dev/null; \
done; \
for dir in ${C_PROJS}; do \
cd "$${dir}"; \
make clean; \
cd - > /dev/null; \
done
fmt:
@set -eu; \
for dir in ${RUST_PROJS}; do \
cd "$${dir}"; \
cargo fmt --all -- --check; \
cd - > /dev/null; \
done
clippy:
@set -eu; \
for dir in ${RUST_PROJS}; do \
cd "$${dir}"; \
cargo clean; \
cargo clippy --all --all-targets --all-features; \
cd - > /dev/null; \
done
cargo-test:
@set -eu; \
for dir in ${RUST_PROJS}; do \
cd "$${dir}"; \
cargo test; \
cd - > /dev/null; \
done
ci-msrv:
@set -eu; \
for dir in ${RUST_PROD_PROJS}; do \
cd "$${dir}"; \
cargo clean; \
cargo build --all --verbose; \
cd - > /dev/null; \
done; \
git diff --exit-code tools/compiler/Cargo.lock
ci-crates:
@set -eu; \
for dir in ${RUST_PROJS}; do \
cd "$${dir}"; \
cargo clean; \
cargo test --all --verbose; \
cd - > /dev/null; \
done; \
git diff --exit-code tools/compiler/Cargo.lock
ci-examples:
@set -eu; \
cd examples/ci-tests; \
make clean test