-
Notifications
You must be signed in to change notification settings - Fork 281
Expand file tree
/
Copy pathTaskfile.yml
More file actions
127 lines (108 loc) · 4.27 KB
/
Copy pathTaskfile.yml
File metadata and controls
127 lines (108 loc) · 4.27 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: "3"
vars:
CARGO: cargo
LIVE_TIMEOUT_SECS: '{{default "30" .LIVE_TIMEOUT_SECS}}'
MACOS_TARGET: '{{default "aarch64-apple-darwin" .MACOS_TARGET}}'
ARM_TARGET: '{{default "aarch64-unknown-linux-gnu" .ARM_TARGET}}'
BENCH_BASELINE: '{{default ".benchmarks/filesystem-baseline.json" .BENCH_BASELINE}}'
BENCH_ITEMS: '{{default "1000" .BENCH_ITEMS}}'
BENCH_ITERATIONS: '{{default "5" .BENCH_ITERATIONS}}'
BENCH_PROCS: '{{default "1" .BENCH_PROCS}}'
BENCH_BYTES: '{{default "4096" .BENCH_BYTES}}'
MDTEST_BIN: '{{default "mdtest" .MDTEST_BIN}}'
MPIRUN_BIN: '{{default "mpirun" .MPIRUN_BIN}}'
BENCH_MOUNT_TIMEOUT_SECS: '{{default "30" .BENCH_MOUNT_TIMEOUT_SECS}}'
tasks:
dev-deps:
desc: install development dependencies
cmds:
- "{{.CARGO}} install --locked cargo-nextest"
build:
desc: Build debug binaries
cmds:
- "{{.CARGO}} build"
build-release:
desc: Build release binaries
cmds:
- "{{.CARGO}} build --release"
build-osx:
desc: Build release binaries for macOS (requires Rust target aarch64-apple-darwin or x86_64-apple-darwin)
cmds:
- "{{.CARGO}} build --release --target {{.MACOS_TARGET}}"
build-arm:
desc: Build release binaries for ARM64 Linux (requires Rust target aarch64-unknown-linux-gnu and a cross-linker)
cmds:
- "{{.CARGO}} build --release --target {{.ARM_TARGET}}"
check-arm:
desc: Type-check for ARM64 Linux (catches platform-specific c_char signedness issues; no cross-linker needed - just `rustup target add aarch64-unknown-linux-gnu`)
cmds:
- "{{.CARGO}} check --target {{.ARM_TARGET}}"
test:
desc: Run unit + integration tests (live mount tests remain ignored)
cmds:
- "{{.CARGO}} nextest run --release"
test-live:
desc: Run live-mount integration tests (requires FUSE 3 or macFUSE); sets ENCFS_LIVE_TESTS=1
cmds:
- |
set -euo pipefail
ENCFS_LIVE_TESTS=1 ENCFS_LIVE_MOUNT_TIMEOUT_SECS='{{.LIVE_TIMEOUT_SECS}}' \
{{.CARGO}} test --release --test live_mount -- --ignored --test-threads=1
fmt:
desc: Format Rust code
cmds:
- "{{.CARGO}} fmt"
fmt-check:
desc: Check formatting (CI-friendly)
cmds:
- "{{.CARGO}} fmt -- --check"
clippy:
desc: Run clippy (lints)
cmds:
- "{{.CARGO}} clippy --all-targets --all-features -- -D warnings"
clippy-linux:
cmds:
- "{{.CARGO}} clippy --target aarch64-unknown-linux-gnu --all-targets --all-features -- -D warnings"
benchmark:
desc: Run the EncFS filesystem benchmark and compare it with the local baseline
deps: [build-release]
preconditions:
- sh: test -f '{{.BENCH_BASELINE}}'
msg: "Benchmark baseline {{.BENCH_BASELINE}} is missing; run `task benchmark-save-baseline` first"
cmds:
- |
BENCH_BASELINE='{{.BENCH_BASELINE}}' BENCH_ITEMS='{{.BENCH_ITEMS}}' \
BENCH_ITERATIONS='{{.BENCH_ITERATIONS}}' BENCH_PROCS='{{.BENCH_PROCS}}' \
BENCH_BYTES='{{.BENCH_BYTES}}' MDTEST_BIN='{{.MDTEST_BIN}}' \
MPIRUN_BIN='{{.MPIRUN_BIN}}' \
BENCH_MOUNT_TIMEOUT_SECS='{{.BENCH_MOUNT_TIMEOUT_SECS}}' \
{{.CARGO}} bench --bench filesystem
benchmark-save-baseline:
desc: Run the EncFS filesystem benchmark and atomically replace the local baseline
deps: [build-release]
cmds:
- |
BENCH_SAVE_BASELINE=1 BENCH_BASELINE='{{.BENCH_BASELINE}}' \
BENCH_ITEMS='{{.BENCH_ITEMS}}' BENCH_ITERATIONS='{{.BENCH_ITERATIONS}}' \
BENCH_PROCS='{{.BENCH_PROCS}}' BENCH_BYTES='{{.BENCH_BYTES}}' \
MDTEST_BIN='{{.MDTEST_BIN}}' MPIRUN_BIN='{{.MPIRUN_BIN}}' \
BENCH_MOUNT_TIMEOUT_SECS='{{.BENCH_MOUNT_TIMEOUT_SECS}}' \
{{.CARGO}} bench --bench filesystem
coverage:
desc: Run coverage tests
cmds:
- "{{.CARGO}} tarpaulin --out lcov --output-dir coverage"
fuzz:
desc: Run the differential file-operations fuzzer (requires nightly; pass FUZZ_ARGS to add libFuzzer flags)
vars:
FUZZ_ARGS: '{{default "" .FUZZ_ARGS}}'
cmds:
- "{{.CARGO}} +nightly fuzz run fuzz_file_ops -- {{.FUZZ_ARGS}}"
fuzz-build:
desc: Build the fuzz target without running it
cmds:
- "{{.CARGO}} +nightly fuzz build fuzz_file_ops"
clean:
desc: Clean build artifacts
cmds:
- "{{.CARGO}} clean"