-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
62 lines (51 loc) · 1.93 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
cbind:
cbindgen -q --config cbindgen.toml --crate tokio-socket-manager --output include/socket_manager_c_api.h
fmt:
cargo fmt
clippy:
cargo clippy
clean:
rm -rf build
dev-docker:
docker build -f ./dockerfile/dev-containers/focal/Dockerfile -t congyuwang/socket-manager-dev:focal .
docker build -f ./dockerfile/dev-containers/jammy/Dockerfile -t congyuwang/socket-manager-dev:jammy .
test:
cd build && ctest --output-on-failure && cd ..
time:
/usr/bin/time -l -h -p ./build/tests/CommonCxxTests test_transfer_data_large
/usr/bin/time -l -h -p ./build/tests/CommonCxxTests test_transfer_data_large_async
/usr/bin/time -l -h -p ./build/tests/CommonCxxTests test_transfer_data_large_busy
test-linking:
cd tests/test_find_package
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --verbose
cd ../..
debug:
cmake -B build -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --parallel 4 --config Debug
just test
build:
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --parallel 4 --config Release --verbose
just test
build-static:
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBUILD_SHARED_LIBS=OFF
cmake --build build --parallel 4 --config Release --verbose
just test
install:
just clean
just build
sudo cmake --install build --config Release
install-static:
just clean
just build-static
sudo cmake --install build --config Release