-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
141 lines (116 loc) · 3.87 KB
/
Copy pathTaskfile.yml
File metadata and controls
141 lines (116 loc) · 3.87 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: "3"
# Cargo manifest lives next to the Rust crate, not in the repo root.
vars:
CARGO_MANIFEST: native/whisper_cpp_native/Cargo.toml
tasks:
setup:
desc: Install Elixir deps
cmds:
- mix deps.get
upgrade:
desc: Bump Elixir + Rust deps to latest compatible
cmds:
- mix deps.update --all
- cargo upgrade --manifest-path {{.CARGO_MANIFEST}} --incompatible allow
- cargo update --manifest-path {{.CARGO_MANIFEST}}
outdated:
desc: Report deps that have newer releases available on Hex / crates.io
cmds:
- mix hex.outdated
- cargo upgrade --dry-run --manifest-path {{.CARGO_MANIFEST}} --incompatible allow
compile:
desc: Compile project (builds NIF; first run takes several minutes)
cmds:
- mix compile --warnings-as-errors
test:
desc: Run fast Elixir unit tests
deps: [compile]
cmds:
- mix test --color
test:integration:
desc: End-to-end whisper.cpp transcription against the tiny.en and tiny models (~150 MB download)
deps: [compile]
cmds:
- mix test --include integration --color
test:rust:
desc: Run Rust-side unit tests
cmds:
- cargo test --manifest-path {{.CARGO_MANIFEST}}
fmt:
desc: Format Elixir and Rust sources in place
cmds:
- mix format
- cargo fmt --manifest-path {{.CARGO_MANIFEST}}
fix:
desc: Auto-fix formatting and clippy lints in place
cmds:
- mix format
- cargo fmt --manifest-path {{.CARGO_MANIFEST}}
- cargo clippy --manifest-path {{.CARGO_MANIFEST}} --all-targets --fix --allow-dirty --allow-staged -- -D warnings
fmt:check:
desc: Verify Elixir and Rust formatting (no writes)
cmds:
- mix format --check-formatted
- cargo fmt --manifest-path {{.CARGO_MANIFEST}} -- --check
lint:
desc: Lint Elixir (credo) and Rust (clippy) with warnings treated as errors
cmds:
- mix credo --strict
- cargo clippy --manifest-path {{.CARGO_MANIFEST}} --all-targets -- -D warnings
docs:
desc: Build HexDocs into doc/
cmds:
- mix docs
hex:build:
desc: Build the Hex tarball locally without publishing (sanity check)
cmds:
- mix hex.build
build:cpu:
desc: Source-build NIF with pure CPU backend
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES= mix compile
build:cuda:
desc: Source-build NIF with NVIDIA CUDA backend
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=cuda mix compile
build:hipblas:
desc: Source-build NIF with AMD ROCm / hipBLAS backend
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=hipblas mix compile
build:vulkan:
desc: Source-build NIF with cross-vendor Vulkan backend
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=vulkan mix compile
build:metal:
desc: Source-build NIF with Apple Silicon Metal backend
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=metal mix compile
build:coreml:
desc: Source-build NIF with Apple Neural Engine (Core ML) backend
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=coreml mix compile
build:intel-sycl:
desc: Source-build NIF with Intel Arc / Xe oneAPI SYCL backend
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=intel-sycl mix compile
build:openblas:
desc: Source-build NIF with OpenBLAS CPU acceleration
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=openblas mix compile
build:openmp:
desc: Source-build NIF with OpenMP CPU multi-threading
cmds:
- WHISPER_CPP_BUILD=1 WHISPER_CPP_FEATURES=openmp mix compile
test:zizmor:
desc: Lint GitHub Actions workflows for security issues
cmds:
- zizmor --offline --persona=pedantic .github/workflows
check:
desc: Full local quality gate (Elixir + Rust)
cmds:
- task: fmt:check
- task: compile
- task: lint
- task: test
- task: test:rust
- task: test:zizmor