-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: precompile librocksdb for speed up tests (#788)
## Description Compiling the `rocksdb` crate consumes a lot of time because it compiles `librocksdb.a` library under the hood. The PR adds additional flow in CI to precompile this library and save it into the cache for further re-using.
- Loading branch information
Showing
2 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROCKSDB_VER=v7.4.4 | ||
INSTALL_PATH=/root/rocksdb | ||
LIB_PATH=$INSTALL_PATH/lib/librocksdb.a | ||
|
||
if [[ ! -f $LIB_PATH ]]; then | ||
apt -y install cmake libgflags-dev libsnappy-dev libbz2-dev liblz4-dev libzstd-dev | ||
git clone --branch $ROCKSDB_VER https://github.com/facebook/rocksdb | ||
cd rocksdb && mkdir build && cd build | ||
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_ZLIB=1 -DWITH_SNAPPY=1 -DWITH_LZ4=1 -DWITH_ZSTD=1 -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH .. | ||
make -j32 install | ||
cache-util save rocksdb:$INSTALL_PATH | ||
cd $HOME | ||
fi |