forked from SpringQL/SpringQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
123 lines (104 loc) · 2.65 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
extend= [
{ path = "coverage_grcov.makefile.toml" }
]
[config]
default_to_workspace = false
skip_core_tasks = true
[env]
PROJ_NAME = "SpringQL"
SKIP_INSTALL_GRCOV = 1
[tasks.help]
script = ['''
#!/usr/bin/env bash -eux
cargo make --list-all-steps
''']
[tasks.format]
script = ['''
#!/usr/bin/env bash -eux
cargo fmt --all
''']
[tasks.lint]
script = ['''
#!/usr/bin/env bash -eux
RUSTFLAGS='-D warnings' cargo clippy --workspace --all-targets --all-features
''']
[tasks.check-dependencies]
condition = { rust_version = { min = "1.56.1" } } # cargo-deny 0.11.4 : supports rust 1.56.1 later
script = ['''
#!/usr/bin/env bash -eux
cargo deny check
''']
[tasks.build]
script = ['''
#!/usr/bin/env bash -eux
RUSTFLAGS='-D warnings' cargo build --workspace --all-targets --all-features
''']
dependencies=["check-dependencies"]
[tasks.test]
script = ['''
#!/usr/bin/env bash -eux
RUST_LOG=springql_core=info,warn RUSTFLAGS='-D warnings' cargo test --workspace --all-targets --all-features
''']
[tasks.example-build]
script = ['''
#!/usr/bin/env bash -eux
for example in $(git ls-files |grep -e 'examples/[^/]*\.rs$') ; do
cargo build --example $(basename -s .rs "$example")
done
''']
[tasks.example-run]
dependencies = ["example-build"]
script = ['''
#!/usr/bin/env bash -eux
echo '-- Start doc_app1'
cargo run --example doc_app1
echo '-- Start doc_app2'
cargo run --example doc_app2
echo '-- Start http_client_sink_writer'
cargo run --example http_client_sink_writer 127.0.0.1 18080
echo '-- Start in_vehicle_pipeline'
cargo run --example in_vehicle_pipeline
echo '-- End in_vehicle_pipeline'
echo
''']
[tasks.doc]
script = ['''
#!/usr/bin/env bash -eux
cargo clean --doc
cargo d
''']
[tasks.deadlink]
script = ['''
#!/usr/bin/env bash -eux
cargo doc
for crate in $( cargo metadata --format-version=1 --no-deps | jq -r '.packages | map(.name) | .[]' | tr '-' '_' ); do
cargo deadlinks --check-http --ignore-fragments --dir target/doc/${crate}
done
mlc --ignore-path target --throttle 15
''']
[tasks.deadlink-expect]
script = ['''
#!/usr/bin/env bash -eux
mkdir -p target
set +e
cargo deadlinks --check-http --ignore-fragments | tee deadlinks.expected
''']
[tasks.copyright]
script = [
'''
#!/usr/bin/env bash -eux
for rs in $(git ls-files |grep -e '\.rs$') ; do
grep '// This file is part of https://github.com/SpringQL/SpringQL which is licensed under MIT OR Apache-2.0. See file LICENSE-MIT or LICENSE-APACHE for full license details.' $rs
done
''',
]
[tasks.actionlint]
description="lint github actions with actionlint"
script = [
'''
#!/usr/bin/env bash -eux
docker run --rm -v $(pwd):/repo --workdir /repo rhysd/actionlint:latest -color
'''
]
[tasks.lcov]
alias="coverage_grcov"