-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.toml
91 lines (77 loc) · 1.78 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
[config]
default_to_workspace = false
skip_core_tasks = true
[env]
PROJ_NAME = "serde-encrypt"
[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.build]
script = ['''
#!/usr/bin/env bash -eux
RUSTFLAGS='-D warnings' cargo build --workspace --all-targets --all-features
''']
[tasks.test]
script = ['''
#!/usr/bin/env bash -eux
cargo test --workspace --all-targets --all-features
''']
[tasks.doc]
script = ['''
#!/usr/bin/env bash -eux
cargo clean --doc
cargo doc --workspace --no-deps --all-features
''']
[tasks.deadlink]
script = ['''
#!/usr/bin/env bash -eux
cargo deadlinks --check-http
mlc --ignore-path target
''']
[tasks.os-less-build]
script = [
'''
#!/usr/bin/env bash -eux
rustup target add aarch64-unknown-none
RUSTFLAGS='-D warnings' cargo build --workspace --no-default-features --target=aarch64-unknown-none
''',
]
[tasks.build-core-sgx]
script = [
'''
#!/usr/bin/env bash -eux
docker run --rm -v `pwd`:/root/serde-encrypt baiduxlab/sgx-rust:1804-1.1.3 bash -c '
export PATH=/root/.cargo/bin:$PATH
cd /root/serde-encrypt/serde-encrypt-core
rustup show
RUSTFLAGS="-D warnings" cargo build --all-features
'
''',
]
[tasks.publish]
script = [
'''
#!/usr/bin/env bash -eux
cargo workspaces publish
''',
]
[tasks.lcov]
script = [
'''
#!/usr/bin/env bash -eux
rm -rf target/debug/deps/${PROJ_NAME}-*
export CARGO_INCREMENTAL=0
export RUSTFLAGS="-Zinstrument-coverage"
export LLVM_PROFILE_FILE="${PROJ_NAME}-%p-%m.profraw"
cargo +nightly build --workspace --verbose
cargo +nightly test --workspace --verbose
grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o lcov.info
''',
]