Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
96 lines (80 loc) · 2.54 KB
/
Copy pathTaskfile.yml
File metadata and controls
96 lines (80 loc) · 2.54 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
version: "3"
# Cargo manifest lives next to the Rust crate, not in the repo root.
vars:
CARGO_MANIFEST: native/whisper_ct2_native/Cargo.toml
tasks:
setup:
desc: Install Elixir deps
cmds:
- mix deps.get
upgrade:
desc: Bump Elixir + Rust deps to latest compatible (within mix.exs / Cargo.toml constraints)
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 ~10 min)
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 transcription against the tiny model (~75 MB download on first run)
deps: [compile]
cmds:
- mix test --include integration --color
test:rust:
desc: Run Rust-side unit tests
cmds:
- cargo test --manifest-path {{.CARGO_MANIFEST}}
test:zizmor:
desc: Lint GitHub Actions workflows for security issues
cmds:
- zizmor --offline --persona=pedantic .github/workflows
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
check:
desc: Full local quality gate (Elixir + Rust)
cmds:
- task: fmt:check
- task: compile
- task: lint
- task: test
- task: test:rust
- task: test:zizmor