forked from fastly/Viceroy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (53 loc) · 1.47 KB
/
Makefile
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
.PHONY: format
format:
cargo fmt
.PHONY: format-check
format-check:
cargo fmt -- --check
.PHONY: clippy
clippy:
cargo clippy --all -- -D warnings
.PHONY: test
test: test-crates trap-test
.PHONY: test-crates
test-crates: fix-build
cargo test --all --locked
.PHONY: fix-build
fix-build:
cd test-fixtures && cargo build --target=wasm32-wasi --locked
.PHONY: trap-test
trap-test: fix-build
cd cli/tests/trap-test && cargo test fatal_error_traps --locked -- --nocapture
.PHONY: ci
ci: format-check clippy test
.PHONY: clean
clean:
cargo clean
cd cli/tests/trap-test/ && cargo clean
# Open the documentation for the workspace in a browser.
.PHONY: doc
doc:
cargo doc --workspace --open
# Open the documentation for the workspace in a browser.
#
# Note: This includes private items, which can be useful for development.
.PHONY: doc-dev
doc-dev:
cargo doc --no-deps --document-private-items --workspace --open
# Run `cargo generate-lockfile` for all of the crates in the project.
.PHONY: generate-lockfile
generate-lockfile:
cargo generate-lockfile
cargo generate-lockfile --manifest-path=test-fixtures/Cargo.toml
cargo generate-lockfile --manifest-path=cli/tests/trap-test/Cargo.toml
# Check that the crates can be packaged for crates.io.
#
# FIXME(katie): Add option flags to `publish.rs` for the vendor directory, remove `.cargo/` after
# running.
.PHONY: package-check
package-check:
rustc scripts/publish.rs
./publish verify
rm publish
rm -rf .cargo/
rm -rf verify-publishable/