-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
136 lines (106 loc) · 3.72 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
################################################################################
# Justfile #
# #
# Set of routines to execute for development work. #
# #
# To make use of this file install: https://crates.io/crates/just #
# #
################################################################################
# 'Just' Configuration
# Loads .env file for variables to be used in
# in this just file
# set dotenv-load
# Ignore recipes that are commented out
set ignore-comments := true
# Set shell for Windows OSs:
# If you have PowerShell Core installed and want to use it,
# use `pwsh.exe` instead of `powershell.exe`
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
# Set shell for non-Windows OSs:
set shell := ["bash", "-uc"]
# Runs the benchmark suite
# bench *ARGS:
# cargo +nightly bench {{ARGS}}
# Builds the library.
# build:
# cargo build --no-default-features
# cargo build --all-features
# @cargo build --all-features --example sieve
# @cargo build --all-features --example tour
# Checks the library for syntax and HIR errors.
check:
cargo check --no-default-features
cargo check --all-features
# Runs all of the recipes necessary for pre-publish.
# checkout: format check lint build doc test package
# Continually runs the development routines.
ci:
just loop dev
# Removes all build artifacts.
clean:
cargo clean
# Runs the development routines.
dev: format lint doc test
# Opens the crate documentation.
# @cargo +nightly doc --all-features {{ARGS}}
doc *ARGS:
@cargo doc --all-features --no-deps --open {{ARGS}}
# Runs the formatter on all Rust files.
format:
@cargo +nightly fmt --all
# Runs the linter.
lint: check
cargo clippy --no-default-features
cargo clippy --all-features
# Continually runs some recipe from this file.
loop action:
watchexec -w src -- "just {{action}}"
# Looks for undefined behavior in the (non-doc) test suite.
miri *ARGS:
cargo +nightly miri test --all-features -q --lib --tests {{ARGS}}
# Packages the crate in preparation for publishing on crates.io
# package:
# cargo package --allow-dirty
# Publishes the crate to crates.io
# publish: checkout
# cargo publish
# Runs the test suites.
test: check lint
cargo test --all-features
# Runs the test suites.
dtest: check lint
cargo test --doc --workspace
# Runs the whole test suite with nextest.
ntest:
cargo nextest run --all-features --workspace
# Runs only the ignored tests with nextest.
nitest:
cargo nextest run --all-features --workspace -- --ignored
# Runs a test defined by an expression with nextest.
# e.g. `just ntest completions` => test completions
natest *ARGS:
cargo nextest run --all-features --workspace -E 'test({{ARGS}})'
# Runs a test to check if the public api of organize-rs_core
# has been changed
#
# updating the public API files for each platform works
# by setting the environment variable `UPDATE_EXPECT=1`
tpa:
cargo test --test public_api -p organize-rs_core -- --ignored
# Generate code coverage report
# install needed dependencies with:
# `cargo xtask install-deps`
coverage:
cargo xtask coverage -w
# list the inverse dependencies
# as in which feature enables a given crate
inv-ft *ARGS:
cargo tree -e features -i {{ARGS}}
# Checks the public api against the latest pubished version
pa:
cargo public-api diff latest
# Run a sample script
run:
cargo run -- run-script --path C:\Users\dailyuse\dev-src\organize\scripts\test.rhai
fmt: format
dprint fmt