-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
151 lines (116 loc) · 3.69 KB
/
Justfile
File metadata and controls
151 lines (116 loc) · 3.69 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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Default recipe to display help
default:
@just --list
# Format all code
format:
rumdl fmt .
taplo fmt
cargo +nightly fmt --all
# Auto-fix linting issues
fix:
rumdl check --fix .
just fix-openssl
just fix-boring
fix-openssl:
cargo +nightly clippy --fix --workspace --no-default-features --features backend-openssl --allow-dirty
fix-boring:
cargo +nightly clippy --fix --workspace --no-default-features --features backend-boring --allow-dirty
# Run all lints
lint:
typos
rumdl check .
taplo fmt --check
cargo +nightly fmt --all -- --check
just lint-openssl
just lint-boring
cargo machete
lint-openssl:
cargo +nightly clippy --workspace --no-default-features --features backend-openssl -- -D warnings
lint-boring:
cargo +nightly clippy --workspace --no-default-features --features backend-boring -- -D warnings
check-openssl:
cargo check --workspace --all-targets --no-default-features --features backend-openssl
check-boring:
cargo check --workspace --all-targets --no-default-features --features backend-boring
# Check all targets compile
check:
just check-openssl
just check-boring
build-openssl:
cargo build --workspace --no-default-features --features backend-openssl
check-feature:
cargo hack check \
--feature-powerset \
--depth 1 \
--no-dev-deps \
--exclude-no-default-features \
--exclude-all-features \
--exclude-features internal-bdd \
--mutually-exclusive-features backend-openssl,backend-boring
build-boring:
cargo build --workspace --no-default-features --features backend-boring
example-openssl:
cargo build --manifest-path examples/consumer-app/Cargo.toml --no-default-features --features backend-openssl
example-boring:
cargo build --manifest-path examples/consumer-app/Cargo.toml --no-default-features --features backend-boring
examples:
just example-openssl
just example-boring
# Build entire workspace
build:
just build-openssl
just build-boring
test-openssl:
cargo test --workspace --no-default-features --features backend-openssl
test-boring:
cargo test --workspace --no-default-features --features backend-boring
# Run tests
test:
just test-openssl
just test-boring
bdd-openssl:
cargo test -p openssl --test bdd --no-default-features --features backend-openssl,internal-bdd
bdd-boring:
cargo test -p openssl --test bdd --no-default-features --features backend-boring,internal-bdd
# Run BDD scenarios
bdd:
just bdd-openssl
just bdd-boring
# Run both TDD and BDD suites
test-all:
just test
just bdd
test-coverage-openssl:
cargo tarpaulin --workspace --no-default-features --features backend-openssl --timeout 300
test-coverage-boring:
cargo tarpaulin --workspace --no-default-features --features backend-boring --timeout 300
# Run tests with coverage
test-coverage:
just test-coverage-openssl
just test-coverage-boring
# Crates.io publishing is intentionally unsupported for this repository
publish-check:
@echo "crates.io publishing is intentionally unsupported for compat-openssl" >&2; exit 1
# Crates.io publishing is intentionally unsupported for this repository
publish:
@echo "crates.io publishing is intentionally unsupported for compat-openssl" >&2; exit 1
# Check for Chinese characters
check-cn:
rg --line-number --column "\p{Han}"
# Full CI check
ci: lint test-all build examples
# ============================================================
# Maintenance & Tools
# ============================================================
# Clean build artifacts
clean:
cargo clean
# Install all required development tools
setup:
cargo install cargo-machete
cargo install rumdl
cargo install taplo-cli
cargo install typos-cli
# Generate documentation for the workspace
docs:
cargo doc --no-deps --open