-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.toml
More file actions
106 lines (98 loc) · 2.51 KB
/
Makefile.toml
File metadata and controls
106 lines (98 loc) · 2.51 KB
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
[tasks.fmt]
description = "Format source code"
workspace = false
install_script = ['''
#!/usr/bin/env bash
set -euo pipefail
CHANNEL=$(awk -F'"' '/^\s*channel\s*=/ {print $2; exit}' rust-toolchain.toml)
if [ -z "${CHANNEL}" ]; then
CHANNEL=nightly
fi
if ! rustup which rustfmt --toolchain "${CHANNEL}" >/dev/null 2>&1; then
rustup install "${CHANNEL}"
fi
''']
script = '''
#!/usr/bin/env bash
set -euo pipefail
CHANNEL=$(awk -F'"' '/^\s*channel\s*=/ {print $2; exit}' rust-toolchain.toml)
if [ -z "${CHANNEL}" ]; then
CHANNEL=nightly
fi
cargo +"${CHANNEL}" fmt
'''
[tasks.coverage-grcov]
description = "Generate code coverage report using grcov"
workspace = false
category = "Test"
script = '''
#!/usr/bin/env bash
./scripts/coverage.sh
'''
[tasks.coverage]
description = "Generate code coverage report"
workspace = false
category = "Test"
run_task = { name = "coverage-grcov" }
[tasks.lifetime-regression]
description = "Run lifetime regression suite (tests + coverage)"
workspace = false
category = "Test"
dependencies = ["coverage"]
[tasks.ci-check]
description = "Run full CI validation pipeline"
workspace = false
script = '''
#!/usr/bin/env bash
set -euo pipefail
ARGS=("$@")
if [ ${#ARGS[@]} -gt 0 ] && [ "${ARGS[0]}" = "--" ]; then
ARGS=("${ARGS[@]:1}")
fi
if [ ${#ARGS[@]} -eq 0 ]; then
ARGS=("all")
fi
./scripts/ci-check.sh "${ARGS[@]}"
'''
[tasks.ci-dylint]
description = "Run custom dylints (optionally specify lint names)"
workspace = false
script = '''
#!/usr/bin/env bash
set -euo pipefail
ARGS=("$@")
if [ ${#ARGS[@]} -gt 0 ] && [ "${ARGS[0]}" = "--" ]; then
ARGS=("${ARGS[@]:1}")
fi
./scripts/ci-check.sh dylint "${ARGS[@]}"
'''
[tasks.bench-actor-core-kernel-all]
description = "Actor core benchmark build check"
workspace = false
script = '''
#!/usr/bin/env bash
set -euo pipefail
cargo bench -p fraktor-actor-core-kernel-rs --benches
'''
[tasks.bench-actor-core-kernel-mailbox]
description = "Run actor core mailbox Criterion benchmarks"
workspace = false
script = '''
#!/usr/bin/env bash
set -euo pipefail
cargo bench -p fraktor-actor-core-kernel-rs --bench mailbox
'''
[tasks.actor-tell-disabled-check]
description = "Build actor core crates with tell API disabled via --cfg fraktor_disable_tell"
workspace = false
script = '''
#!/usr/bin/env bash
set -euo pipefail
EXTRA_RUSTFLAGS="--cfg fraktor_disable_tell"
if [ -n "${RUSTFLAGS:-}" ]; then
export RUSTFLAGS="${RUSTFLAGS} ${EXTRA_RUSTFLAGS}"
else
export RUSTFLAGS="${EXTRA_RUSTFLAGS}"
fi
cargo check -p fraktor-actor-core-kernel-rs -p fraktor-actor-core-typed-rs
'''