-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
65 lines (54 loc) · 1.38 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# https://github.com/casey/just
# build wasm and js bindings
js:
#!/usr/bin/env bash
cd bindings/js_wasm
rm -rf pkg
wasm-pack build --target nodejs --out-dir pkg --out-name index
wasm-pack build --target bundler --out-dir pkg --out-name index_bundle
cp package.json pkg/package.json
# install js test depenedenicies, requires yarn
js-test-init:
#!/usr/bin/env bash
cd bindings/js_wasm/binding_tests
yarn
# run js tests but assume `js-test-init` and `js` were already run
js-test-light:
#!/usr/bin/env bash
cd bindings/js_wasm/binding_tests
yarn test
# run js tests (called from ci)
js-test:
just js
just js-test-init
just js-test-light
# remove dist and node_modules from js bindings tests
clean:
cargo clean
cd benches; cargo clean
rm -rf bindings/js_wasm/pkg
just clean-js
# remove artifacts from js bindings tests
clean-js:
rm -rf bindings/js_wasm/binding_tests/dist
rm -rf bindings/js_wasm/binding_tests/node_modules
bench:
#!/usr/bin/env bash
cd benches
cargo bench
checkall-buildall:
just clean
cargo test
cargo clippy -- -D warnings
just bench
just js-test
assert-clean-workdir:
! test -n "$(git status --porcelain)" # please commit before publish
publish-js:
just checkall-buildall
just assert-clean-workdir
cd bindings/js_wasm/pkg && npm publish
publish-rs:
just checkall-buildall
just assert-clean-workdir
cargo publish