-
Notifications
You must be signed in to change notification settings - Fork 9
/
justfile
44 lines (37 loc) · 1.24 KB
/
justfile
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
build:
cargo build
test:
cargo test
# builds the contracts, using the arm64 workspace-optimizer image if
# avaliable. as this switches images depending on the archetecture,
# this command should not be used to create release builds.
optimize:
./devtools/optimize.sh
simtest: optimize
# normalize names for arm builds.
if [[ $(uname -m) =~ "arm64" ]]; then \
cp artifacts/polytone_note-aarch64.wasm artifacts/polytone_note.wasm && \
cp artifacts/polytone_voice-aarch64.wasm artifacts/polytone_voice.wasm && \
cp artifacts/polytone_tester-aarch64.wasm artifacts/polytone_tester.wasm && \
cp artifacts/polytone_proxy-aarch64.wasm artifacts/polytone_proxy.wasm \
;fi
mkdir -p tests/wasms
cp -R ./artifacts/*.wasm tests/wasms
go clean -testcache
cd tests/simtests && go test ./...
integrationtest: optimize
go clean -testcache
cd tests/strangelove && go test ./...
# ${f <-- from variable f
# ## <-- greedy front trim
# * <-- matches anything
# / <-- until the last '/'
# }
# <https://stackoverflow.com/a/3162500>
schema:
start=$(pwd); \
for f in ./contracts/**/*; \
do \
echo "generating schema for ${f##*/}"; \
cd "$f" && cargo schema && cd "$start" \
;done