-
Notifications
You must be signed in to change notification settings - Fork 588
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (48 loc) · 1.8 KB
/
Makefile
File metadata and controls
59 lines (48 loc) · 1.8 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
#
# This Makefile exists largely to help ensure that some of the common behaviors
# between CI and local development can be consistently replicated
#
# For the most part you should be able to rely on cargo for development.
.DEFAULT_GOAL := help
DAT_VERSION := 0.0.3
DEFAULT_FEATURES := "integration_test,azure,datafusion,s3,gcs,glue,hdfs"
## begin dat related
####################
.PHONY: setup-dat
setup-dat: dat/v$(DAT_VERSION) ## Download and setup the Delta Acceptance Tests (dat)
dat:
mkdir -p dat
dat/v$(DAT_VERSION): dat ## Download DAT test files into ./dat
curl -L --silent --output dat/deltalake-dat-v$(DAT_VERSION).tar.gz \
https://github.com/delta-incubator/dat/releases/download/v$(DAT_VERSION)/deltalake-dat-v$(DAT_VERSION).tar.gz
tar --no-same-permissions -xzf dat/deltalake-dat-v$(DAT_VERSION).tar.gz
mv out dat/v$(DAT_VERSION)
rm dat/deltalake-dat-v$(DAT_VERSION).tar.gz
####################
## end dat related
.PHONY: coverage
coverage: setup-dat ## Run Rust tests with code-coverage
cargo llvm-cov --features $(DEFAULT_FEATURES) --workspace \
--lcov \
--output-path target/lcov.info \
-- \
--skip read_table_version_hdfs \
--skip test_read_tables_hdfs \
--skip test_read_tables_lakefs
genhtml -o target/coverage \
-q \
-t "delta-rs coverage" \
--header-title "delta-rs coverage report" \
target/lcov.info
.PHONY: check
check: ## Run basic cargo formatting and other checks (no tests)
cargo fmt -- --check
cargo clippy --features azure,datafusion,s3,gcs,glue,hdfs --tests
$(MAKE) -C python $@
.PHONY: clean
clean: ## Remove temporary and downloaded artifacts
rm -rf dat
cargo clean
.PHONY: help
help: ## Produce the helpful command listing
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'