-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
58 lines (57 loc) · 3.17 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
release_flag := if env_var_or_default("DEBUG", "0") == "1" { "" } else { "--release" }
release_text := if env_var_or_default("DEBUG", "0") == "1" { "debug" } else { "release" }
test path="tests/":
cargo build {{release_flag}} --bin rolandc_cli
cargo run --release --bin roland_test_runner -- --cli {{justfile_directory()}}/target/{{release_text}}/rolandc_cli {{path}}
test_amd64 path="tests/":
cargo build {{release_flag}} --bin rolandc_cli
cargo run --release --bin roland_test_runner -- --cli {{justfile_directory()}}/target/{{release_text}}/rolandc_cli {{path}} --amd64
test-overwrite:
cargo build {{release_flag}} --bin rolandc_cli
cargo run --release --bin roland_test_runner -- --cli {{justfile_directory()}}/target/{{release_text}}/rolandc_cli tests/ --overwrite-error-files
samples:
cargo run {{release_flag}} --bin rolandc_cli -- --wasm4 samples/wasm4/spunky/cart.rol
cargo run {{release_flag}} --bin rolandc_cli -- --wasm4 samples/wasm4/endless-runner/cart.rol
cargo run {{release_flag}} --bin rolandc_cli -- --microw8 samples/microw8/tunnel/tunnel.rol
@echo "Samples OK!"
bump-deps:
cargo update
cd roland-vscode && npm update
cd roland_site && npm update
scratch *args:
cargo run {{release_flag}} --bin rolandc_cli -- scratch.rol {{args}}
wasm2wat --no-check scratch.wasm > scratch.wat
wasmtime scratch.wasm
scratch_amd64 *args:
cargo run {{release_flag}} --bin rolandc_cli -- scratch.rol {{args}} --target amd64 && ./scratch
coverage:
RUSTFLAGS=-Cinstrument-coverage cargo build --bin rolandc_cli
cargo tarpaulin --skip-clean --implicit-test-threads --follow-exec --engine llvm --command build --bin roland_test_runner -o html -- {{justfile_directory()}}/tests/ --cli {{justfile_directory()}}/target/debug/rolandc_cli
{{env_var_or_default("BROWSER", "firefox")}} "{{justfile_directory()}}/tarpaulin-report.html#rolandc/src"
[no-cd]
rolandc *args:
cargo run {{release_flag}} --bin rolandc_cli -- {{args}}
[no-cd]
rolandc_dhat *args:
cargo run --profile dhat --bin rolandc_cli --features dhat-heap -- {{args}}
[no-cd]
rolandc_flame *args:
cargo flamegraph --profile dhat --freq 100000 --bin rolandc_cli -- {{args}}
[no-cd]
rolandc_samply *args:
cargo build --profile dhat
samply record -r 10000 {{justfile_directory()}}/target/dhat/rolandc_cli {{args}}
prepare-release kind="patch":
cd roland-vscode && npm version {{kind}}
cd roland_site && npm version {{kind}}
test-all:
cargo build {{release_flag}} --bin rolandc_cli
cargo run --release --bin roland_test_runner -- --cli {{justfile_directory()}}/target/{{release_text}}/rolandc_cli tests/ --amd64
cargo run --release --bin roland_test_runner -- --cli {{justfile_directory()}}/target/{{release_text}}/rolandc_cli tests/
test-all-preserve-artifacts:
cargo build {{release_flag}} --bin rolandc_cli
cargo run --release --bin roland_test_runner -- --cli {{justfile_directory()}}/target/{{release_text}}/rolandc_cli tests/ --amd64 --preserve-artifacts
cargo run --release --bin roland_test_runner -- --cli {{justfile_directory()}}/target/{{release_text}}/rolandc_cli tests/ --preserve-artifacts
baseline: test-all-preserve-artifacts
rm -rf tests_baseline/
cp -r tests/ tests_baseline/