-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
42 lines (36 loc) · 1.11 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
.PHONY: help
help: # Shows available `make` commands
@echo 'Available `make` commands:' >/dev/stderr
@echo >/dev/stderr
@awk -F'#' '/^[a-z][A-Za-z0-9]+/ {if (NF > 1) { sub(/:[^#]*/, ""); print $$1 "\t\t" $$2}}' Makefile
.PHONY: test
test: # Runs unit and integration tests
cargo test
.PHONY: docs
docs: # Creates the API docs and opens it in the browser
cargo doc --no-deps --open
.PHONY: examples
examples:
cargo build --examples
.PHONY: build
build: # Creates a release build
cargo build --release
.PHONY: pr-prep
pr-prep: # Runs checks to ensure you're ready for a pull request
cargo fmt --all -- --check
cargo build --examples --workspace
cargo build --workspace
cargo clippy --workspace
cargo test --workspace \
-- \
--skip can_change_into_virtual_directory \
--skip creating_directory_with_file_in_it \
--skip deleting_directory_fails_if_contains_file \
--skip deleting_empty_directory_succeeds \
--skip file_sizes \
--skip newly_created_dir_is_empty
cargo test --doc --workspace
cargo doc --workspace --no-deps
.PHONY: publish
publish: # Publishes the lib to crates.io
cargo publish --verbose