-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
125 lines (104 loc) · 3.11 KB
/
Makefile
File metadata and controls
125 lines (104 loc) · 3.11 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
NIGHTLY_TOOLCHAIN := nightly-2026-01-05
.PHONY: fmt
fmt:
cargo +$(NIGHTLY_TOOLCHAIN) fmt
.PHONY: lint-toml
lint-toml: ensure-dprint
dprint fmt
ensure-dprint:
@if ! command -v dprint &> /dev/null; then \
echo "dprint not found. Please install it by running the command `cargo install --locked dprint` or refer to the following link for more information: https://github.com/dprint/dprint" \
exit 1; \
fi
.PHONY: clippy
clippy:
cargo +$(NIGHTLY_TOOLCHAIN) clippy \
--workspace \
--lib \
--examples \
--tests \
--benches \
--all-features \
-- -D warnings
.PHONY: clippy-fix
clippy-fix:
cargo +$(NIGHTLY_TOOLCHAIN) clippy \
--workspace \
--lib \
--examples \
--tests \
--benches \
--all-features \
--fix \
-- -D warnings
.PHONY: udeps
udeps:
cargo +$(NIGHTLY_TOOLCHAIN) udeps --workspace --lib --examples --tests --benches --all-features --locked
.PHONY: codespell
codespell: ensure-codespell
codespell --skip "*.json"
ensure-codespell:
@if ! command -v codespell &> /dev/null; then \
echo "codespell not found. Please install it by running the command `pip install codespell` or refer to the following link for more information: https://github.com/codespell-project/codespell" \
exit 1; \
fi
.PHONY: zepter
zepter: ensure-zepter
zepter run check
ensure-zepter:
@if ! command -v zepter &> /dev/null; then \
echo "zepter not found. Please follow the instructions for installation: https://github.com/ggwpez/zepter?tab=readme-ov-file#install" \
exit 1; \
fi
.PHONY: lint
lint: fmt lint-toml clippy udeps codespell zepter
.PHONY: test
test:
cargo +$(NIGHTLY_TOOLCHAIN) nextest run \
--workspace \
--locked \
--all-features \
--no-fail-fast \
-E 'not test(docker)'
.PHONY: test-docker
test-docker:
cargo nextest run \
--workspace \
--locked \
--all-features \
--no-fail-fast \
--no-tests=pass \
-E 'test(docker)' \
--test-threads=1 \
--failure-output immediate \
--success-output never \
--verbose
# Used to update the mainnet-sample.sql data. Provide the path to the sqlite database that should be read from
# using `DB_PATH`.
.PHONY: test-data
export-sample-test-data:
sqlite3 "$(DB_PATH)" <<EOF > mainnet-sample.sql
.headers on
.mode insert block_data
SELECT * FROM block_data LIMIT 2000;
EOF
.PHONY: docs
docs:
cargo +$(NIGHTLY_TOOLCHAIN) docs --document-private-items --exclude rollup-node-chain-orchestrator
.PHONY: pr
pr: lint test docs
.PHONY: docker
docker:
docker build -t scrolltech/rollup-node:latest . -f Dockerfile
.PHONY: docker-nightly
docker-nightly:
docker build -t scrolltech/rollup-node:latest-nightly --build-arg CARGO_FEATURES=js-tracer . -f Dockerfile
.PHONY: docker-multiarch
docker-multiarch:
docker buildx build --platform linux/amd64,linux/arm64 -t scrolltech/rollup-node:latest . -f Dockerfile
.PHONY: docker-multiarch-nightly
docker-multiarch-nightly:
docker buildx build --platform linux/amd64,linux/arm64 -t scrolltech/rollup-node:latest-nightly --build-arg CARGO_FEATURES=js-tracer . -f Dockerfile
.PHONY: docker-setup-buildx
docker-setup-buildx:
docker buildx create --name multiarch --driver docker-container --bootstrap --use || docker buildx use multiarch