Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
118 lines (99 loc) · 3.27 KB
/
Copy pathTaskfile.yml
File metadata and controls
118 lines (99 loc) · 3.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
version: "3"
# Cargo manifest lives next to the Rust crate, not in the repo root.
vars:
CARGO_MANIFEST: native/exmpeg_native/Cargo.toml
# Local builds compile the NIF from source; only Hex consumers fetch a
# precompiled artefact.
env:
EXMPEG_BUILD: "1"
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 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 probe / transcode tests against a generated synthetic clip
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
test:zizmor:
desc: Lint GitHub Actions workflows for security issues
cmds:
- zizmor --offline --persona=pedantic .github/workflows
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
checksum:download:
desc: Download every prebuilt NIF artefact for the current @version from
its GitHub release and write `checksum-Elixir.Exmpeg.Native.exs`. Run
this after the release workflow has finished publishing the tarballs
and before `task release:publish`.
cmds:
- mix rustler_precompiled.download Exmpeg.Native --all --print
release:publish:
desc: Build and publish the Hex package. Requires the checksum file to be
up to date (run `task checksum:download` first) and a logged-in
`mix hex.user`.
cmds:
- mix deps.get
- mix hex.build
- mix hex.publish
check:
desc: Full local quality gate (Elixir + Rust)
cmds:
- task: fmt:check
- task: compile
- task: lint
- task: test
- task: test:rust
- task: test:zizmor