Simplify recipes

next
Sayan Nandan 3 years ago
parent b1123a6de9
commit e9369a40ef
No known key found for this signature in database
GPG Key ID: 8BC07A0A4D41DD52

203
Cargo.lock generated

@ -31,6 +31,17 @@ dependencies = [
"winapi",
]
[[package]]
name = "async-trait"
version = "0.1.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "atty"
version = "0.2.14"
@ -44,9 +55,22 @@ dependencies = [
[[package]]
name = "autocfg"
version = "1.0.1"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bb8"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9f4fa9768efd269499d8fba693260cfc670891cf6de3adc935588447a77cc8"
dependencies = [
"async-trait",
"futures-channel",
"futures-util",
"parking_lot 0.11.2",
"tokio",
]
[[package]]
name = "bincode"
@ -150,9 +174,9 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
version = "0.9.6"
version = "0.9.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762"
checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9"
dependencies = [
"cfg-if",
"crossbeam-utils",
@ -163,9 +187,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
version = "0.8.6"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120"
checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
dependencies = [
"cfg-if",
"lazy_static",
@ -311,28 +335,39 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
name = "futures-channel"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
dependencies = [
"futures-core",
]
[[package]]
name = "futures-core"
version = "0.3.19"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7"
checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
[[package]]
name = "futures-task"
version = "0.3.19"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72"
checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
[[package]]
name = "futures-util"
version = "0.3.19"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164"
checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
dependencies = [
"futures-channel",
"futures-core",
"futures-task",
"pin-project-lite",
"pin-utils",
"slab",
]
[[package]]
@ -423,20 +458,20 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.116"
version = "0.2.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c"
[[package]]
name = "libsky"
version = "0.7.2"
version = "0.7.3-alpha.1"
dependencies = [
"termcolor",
]
[[package]]
name = "libstress"
version = "0.7.2"
version = "0.7.3-alpha.1"
dependencies = [
"crossbeam-channel",
"log",
@ -530,9 +565,9 @@ dependencies = [
[[package]]
name = "ntapi"
version = "0.3.6"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
dependencies = [
"winapi",
]
@ -627,7 +662,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
dependencies = [
"lock_api",
"parking_lot_core 0.9.0",
"parking_lot_core 0.9.1",
]
[[package]]
@ -646,15 +681,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
version = "0.9.0"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2f4f894f3865f6c0e02810fc597300f34dc2510f66400da262d8ae10e75767d"
checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-sys 0.29.0",
"windows-sys 0.32.0",
]
[[package]]
@ -699,6 +734,17 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "r2d2"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f"
dependencies = [
"log",
"parking_lot 0.11.2",
"scheduled-thread-pool",
]
[[package]]
name = "radix_trie"
version = "0.2.1"
@ -854,6 +900,15 @@ version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
[[package]]
name = "scheduled-thread-pool"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7"
dependencies = [
"parking_lot 0.11.2",
]
[[package]]
name = "scopeguard"
version = "1.1.0"
@ -923,7 +978,7 @@ dependencies = [
[[package]]
name = "sky-bench"
version = "0.7.2"
version = "0.7.3-alpha.1"
dependencies = [
"clap",
"devtimer",
@ -931,23 +986,23 @@ dependencies = [
"rand",
"serde",
"serde_json",
"skytable 0.6.2 (git+https://github.com/skytable/client-rust?branch=next)",
"skytable 0.7.0-alpha.4 (git+https://github.com/skytable/client-rust?branch=next)",
]
[[package]]
name = "sky-migrate"
version = "0.7.2"
version = "0.7.3-alpha.1"
dependencies = [
"bincode",
"clap",
"env_logger",
"log",
"skytable 0.6.2 (git+https://github.com/skytable/client-rust.git)",
"skytable 0.7.0-alpha.4 (git+https://github.com/skytable/client-rust.git)",
]
[[package]]
name = "sky_macros"
version = "0.7.2"
version = "0.7.3-alpha.1"
dependencies = [
"proc-macro2",
"quote",
@ -957,7 +1012,7 @@ dependencies = [
[[package]]
name = "skyd"
version = "0.7.2"
version = "0.7.3-alpha.1"
dependencies = [
"ahash",
"bincode",
@ -979,7 +1034,7 @@ dependencies = [
"regex",
"serde",
"sky_macros",
"skytable 0.6.2 (git+https://github.com/skytable/client-rust?branch=next)",
"skytable 0.7.0-alpha.4 (git+https://github.com/skytable/client-rust?branch=next)",
"tokio",
"tokio-openssl",
"toml",
@ -988,31 +1043,43 @@ dependencies = [
[[package]]
name = "skysh"
version = "0.7.2"
version = "0.7.3-alpha.1"
dependencies = [
"clap",
"crossterm",
"libsky",
"rustyline",
"skytable 0.6.2 (git+https://github.com/skytable/client-rust?branch=next)",
"skytable 0.7.0-alpha.4 (git+https://github.com/skytable/client-rust?branch=next)",
"tokio",
]
[[package]]
name = "skytable"
version = "0.6.2"
source = "git+https://github.com/skytable/client-rust?branch=next#b471f5098e29c6ac7311820ade0b5bb706689e77"
version = "0.7.0-alpha.4"
source = "git+https://github.com/skytable/client-rust?branch=next#07c5e9e0c05d7859f016067f3691d2e05655306d"
dependencies = [
"async-trait",
"bb8",
"bytes",
"openssl",
"r2d2",
"tokio",
"tokio-openssl",
]
[[package]]
name = "skytable"
version = "0.6.2"
source = "git+https://github.com/skytable/client-rust.git#b471f5098e29c6ac7311820ade0b5bb706689e77"
version = "0.7.0-alpha.4"
source = "git+https://github.com/skytable/client-rust.git#07c5e9e0c05d7859f016067f3691d2e05655306d"
dependencies = [
"r2d2",
]
[[package]]
name = "slab"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
[[package]]
name = "smallvec"
@ -1037,7 +1104,7 @@ dependencies = [
"log",
"num_cpus",
"rand",
"skytable 0.6.2 (git+https://github.com/skytable/client-rust?branch=next)",
"skytable 0.7.0-alpha.4 (git+https://github.com/skytable/client-rust?branch=next)",
"sysinfo",
]
@ -1060,9 +1127,9 @@ dependencies = [
[[package]]
name = "sysinfo"
version = "0.23.0"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e757000a4bed2b1be9be65a3f418b9696adf30bb419214c73997422de73a591"
checksum = "6bb29fc86b56b6d432ecdbbff2e5726aeaa69bf1bb48ddd994432b60d8bccd01"
dependencies = [
"cfg-if",
"core-foundation-sys",
@ -1155,9 +1222,9 @@ dependencies = [
[[package]]
name = "unicode-segmentation"
version = "1.8.0"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
[[package]]
name = "unicode-width"
@ -1232,19 +1299,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ceb069ac8b2117d36924190469735767f0990833935ab430155e71a44bafe148"
dependencies = [
"windows_aarch64_msvc 0.29.0",
"windows_i686_gnu 0.29.0",
"windows_i686_msvc 0.29.0",
"windows_x86_64_gnu 0.29.0",
"windows_x86_64_msvc 0.29.0",
]
[[package]]
name = "windows-sys"
version = "0.30.0"
@ -1259,10 +1313,17 @@ dependencies = [
]
[[package]]
name = "windows_aarch64_msvc"
version = "0.29.0"
name = "windows-sys"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d027175d00b01e0cbeb97d6ab6ebe03b12330a35786cbaca5252b1c4bf5d9b"
checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"
dependencies = [
"windows_aarch64_msvc 0.32.0",
"windows_i686_gnu 0.32.0",
"windows_i686_msvc 0.32.0",
"windows_x86_64_gnu 0.32.0",
"windows_x86_64_msvc 0.32.0",
]
[[package]]
name = "windows_aarch64_msvc"
@ -1271,10 +1332,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29277a4435d642f775f63c7d1faeb927adba532886ce0287bd985bffb16b6bca"
[[package]]
name = "windows_i686_gnu"
version = "0.29.0"
name = "windows_aarch64_msvc"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8793f59f7b8e8b01eda1a652b2697d87b93097198ae85f823b969ca5b89bba58"
checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
[[package]]
name = "windows_i686_gnu"
@ -1283,10 +1344,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1145e1989da93956c68d1864f32fb97c8f561a8f89a5125f6a2b7ea75524e4b8"
[[package]]
name = "windows_i686_msvc"
version = "0.29.0"
name = "windows_i686_gnu"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8602f6c418b67024be2996c512f5f995de3ba417f4c75af68401ab8756796ae4"
checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
[[package]]
name = "windows_i686_msvc"
@ -1295,10 +1356,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4a09e3a0d4753b73019db171c1339cd4362c8c44baf1bcea336235e955954a6"
[[package]]
name = "windows_x86_64_gnu"
version = "0.29.0"
name = "windows_i686_msvc"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3d615f419543e0bd7d2b3323af0d86ff19cbc4f816e6453f36a2c2ce889c354"
checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
[[package]]
name = "windows_x86_64_gnu"
@ -1307,10 +1368,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ca64fcb0220d58db4c119e050e7af03c69e6f4f415ef69ec1773d9aab422d5a"
[[package]]
name = "windows_x86_64_msvc"
version = "0.29.0"
name = "windows_x86_64_gnu"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11d95421d9ed3672c280884da53201a5c46b7b2765ca6faf34b0d71cf34a3561"
checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
[[package]]
name = "windows_x86_64_msvc"
@ -1318,6 +1379,12 @@ version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08cabc9f0066848fef4bc6a1c1668e6efce38b661d2aeec75d18d8617eebb5f1"
[[package]]
name = "windows_x86_64_msvc"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
[[package]]
name = "yaml-rust"
version = "0.3.5"

@ -1,168 +1,142 @@
# set ROOT_DIR as our test suite uses it
export ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ADDITIONAL_SOFTWARE=
# (DEF) Either prepare --target triple-x-y OR have an empty value
TARGET_ARG =
# no additional software note
NO_ADDITIONAL_SOFTWARE := echo "No additional software required for this target"
# target argument
TARGET_ARG :=
# target folder path
TARGET_FOLDER := target/
# additional software installation
ADDITIONAL_SOFTWARE :=
# update variables depending on target
ifneq ($(origin TARGET),undefined)
TARGET_ARG +=--target ${TARGET}
ifeq ($(TARGET),x86_64-unknown-linux-musl)
# we need musl-tools for 64-bit musl targets
ADDITIONAL_SOFTWARE += sudo apt-get update && sudo apt install musl-tools -y
endif
ifeq ($(TARGET),i686-unknown-linux-gnu)
# we need gcc-multilib on 32-bit linux targets
ADDITIONAL_SOFTWARE += sudo apt-get update && sudo apt install gcc-multilib -y
endif
endif
# (DEF) display a message if no additional packages are required for this target
ifeq ($(ADDITIONAL_SOFTWARE),)
ADDITIONAL_SOFTWARE += echo "info: No additional software required for this target"
ifeq ($(TARGET),x86_64-unknown-linux-musl)
# for MUSL builds, we need to install musl-tools
ADDITIONAL_SOFTWARE += sudo apt-get update && sudo apt install musl-tools -y
else ifeq ($(TARGET),i686-unknown-linux-gnu)
# for 32-bit we need multilib
ADDITIONAL_SOFTWARE += sudo apt-get update && sudo apt install gcc-multilib -y
else
ADDITIONAL_SOFTWARE += ${NO_ADDITIONAL_SOFTWARE}
endif
TARGET_ARG += --target ${TARGET}
TARGET_FOLDER := $(addsuffix ${TARGET}/,${TARGET_FOLDER})
else
ADDITIONAL_SOFTWARE += ${NO_ADDITIONAL_SOFTWARE}
endif
BUILD_VERBOSE = cargo build --verbose $(TARGET_ARG)
TARGET_FOLDER := $(addsuffix release/,${TARGET_FOLDER})
# cargo build
CBUILD := cargo build $(TARGET_ARG)
# cargo test
CTEST := cargo test $(TARGET_ARG)
# (DEF) Create empty commands
STOP_SERVER =
BUILD_COMMAND =
BUILD_SERVER_COMMAND =
TEST_COMMAND =
RELEASE_COMMAND =
START_COMMAND =
# binary file paths
BINARY_SKYSH := $(TARGET_FOLDER)skysh
BINARY_SKYD := $(TARGET_FOLDER)skyd
BINARY_SKYBENCH := $(TARGET_FOLDER)sky-bench
BINARY_SKYMIGRATE := $(TARGET_FOLDER)sky-migrate
# archive command
ARCHIVE :=
# start background server command
START_SERVER := cargo run $(TARGET_ARG) -p skyd -- --noart --sslchain cert.pem --sslkey key.pem
STOP_SERVER :=
# (DEF) Add cmd /c for windows due to OpenSSL issues or just add cargo run for non-windows
ifeq ($(OS),Windows_NT)
# export windows specifc rustflags
export RUSTFLAGS = -Ctarget-feature=+crt-static
# add command to use cmd because OpenSSL can't build on Windows bash
BUILD_COMMAND += cmd /C set RUSTFLAGS = -Ctarget-feature=+crt-static
# same thing here
BUILD_SERVER_COMMAND += cmd /C
TEST_COMMAND += cmd /C
STOP_SERVER += taskkill.exe /F /IM skyd.exe
RELEASE_COMMAND += cmd /C
START_COMMAND += cmd /C START /B
# on windows, so we need exe
ARCHIVE += 7z a ourbundle.zip $(BINARY_SKYSH).exe $(BINARY_SKYD).exe $(BINARY_SKYBENCH).exe $(BINARY_SKYMIGRATE).exe
# also add RUSTFLAGS
export RUSTFLAGS = -Ctarget-feature=+crt-static
# now add start command
START_SERVER := cmd /C START /B $(START_SERVER)
# windows is funky with OpenSSL, so add these
CBUILD := cmd /C $(CBUILD)
CTEST := cmd /C $(CTEST)
# finally add stop command
STOP_SERVER := taskkill.exe /F /IM skyd.exe
else
STOP_SERVER += pkill skyd
# make sure to set executable permissions
# not windows, so archive is easy
ARCHIVE += zip -j ourbundle.zip $(BINARY_SKYSH) $(BINARY_SKYD) $(BINARY_SKYBENCH) $(BINARY_SKYMIGRATE)
# now add start command
START_SERVER := $(START_SERVER) &
# add stop command
STOP_SERVER := pkill skyd
endif
# (DEF) Assemble the commands
BUILD_SERVER_COMMAND += $(BUILD_VERBOSE)
BUILD_SERVER_COMMAND += -p skyd
RELEASE_SERVER_COMMAND =
RELEASE_SERVER_COMMAND += $(BUILD_SERVER_COMMAND)
RELEASE_SERVER_COMMAND += --release
RELEASE_COMMAND += cargo build --release $(TARGET_ARG)
BUILD_COMMAND += $(BUILD_VERBOSE)
TEST_COMMAND += cargo test $(TARGET_ARG)
START_COMMAND += cargo run $(TARGET_ARG) -p skyd
START_COMMAND_RELEASE =
START_COMMAND_RELEASE += ${START_COMMAND}
START_COMMAND_RELEASE += --release
START_COMMAND += -- --noart --nosave
START_COMMAND += --sslchain cert.pem --sslkey key.pem
START_COMMAND_RELEASE += -- --noart --nosave
ifneq ($(OS),Windows_NT)
START_COMMAND += &
START_COMMAND_RELEASE += &
endif
# (DEF) Prepare release bundle commands
BUNDLE=
ifeq ($(origin TARGET),undefined)
# no target defined. but check for windows
ifeq ($(OS),Windows_NT)
# windows, so we need exe
BUNDLE += cd target/release &&
BUNDLE += 7z a ../../../bundle.zip skysh.exe skyd.exe sky-bench.exe sky-migrate.exe
else
# not windows, so no exe
BUNDLE+=zip -j bundle.zip target/release/skysh target/release/skyd target/release/sky-bench target/release/sky-migrate
endif
# update the archive command if we have a version and artifact name
RENAME_ARTIFACT :=
ifneq ($(origin ARTIFACT),undefined)
# so we have an artifact name
ifneq ($(origin VERSION),undefined)
# we also have the version name
RENAME_ARTIFACT := sky-bundle-${VERSION}-${ARTIFACT}.zip
else
# no version name
RENAME_ARTIFACT := sky-bundle-${ARTIFACT}.zip
endif
else
# target was defined, but check for windows
ifeq ($(OS),Windows_NT)
# windows, so we need exe
BUNDLE += cd target/${TARGET}/release &&
BUNDLE+=7z a ../../../sky-bundle-${VERSION}-${ARTIFACT}.zip skysh.exe skyd.exe sky-bench.exe sky-migrate.exe
else
# not windows, so no exe
ifneq ($(origin CARGO_TARGET_DIR),undefined)
# target defined and target dir. use this instead of target/
BUNDLE+=zip -j sky-bundle-${VERSION}-${ARTIFACT}.zip ${CARGO_TARGET_DIR}/${TARGET}/release/skysh ${CARGO_TARGET_DIR}/${TARGET}/release/skyd ${CARGO_TARGET_DIR}/${TARGET}/release/sky-bench ${CARGO_TARGET_DIR}/${TARGET}/release/sky-migrate
else
# just the plain old target/${TARGET} path
BUNDLE+=zip -j sky-bundle-${VERSION}-${ARTIFACT}.zip target/${TARGET}/release/skysh target/${TARGET}/release/skyd target/${TARGET}/release/sky-bench target/${TARGET}/release/sky-migrate
endif
endif
# no artifact (hack)
RENAME_ARTIFACT := bundle.zip
endif
RENAME_ARTIFACT := $(addprefix mv ourbundle.zip ,${RENAME_ARTIFACT})
# cargo build (debug)
DEBUG := $(CBUILD)
# cargo test
TEST := $(CTEST)
# cargo build (release)
RELEASE := $(CBUILD) --release
# cargo build (release) for skyd,skysh,sky-migrate and sky-bench
RELEASE_BUNDLE := $(RELEASE) -p skyd -p sky-bench -p skysh -p sky-migrate
SEP=echo "============================================================"
.pre:
@echo "===================================================================="
@echo "Installing any additional dependencies"
@echo "===================================================================="
@$(ADDITIONAL_SOFTWARE)
deb: release
@echo "===================================================================="
@echo "Building Debian package (optimized)"
@echo "===================================================================="
@cargo $(TARGET_ARG) install cargo-deb
@cargo deb $(TARGET_ARG) --manifest-path=server/Cargo.toml --output .
@${SEP}
@echo "Installing additional dependencies ..."
@${ADDITIONAL_SOFTWARE}
@${SEP}
build: .pre
@echo "===================================================================="
@echo "Building all binaries in debug mode (unoptimized)"
@echo "===================================================================="
@$(BUILD_COMMAND)
.build-server: .pre
@echo "===================================================================="
@echo "Building server binary in debug mode (unoptimized)"
@echo "===================================================================="
@$(BUILD_SERVER_COMMAND)
@${SEP}
@echo "Building all binaries (debug) ..."
@${DEBUG}
@${SEP}
release: .pre
@echo "===================================================================="
@echo "Building all binaries in release mode (optimized)"
@echo "===================================================================="
cargo build --release --verbose $(TARGET_ARG)
.release-server:
@echo "===================================================================="
@echo "Building server binary in release mode (optimized)"
@echo "===================================================================="
@$(RELEASE_SERVER_COMMAND)
test: .build-server
@echo "===================================================================="
@echo "Starting database server in background"
@echo "===================================================================="
@chmod +x ci/ssl.sh && bash ci/ssl.sh
@${START_COMMAND}
# sleep for 5s to let the server start up
@sleep 5
@echo "===================================================================="
@echo "Running all tests"
@echo "===================================================================="
cargo test $(TARGET_ARG)
@$(STOP_SERVER)
@sleep 2
@rm -f .sky_pid cert.pem key.pem
stress: .release-server
@echo "===================================================================="
@echo "Starting database server in background"
@echo "===================================================================="
@${SEP}
@echo "Building all binaries (release) ..."
@${RELEASE}
@${SEP}
release-bundle: .pre
@${SEP}
@echo "Building binaries for packaging (release) ..."
@${RELEASE_BUNDLE}
@${SEP}
bundle: release-bundle
@${SEP}
@echo "Building and packaging bundle (release) ..."
@${ARCHIVE}
@-${RENAME_ARTIFACT}
@${SEP}
test: .pre
@${SEP}
@echo "Building and starting server in debug mode ..."
@${CBUILD} -p skyd
@chmod +x ci/ssl.sh && bash ci/ssl.sh
@${START_COMMAND_RELEASE}
# sleep for 5s to let the server start up
@sleep 5
cargo run $(TARGET_ARG) --release -p stress-test
@echo "===================================================================="
@echo "Stress testing (all)"
@echo "===================================================================="
@$(STOP_SERVER)
@${START_SERVER}
@echo "Sleeping for 10 seconds to let the server start up ..."
@sleep 10
@echo "Finished sleeping"
@${SEP}
@${SEP}
@echo "Running all tests ..."
@${TEST}
@echo "Waiting for server to shut down ..."
@${STOP_SERVER}
@echo "Removing temporary files ..."
@rm -f .sky_pid cert.pem key.pem
bundle: release
@echo "===================================================================="
@echo "Creating bundle for platform"
@echo "===================================================================="
@$(BUNDLE)
@${SEP}
clean:
@echo "===================================================================="
@echo "Cleaning up target folder"
@echo "===================================================================="
@${SEP}
@echo "Cleaning up target folder ..."
cargo clean
@${SEP}

@ -10,7 +10,7 @@ edition = "2021"
# internal deps
libsky = { path = "../libsky" }
skytable = { git = "https://github.com/skytable/client-rust", branch = "next", features = [
"async",
"aio",
"aio-sslv",
], default-features = false }
# external deps

@ -42,7 +42,7 @@ cc = "1.0.72"
# internal deps
libstress = { path = "../libstress" }
skytable = { git = "https://github.com/skytable/client-rust", features = [
"async",
"aio",
"aio-ssl",
], default-features = false, branch = "next" }
# external deps

@ -9,7 +9,9 @@ version = "0.7.3-alpha.1"
[dependencies]
# internal deps
libstress = { path = "../libstress" }
skytable = { git = "https://github.com/skytable/client-rust", branch = "next" }
skytable = { git = "https://github.com/skytable/client-rust", branch = "next", features = [
"dbg",
] }
# external deps
clap = { version = "2", features = ["yaml"] }
devtimer = "4.0.1"

Loading…
Cancel
Save