-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
87 lines (68 loc) · 1.77 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ifeq ($(origin FEDORA_RELEASE), undefined)
else
FEDORA_RELEASE_ARGS = --release=${FEDORA_RELEASE}
endif
ifeq ($(origin MANIFEST_PATH), undefined)
else
MANIFEST_PATH_ARGS = --manifest-path=${MANIFEST_PATH}
endif
ifeq ($(origin CLIPPY_FIX), undefined)
CLIPPY_OPTS = --all-targets --no-deps
else
CLIPPY_OPTS = --fix
endif
IGNORE_ARGS ?=
audit:
cargo audit -D warnings
check-typos:
typos
SET_LOWER_BOUNDS ?=
test-set-lower-bounds:
echo "Testing that SET_LOWER_BOUNDS environment variable is set to a valid path"
test -e "${SET_LOWER_BOUNDS}"
verify-dependency-bounds: test-set-lower-bounds
cargo build ${MANIFEST_PATH_ARGS}
${SET_LOWER_BOUNDS} ${MANIFEST_PATH_ARGS}
cargo build ${MANIFEST_PATH_ARGS}
test-compare-fedora-versions:
echo "Testing that COMPARE_FEDORA_VERSIONS environment variable is set to a valid path"
test -e "${COMPARE_FEDORA_VERSIONS}"
check-fedora-versions: test-compare-fedora-versions
${COMPARE_FEDORA_VERSIONS} ${MANIFEST_PATH_ARGS} ${FEDORA_RELEASE_ARGS} ${IGNORE_ARGS}
fmt:
cargo fmt
cd devicemapper-rs-sys && cargo fmt
fmt-ci:
cargo fmt -- --check
cd devicemapper-rs-sys && cargo fmt -- --check
build:
cargo build
build-tests:
cargo test --no-run
test:
RUST_BACKTRACE=1 cargo test -- --skip sudo_ --skip loop_
sudo_test:
RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER='sudo -E' cargo test
clippy:
cargo clippy --all-features ${CLIPPY_OPTS}
(cd devicemapper-rs-sys && cargo clippy --all-features ${CLIPPY_OPTS})
docs:
cargo doc --no-deps
yamllint:
yamllint --strict .github/workflows/*.yml
.PHONY:
audit
build
check-fedora-versions
check-fedora-versions-sys
check-typos
clippy
docs
fmt
fmt-ci
sudo_test
test
test-compare-fedora-versions
test-set-lower-bounds
verify-dependency-bounds
yamllint