Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
139 lines (105 loc) · 5.34 KB
/
Copy pathMakefile
File metadata and controls
139 lines (105 loc) · 5.34 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
.DEFAULT_GOAL := help
CARGO ?= cargo
MDBOOK ?= mdbook
.PHONY: bench-compare unused-deps admin dev-up dev-down bench test-scripts bench-enforce conformance book book-serve book-test build check ci clean doc doc-open fixtures fmt fmt-check fuzz fuzz-check install-doc-tools lint serve demo site test deny
help: ## Show the available targets
@printf '%s\n' \
'bench Measure the performance budgets (generates a 60-minute asset on first run)' \
'bench-enforce Like bench, but fail when a budget is missed' \
'bench-compare Compare segmentor with nginx-vod-module (needs Docker)' \
'conformance Run the black-box HLS/DASH conformance suite' \
'test-scripts Test the release automation scripts and install.sh' \
'book Build the mdBook documentation' \
'book-serve Build, serve, and watch the documentation' \
'book-test Test Rust examples in the book' \
'build Build the crate' \
'check Type-check the crate' \
'ci Run every CI check' \
'clean Remove generated artifacts' \
'doc Build rustdoc documentation' \
'doc-open Build and open rustdoc documentation' \
'fixtures Regenerate media test fixtures with FFmpeg' \
'fixtures-long Generate a ~2-minute asset for manually testing seeking and scrubbing' \
'fmt Format Rust sources' \
'fmt-check Verify Rust formatting' \
'fuzz Run media pipeline fuzzing with nightly' \
'fuzz-check Compile the fuzz target on stable' \
'install-doc-tools Install mdBook and Mermaid support' \
'lint Run Clippy with warnings denied' \
'serve Run the example HLS service' \
'demo Serve the web player demo on http://127.0.0.1:8080' \
'admin Serve the control panel on http://127.0.0.1:8081' \
'dev-up Run segmentor, an example mapper, and both web pages in Docker Compose' \
'dev-down Stop and remove the docker-compose.dev.yml stack' \
'unused-deps Fail on dependencies that nothing uses (needs cargo-machete)' \
'deny Check dependencies for advisories and licences (needs cargo-deny)' \
'site Build mdBook with rustdoc under /api' \
'test Run unit and integration tests'
test-scripts: ## Test the release automation scripts and install.sh
.github/scripts/test.sh
.github/scripts/test-install.sh
bench-compare: ## Compare segmentor with nginx-vod-module (needs Docker)
bench/compare/run.sh
bench: ## Measure the performance budgets
$(CARGO) bench --bench budgets
bench-enforce: ## Measure the performance budgets and fail on a miss
$(CARGO) bench --bench budgets -- --enforce
conformance: ## Run the black-box HLS/DASH conformance suite
$(CARGO) test --test conformance
book: ## Build the mdBook documentation
$(MDBOOK) build
book-serve: ## Build, serve, and watch the documentation
$(MDBOOK) serve --open
book-test: ## Test Rust examples in the book
$(MDBOOK) test
build: ## Build the crate
$(CARGO) build --all-features --all-targets
check: ## Type-check the crate
$(CARGO) check --all-features --all-targets
fmt: ## Format Rust sources
$(CARGO) fmt --all
fmt-check: ## Verify Rust formatting
$(CARGO) fmt --all -- --check
fuzz-check: ## Compile the fuzz target on stable
$(CARGO) check --manifest-path fuzz/Cargo.toml
fuzz: ## Run media pipeline fuzzing with nightly
mkdir -p fuzz/corpus/media-pipeline
cp tests/fixtures/*.mp4 fuzz/corpus/media-pipeline/
$(CARGO) +nightly fuzz run media-pipeline fuzz/corpus/media-pipeline
lint: ## Run Clippy with warnings denied (dead code, unused imports, and the lints in Cargo.toml)
$(CARGO) clippy --all-features --all-targets -- -D warnings
unused-deps: ## Fail on dependencies nothing uses (needs `cargo install cargo-machete --locked`)
cargo machete
test: ## Run unit and integration tests
$(CARGO) test --all-features --all-targets
doc: ## Build rustdoc documentation
RUSTDOCFLAGS="-D warnings" $(CARGO) doc --all-features --no-deps
doc-open: ## Build and open rustdoc documentation
RUSTDOCFLAGS="-D warnings" $(CARGO) doc --all-features --no-deps --open
fixtures: ## Regenerate media test fixtures with FFmpeg
sh tests/fixtures/generate.sh
sh tests/fixtures/generate-variants.sh
sh tests/fixtures/generate-renditions.sh
fixtures-long: ## Generate a ~2-minute asset for manually testing seeking and scrubbing
sh tests/fixtures/generate-long.sh
site: book doc ## Build mdBook with rustdoc under /api
rm -rf target/book/api
cp -R target/doc target/book/api
install-doc-tools: ## Install mdBook and Mermaid support
$(CARGO) install mdbook --version 0.5.4 --locked
$(CARGO) install mdbook-mermaid --version 0.17.1 --locked
serve: ## Run the example HLS service
$(CARGO) run -- serve --config vod.example.toml
demo: ## Serve the web player demo on http://127.0.0.1:8080
python3 -m http.server 8080 --bind 127.0.0.1 --directory demo
admin: ## Serve the control panel (cache, resolver, and metrics) on http://127.0.0.1:8081
python3 -m http.server 8081 --bind 127.0.0.1 --directory admin
dev-up: ## Run segmentor, an example mapper, and both web pages in Docker Compose
docker compose -f docker-compose.dev.yml up --build
dev-down: ## Stop and remove the docker-compose.dev.yml stack
docker compose -f docker-compose.dev.yml down
deny: ## Check dependencies against deny.toml (needs `cargo install cargo-deny --locked`)
cargo deny check
ci: fmt-check check lint test test-scripts fuzz-check doc ## Run every CI check
clean: ## Remove generated artifacts
$(CARGO) clean