-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathjustfile
More file actions
72 lines (52 loc) · 2.09 KB
/
justfile
File metadata and controls
72 lines (52 loc) · 2.09 KB
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
_default:
just --list
build-minimal:
#!/bin/bash
# Generate a lockfile with minimal versions and build it
cargo +nightly generate-lockfile -Z minimal-versions && cargo build
for crate in $(tools/list.sh); do
echo "Building $crate..."
cargo build -p $crate
done
test:
# Test all features
cargo test --workspace --all-features
# Check no default features
cargo check --no-default-features --workspace
# Check `fs` feature (gel-tokio)
cargo check --features=fs --package gel-tokio
# Check with env feature, gel-tokio
cargo check --features=env --package gel-tokio
# Test gel-protocol without default features
cargo test --package=gel-protocol --no-default-features
# Test gel-protocol with "all-types" feature
cargo test --package=gel-protocol --features=all-types
cargo clippy --workspace --all-features --all-targets
test-fast:
cargo test --workspace --features=unstable
cargo clippy --workspace --all-features --all-targets
check:
#!/bin/bash
set -euo pipefail
cargo check --workspace --all-features --all-targets
cargo check --workspace --no-default-features --all-targets
# Check all crates in the workspace
CRATES=`cargo tree --workspace --depth 1 --prefix none | grep "gel-" | cut -d ' ' -f 1 | sort | uniq`
for crate in $(tools/list.sh); do
echo "Checking $crate..."
# TODO: this doesn't currently pass because we've got some crates that fail to check
cargo check --quiet --package $crate --no-default-features || echo "Failed to check $crate with no default features"
cargo check --quiet --package $crate --no-default-features --all-targets
done
cargo fmt --check
echo "Checked all crates."
check-fast:
cargo check --workspace --all-features --all-targets
cargo fmt --check
fix:
cargo clippy --fix --allow-dirty --allow-staged --locked --release --all-features --all-targets -- -D clippy::all
cargo fmt
submodule-update:
git submodule update --init --recursive --remote
publish:
tools/publish.sh gel-tokio