forked from axone-protocol/contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
98 lines (82 loc) · 2.37 KB
/
Makefile.toml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[tasks.format-rust]
args = ["fmt"]
command = "cargo"
description = "Format rust sources files."
install_crate = { rustup_component_name = "rustfmt" }
[tasks.lint-rust-format]
args = ["fmt", "--all", "--", "--check"]
command = "cargo"
description = "Check format of sources files."
install_crate = { rustup_component_name = "rustfmt" }
[tasks.lint-rust]
args = [
"clippy",
"--workspace",
"--locked",
"--all-targets",
"--",
"-D",
"clippy::all",
"-D",
"warnings",
]
command = "cargo"
description = "Check lint of all sources files."
install_crate = { rustup_component_name = "clippy" }
[tasks.lint-toml]
args = ["lint"]
command = "taplo"
description = "Check lint of all toml files."
install_crate = { crate_name = "taplo-cli", binary = "taplo", test_arg = "--help" }
[tasks.format-toml]
args = ["fmt"]
command = "taplo"
description = "Format toml file"
install_crate = { crate_name = "taplo-cli", binary = "taplo", test_arg = "--help" }
[tasks.lint]
dependencies = ["lint-rust-format", "lint-rust", "lint-toml"]
[tasks.format]
dependencies = ["format-rust", "format-toml"]
[tasks.clean]
args = ["clean"]
command = "cargo"
[tasks.build]
args = ["build", "--release", "--locked"]
command = "cargo"
[tasks.build-coverage]
args = ["build"]
command = "cargo"
description = "Compile the source code and create testable artifacts."
env = { RUSTFLAGS = "-Cinstrument-coverage" }
[tasks.test]
args = ["test", "--lib", "--tests", "--workspace", "--locked"]
command = "cargo"
dependencies = ["build-coverage"]
description = "Run all unit tests."
env = { LLVM_PROFILE_FILE = "default.profraw", RUST_BACKTRACE = 1 }
install_crate = { rustup_component_name = "llvm-tools-preview" }
[tasks.test-coverage]
dependencies = ["test"]
install_crate = { crate_name = "grcov" }
script = '''
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*cargo*" -o coverage.lcov
'''
[tasks.install_wasm]
script = '''
rustup target add wasm32-unknown-unknown
'''
[tasks.wasm]
args = ["build", "--release", "--lib", "--target", "wasm32-unknown-unknown"]
command = "cargo"
dependencies = ["install_wasm"]
env = { RUSTFLAGS = "-C link-arg=-s" }
[tasks.schema]
workspace = true
[tasks.check_contracts]
dependencies = ["wasm"]
install_crate = { crate_name = "cosmwasm-check" }
script = '''
cosmwasm-check ./target/wasm32-unknown-unknown/release/*.wasm
'''
[config]
default_to_workspace = false