-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sh
executable file
·51 lines (41 loc) · 1.68 KB
/
build.sh
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
#!/bin/bash
readonly SRC_DIR=$(dirname "$(readlink -f "$0")")
readonly BUILD_DIR=build
# tools
cmake -S "$SRC_DIR/tools" -B "$BUILD_DIR/tools" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR/tools" --config Release
# fev
pollers=(epoll io_uring)
scheds=(
work-sharing-locking
work-sharing-bounded-mpmc
work-sharing-simple-mpmc
work-stealing-locking
work-stealing-bounded-mpmc
work-stealing-bounded-spmc
)
for poller in "${pollers[@]}"; do
for sched in "${scheds[@]}"; do
cmake -S "$SRC_DIR/frameworks/fev" -B "$BUILD_DIR/fev-$poller-$sched" -DCMAKE_BUILD_TYPE=Release -DFEV_POLLER=$poller -DFEV_SCHED=$sched
cmake --build "$BUILD_DIR/fev-$poller-$sched" --config Release
done
done
# asio
cmake -S "$SRC_DIR/frameworks/asio" -B "$BUILD_DIR/asio" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR/asio" --config Release
# raw-epoll
cmake -S "$SRC_DIR/frameworks/raw-epoll" -B "$BUILD_DIR/raw-epoll" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR/raw-epoll" --config Release
# threads
cmake -S "$SRC_DIR/frameworks/threads" -B "$BUILD_DIR/threads" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR/threads" --config Release
# libuv
cmake -S "$SRC_DIR/frameworks/libuv" -B "$BUILD_DIR/libuv" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR/libuv" --config Release
# go
go build -o "$BUILD_DIR/go/hello" "$SRC_DIR/frameworks/go/hello.go"
go build -o "$BUILD_DIR/go/hello-timeout" "$SRC_DIR/frameworks/go/hello-timeout.go"
# async-std
cargo build --release --manifest-path "$SRC_DIR/frameworks/async-std/Cargo.toml" --target-dir "$BUILD_DIR/async-std"
# tokio
cargo build --release --manifest-path "$SRC_DIR/frameworks/tokio/Cargo.toml" --target-dir "$BUILD_DIR/tokio"