summaryrefslogtreecommitdiffstats
path: root/Justfile
diff options
context:
space:
mode:
authorBenjamin Sago <ogham@bsago.me>2021-04-01 09:39:03 +0100
committerBenjamin Sago <ogham@bsago.me>2021-04-01 09:39:03 +0100
commit5d13a65e4f5e8bf2b40e6393568c2397d443fb91 (patch)
tree81a2aa3297351e969700851782496ee571007756 /Justfile
parentc1435411c34fc936f735a75501d8771e3d336239 (diff)
Justfile improvements
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile76
1 files changed, 53 insertions, 23 deletions
diff --git a/Justfile b/Justfile
index 32d4da5..3c62a73 100644
--- a/Justfile
+++ b/Justfile
@@ -1,74 +1,104 @@
-all: build test xtests
-all-release: build-release test-release xtests-release
+all: build test
+all-release: build-release test-release
-# compiles the exa binary
+#----------#
+# building #
+#----------#
+
+# compile the exa binary
@build:
cargo build
-# compiles the exa binary (in release mode)
+# compile the exa binary (in release mode)
@build-release:
cargo build --release --verbose
-# compiles the exa binary with every combination of feature flags
-@build-features:
- cargo hack build --feature-powerset
+# produce an HTML chart of compilation timings
+@build-time:
+ cargo +nightly clean
+ cargo +nightly build -Z timings
+
+# check that the exa binary can compile
+@check:
+ cargo check
-# runs unit tests
+#---------------#
+# running tests #
+#---------------#
+
+# run unit tests
@test:
- cargo test --all -- --quiet
+ cargo test --workspace -- --quiet
-# runs unit tests (in release mode)
+# run unit tests (in release mode)
@test-release:
- cargo test --release --all --verbose
+ cargo test --workspace --release --verbose
-# runs unit tests with every combination of feature flags
-@test-features:
- cargo hack test --feature-powerset -- --quiet
+#------------------------#
+# running extended tests #
+#------------------------#
-# runs extended tests
+# run extended tests
@xtests:
xtests/run.sh
-# runs extended tests (using the release mode exa)
+# run extended tests (using the release mode exa)
@xtests-release:
xtests/run.sh --release
+# display the number of extended tests that get run
+@count-xtests:
+ grep -F '[[cmd]]' -R xtests | wc -l
+
-# lints the code
+#-----------------------#
+# code quality and misc #
+#-----------------------#
+
+# lint the code
@clippy:
touch src/main.rs
cargo clippy
-# updates dependency versions, and checks for outdated ones
+# update dependency versions, and checks for outdated ones
@update-deps:
cargo update
command -v cargo-outdated >/dev/null || (echo "cargo-outdated not installed" && exit 1)
cargo outdated
-# lists unused dependencies
+# list unused dependencies
@unused-deps:
command -v cargo-udeps >/dev/null || (echo "cargo-udeps not installed" && exit 1)
cargo +nightly udeps
-# prints versions of the necessary build tools
+# check that every combination of feature flags is successful
+@check-features:
+ command -v cargo-hack >/dev/null || (echo "cargo-hack not installed" && exit 1)
+ cargo hack check --feature-powerset
+
+# print versions of the necessary build tools
@versions:
rustc --version
cargo --version
-# builds the man pages
+#---------------#
+# documentation #
+#---------------#
+
+# build the man pages
@man:
mkdir -p "${CARGO_TARGET_DIR:-target}/man"
pandoc --standalone -f markdown -t man man/exa.1.md > "${CARGO_TARGET_DIR:-target}/man/exa.1"
pandoc --standalone -f markdown -t man man/exa_colors.5.md > "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"
-# builds and previews the main man page (exa.1)
+# build and preview the main man page (exa.1)
@man-1-preview: man
man "${CARGO_TARGET_DIR:-target}/man/exa.1"
-# builds and previews the colour configuration man page (exa_colors.5)
+# build and preview the colour configuration man page (exa_colors.5)
@man-5-preview: man
man "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"