-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathMakefile
More file actions
132 lines (101 loc) · 3.01 KB
/
Copy pathMakefile
File metadata and controls
132 lines (101 loc) · 3.01 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
COMPOSE := docker compose -f test/cluster/docker-compose.yml
RUSTFLAGS := ${RUSTFLAGS} --cfg scylla_unstable
export RUSTFLAGS
.PHONY: all
all: test
.PHONY: static
static: fmt-check check check-without-features check-without-unstable check-without-unstable-and-features check-all-features clippy clippy-all-features check-book-tests check-rustdoc-leaks check-cql-imports
.PHONY: ci
ci: static test
.PHONY: dockerized-ci
dockerized-ci: static dockerized-test
.PHONY: fmt
fmt:
cargo fmt --all
.PHONY: fmt-check
fmt-check:
cargo fmt --all -- --check
.PHONY: check
check:
cargo check --all-targets
.PHONY: check-without-features
check-without-features:
# If we pass --all-targets here, feature unification turns on some features anyway,
# so we only check the main target.
cargo check -p scylla
.PHONY: check-without-unstable
check-without-unstable:
RUSTFLAGS="" cargo check -p scylla --all-targets
.PHONY: check-without-unstable-and-features
check-without-unstable-and-features:
# If we pass --all-targets here, feature unification turns on some features anyway,
# so we only check the main target.
RUSTFLAGS="" cargo check -p scylla
.PHONY: check-all-features
check-all-features:
cargo check --all-targets --all-features
.PHONY: clippy
clippy:
RUSTFLAGS="${RUSTFLAGS} -Dwarnings" cargo clippy --all-targets
.PHONY: clippy-all-features
clippy-all-features:
RUSTFLAGS="${RUSTFLAGS} -Dwarnings" cargo clippy --all-targets --all-features
.PHONY: check-cql-imports
check-cql-imports:
./scripts/check-cql-imports.sh
.PHONY: check-rustdoc-leaks
check-rustdoc-leaks:
RUSTDOCFLAGS="-Zunstable-options" cargo +nightly rustdoc -p scylla -- --output-format json
python3 ./scripts/check-rustdoc-cql-leaks.py target/doc/scylla.json
.PHONY: test
test: up
# We need to run doctests separately, because nextest doesn't support them :(
# https://github.com/nextest-rs/nextest/issues/16
cargo test --doc --all-features
cargo nextest run --all-features
.PHONY: ccm-test
ccm-test:
cargo nextest run --all-features -E 'test(ccm::)' --ignore-default-filter --status-level pass
.PHONY: dockerized-test
dockerized-test: up
test/dockerized/run.sh
.PHONY: build
build:
cargo build --examples --benches
.PHONY: docs
docs:
mdbook build docs
.PHONY: check-book-tests
check-book-tests:
cargo run -p generate_book_tests -- --check
.PHONY: regenerate-book-tests
regenerate-book-tests:
cargo run -p generate_book_tests
.PHONY: semver-rev
semver-rev:
./scripts/semver-checks.sh $(if $(rev),--baseline-rev $(rev),--baseline-rev main)
.PHONY: semver-version
semver-version:
./scripts/semver-checks.sh $(if $(version),--baseline-version $(version),)
.PHONY: up
up:
$(COMPOSE) up -d --wait
@echo
@echo "ScyllaDB cluster is running in the background. Use 'make down' to stop it."
@echo
.PHONY: down
down:
$(COMPOSE) down --remove-orphans
.PHONY: logs
logs:
$(COMPOSE) logs -f
.PHONY: cqlsh
cqlsh:
$(COMPOSE) exec scylla1 cqlsh -u cassandra -p cassandra
.PHONY: shell
shell:
$(COMPOSE) exec scylla1 bash
.PHONY: clean
clean: down
cargo clean
rm -rf docs/book