forked from mdaffin/loopdev
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
60 lines (48 loc) · 1.25 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
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
clippy:
cargo clippy ${CLIPPY_OPTS}
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}
COMPARE_FEDORA_VERSIONS ?=
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}
yamllint:
yamllint --strict .github/workflows/*.yml
fmt:
cargo fmt
fmt-ci:
cargo fmt --all -- --check
audit:
cargo audit -D warnings
build:
cargo build
.PHONY:
audit
build
check-fedora-versions
clippy
fmt
fmt-ci
test-compare-fedora-versions
yamllint