-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
151 lines (118 loc) Β· 3.43 KB
/
Makefile
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
export
WARP_EXE=warp
all: setup.local build test
.PHONY: clean
clean:
cargo clean
.PHONY: build
build:
cargo build
build.ci:
cargo build --target $(TARGET)
build.mac.m1:
cargo build --target aarch64-apple-darwin
build.mac.intel:
cargo build --target x86_64-apple-darwin
build.linux.arm:
CC=aarch64-linux-gnu-gcc cargo build --target aarch64-unknown-linux-gnu
build.linux.intel:
CC=x86_64-linux-gnu-gcc cargo build --target x86_64-unknown-linux-gnu
.PHONY: build
bench:
cargo criterion
.PHONY: release
release: release.mac.intel release.mac.m1 release.linux.intel release.linux.arm
release.ci:
cargo build --release -p warp-cli
tar czf release.tar.gz -C ./target/release $(WARP_EXE)
release.mac.m1:
cargo build --release --target aarch64-apple-darwin
tar czf dist/warp-aarch64-apple-darwin.tar.gz -C ./target/aarch64-apple-darwin/release $(WARP_EXE)
release.mac.intel:
cargo build --release --target x86_64-apple-darwin
tar czf dist/warp-x86_64-apple-darwin.tar.gz -C ./target/x86_64-apple-darwin/release $(WARP_EXE)
release.linux.intel:
CC=x86_64-unknown-linux-gnu-gcc cargo build --release --target x86_64-unknown-linux-gnu
tar czf dist/warp-x86_64-unknown-linux-gnu.tar.gz -C ./target/x86_64-unknown-linux-gnu/release $(WARP_EXE)
release.linux.arm:
CC=aarch64-unknown-linux-gnu-gcc cargo build --release --target aarch64-unknown-linux-gnu
tar czf dist/warp-aarch64-unknown-linux-gnu.tar.gz -C ./target/aarch64-unknown-linux-gnu/release $(WARP_EXE)
.PHONY: install
install:
cargo install --debug --path cli --offline
install.linux.arm:
CC=aarch64-linux-gnu-gcc cargo install --debug --path cli --target aarch64-unknown-linux-gnu
install.linux.intel:
CC=x86_64-linux-gnu-gcc cargo install --debug --path cli --target x86_64-unknown-linux-gnu
.PHONY: install.release
install.release:
cargo install --path cli
.PHONY: check
check:
taplo format --check
cargo fmt --check -- \
--config unstable_features=true \
--config imports_granularity="Module" \
--config normalize_doc_attributes=true \
--config space_after_colon=true
deno fmt --check
mix format --check-formatted
.PHONY: fmt
fmt:
taplo fmt
cargo clippy --fix --allow-dirty --allow-staged
cargo fix --allow-dirty --allow-staged
cargo fmt -- \
--config unstable_features=true \
--config imports_granularity="Module" \
--config normalize_doc_attributes=true \
--config space_after_colon=true
deno fmt
mix format
.PHONY: setup
setup:
rustup default stable
cargo install --force \
cargo-strip \
taplo-cli
.PHONY: setup.local
setup.local: setup
cargo install --force \
hyperfine \
cargo-insta \
mdbook \
flamegraph \
miri \
cargo-asm \
cargo-criterion
./rules/tools/link-to-warp-home
.PHONY: test
test: test.tricorder test.unit test.conc test.beam
.PHONY: test.beam
test.beam:
cd tricorders/beam \
&& ./bootstrap.sh \
&& mix deps.get \
&& mix test
.PHONY: test.tricorder
test.tricorder:
cargo build --package warp-tricorder-test \
&& cp target/debug/test-tricorder ./core/tests/test_tricorder \
&& cd ./core/tests/test_tricorder \
&& tar czf package.tar.gz test-tricorder Manifest.json
.PHONY: test.unit
test.unit:
cargo test
.PHONY: test.conc
test.conc:
RUSTFLAGS="--cfg shuttle" cargo test conc_ --release
bootstrap: install
warp bootstrap --print-hashes
warp build ./tricorders/beam/mix.exs
# warp build ./tricorders/rust/Cargo.toml
.PHONY: cov
cov:
cargo llvm-cov --open
.PHONY: doc
doc:
cargo doc --document-private-items --open