-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
97 lines (70 loc) · 2.24 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
set export
export RUSTDOCFLAGS := '-D warnings'
####################
###BUILD COMMANDS###
####################
build *ARGS:
cargo build {{ARGS}}
build_release *ARGS:
cargo build --release --workspace --all-targets {{ARGS}}
build_docker:
docker build . -f ./docker/timeboost.Dockerfile -t timeboost:latest
####################
###CHECK COMMANDS###
####################
clippy:
cargo clippy --workspace --lib --tests --benches -- -D warnings
check:
cargo check --all
check-individually:
@for pkg in $(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name'); do \
echo "Checking $pkg"; \
cargo check -p $pkg || exit 1; \
done
fmt:
cargo fmt --all
fmt_check:
cargo fmt --check
lint: clippy fmt_check
fix:
cargo fix --allow-dirty --allow-staged
ci_local:
just build && just lint && just test_ci --release && just run_demo && just run_sailfish_demo && just build_docker
bacon: clippy check fmt
####################
####RUN COMMANDS####
####################
run_integration: build_docker
-docker network create --subnet=172.20.0.0/16 timeboost
docker compose -f docker-compose.yml -f docker-compose.metrics.yml up -d
stop_integration:
docker compose -f docker-compose.yml -f docker-compose.metrics.yml down
run_monitoring:
-docker network create --subnet=172.20.0.0/16 timeboost
docker compose -f docker-compose.metrics.yml up -d
stop_monitoring:
docker compose -f docker-compose.metrics.yml down
run_integration_local *ARGS:
./scripts/run-local-integration {{ARGS}}
run_demo *ARGS:
./scripts/run-timeboost-demo {{ARGS}}
run_sailfish_demo *ARGS:
./scripts/run-sailfish-demo {{ARGS}}
run *ARGS:
cargo run {{ARGS}}
bench *ARGS:
cargo bench --benches {{ARGS}} -- --nocapture
####################
####TEST COMMANDS###
####################
test *ARGS:
cargo nextest run {{ARGS}}
@if [ "{{ARGS}}" == "" ]; then cargo test --doc; fi
test_ci *ARGS:
RUST_LOG=sailfish=debug,tests=debug cargo nextest run --workspace --retries 3 {{ARGS}}
RUST_LOG=sailfish=debug,tests=debug cargo test --doc {{ARGS}}
test-individually:
@for pkg in $(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name'); do \
echo "Testing $pkg"; \
cargo nextest run --no-tests=pass -p $pkg || exit 1; \
done