-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
96 lines (71 loc) · 2.56 KB
/
Copy pathjustfile
File metadata and controls
96 lines (71 loc) · 2.56 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
py_exe := if os_family() == "unix" { join(justfile_dir() + '/', ".venv/bin/python") } else { join(replace(justfile_dir(), '\', '/') + '/', ".venv/Scripts/python.exe") }
# Setup virtual environment and install dependencies along with the python module in editable mode
[linux, macos]
init:
python -m venv .venv
{{py_exe}} -m pip install -r requirements.txt
{{py_exe}} -m pip install -e .
[windows]
init:
python -m venv .venv
{{py_exe}} -m pip install -r requirements.txt
{{py_exe}} -m pip install -e .
# Tests
[working-directory: 'tests/general']
test-general-codegen:
{{py_exe}} ../../src/blitzbuffers schema.bzb \
-l rust ./rust/src/schema.rs
[working-directory: 'tests/general/rust']
test-general-rust:
cargo test
[working-directory: 'tests/interlang']
test-interlang-codegen:
{{py_exe}} ../../src/blitzbuffers schema.bzb \
-l rust ./rust/src/schema.rs \
-l cpp ./cpp/schema.h
[working-directory: 'tests/interlang/rust']
test-interlang-rust *args:
cargo run -- {{args}}
[working-directory: 'tests/interlang/cpp']
test-interlang-cpp-build:
cmake -B build
cmake --build build --config Debug
[working-directory: 'tests/interlang/cpp']
[windows]
test-interlang-cpp *args: test-interlang-cpp-build
./build/Debug/cpp_tests.exe {{args}}
[working-directory: 'tests/interlang/cpp']
[linux, macos]
test-interlang-cpp *args: test-interlang-cpp-build
./build/cpp_tests {{args}}
test-interlang-gen: test-interlang-codegen test-interlang-cpp test-interlang-rust
test-interlang-check: (test-interlang-cpp "c") (test-interlang-rust "c")
test-gen: test-general-codegen test-interlang-codegen
test-check: test-general-rust test-interlang-gen test-interlang-check
test: test-gen test-check
# Benchmarking
[working-directory: 'benchmarks']
bench-codegen:
{{py_exe}} ../src/blitzbuffers ./schemas/blitzbuffers.bzb \
-l rust ./rust/src/blitzbuffers_generated.rs \
-l cpp ./cpp/blitzbuffers_generated.h
[working-directory: 'benchmarks/rust']
bench-rust *args:
cargo run --release -- {{args}}
[working-directory: 'benchmarks/cpp']
bench-cpp-build:
cmake -B build
cmake --build build --config Release
[working-directory: 'benchmarks/cpp']
[windows]
bench-cpp *args: bench-cpp-build
./build/Release/cpp_benchmarks.exe {{args}}
[working-directory: 'benchmarks/cpp']
[linux, macos]
bench-cpp *args: bench-cpp-build
./build/cpp_benchmarks {{args}}
bench: bench-codegen bench-cpp bench-rust
build:
rm -rf dist
{{py_exe}} -m pip install build setuptools wheel
{{py_exe}} -m build --sdist --wheel