-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
106 lines (78 loc) · 2.62 KB
/
Justfile
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
all: build test xtests
all-release: build-release test-release xtests-release
export HEXIT_DEBUG := ""
#----------#
# building #
#----------#
# compile the hexit binary
@build:
cargo build
# compile the hexit binary (in release mode)
@build-release:
cargo build --release --verbose
# produce an HTML chart of compilation timings
@build-time:
cargo +nightly clean
cargo +nightly build -Z timings
#---------------#
# running tests #
#---------------#
# run tests
@test:
cargo test --workspace -- --quiet
# run tests (in release mode)
@test-release:
cargo test --workspace --release --verbose
# run mutation tests
@test-mutation:
cargo +nightly test --package hexit-lang --features=hexit-lang/with_mutagen -- --quiet
cargo +nightly mutagen --package hexit-lang --features=hexit-lang/with_mutagen
#------------------------#
# running extended tests #
#------------------------#
# run extended integration tests
@xtests:
specsheet xtests/*.toml -O cmd.target.hexit="${CARGO_TARGET_DIR:-../target}/debug/hexit" -shide
# run extended integration tests (in release mode)
@xtests-release:
specsheet xtests/*.toml -O cmd.target.hexit="${CARGO_TARGET_DIR:-../target}/release/hexit"
#-----------------------#
# code quality and misc #
#-----------------------#
# lint the code
@clippy:
cargo clippy
# generate a code coverage report using tarpaulin via docker
@coverage-docker:
docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin cargo tarpaulin --workspace --out Html
# update dependency versions, and check for outdated ones
@update-deps:
cargo update
just fuzz/update-deps
command -v cargo-outdated >/dev/null || (echo "cargo-outdated not installed" && exit 1)
cargo outdated
# list unused dependencies
@unused-deps:
command -v cargo-udeps >/dev/null || (echo "cargo-udeps not installed" && exit 1)
cargo +nightly udeps
# print versions of the necessary build tools
@versions:
rustc --version
cargo --version
#---------------#
# documentation #
#---------------#
# render the documentation
@doc:
cargo doc --no-deps --workspace
# build the man pages
@man:
mkdir -p "${CARGO_TARGET_DIR:-target}/man"
pandoc --standalone -f markdown -t man man/hexit.1.md > "${CARGO_TARGET_DIR:-target}/man/hexit.1"
pandoc --standalone -f markdown -t man man/hexit.5.md > "${CARGO_TARGET_DIR:-target}/man/hexit.5"
# build and preview the main man page (hexit.1)
@man-1-preview: man
man "${CARGO_TARGET_DIR:-target}/man/hexit.1"
# build and preview the syntax man page (hexit.5)
@man-5-preview: man
man "${CARGO_TARGET_DIR:-target}/man/hexit.5"