Skip to content

Commit

Permalink
ci: do not prebuild rocksdb
Browse files Browse the repository at this point in the history
Signed-off-by: Phoeniix Zhao <[email protected]>
  • Loading branch information
Phoenix500526 committed Apr 1, 2024
1 parent 3834f8c commit 6768e83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM ubuntu:22.04 AS build-env

ARG LIB_ROCKS_SYS_VER

RUN apt-get update -y --force-yes && \
DEBIAN_FRONTEND=noninteractive \
Expand Down Expand Up @@ -41,18 +40,8 @@ RUN echo "=== Install rusty stuff 🦀️ ===" && \
mv ".local/bin/protoc" /bin/ && \
mv ".local/include/google" /usr/include/ && \
rm -rf .local/ protoc-21.10-linux-x86_64.zip && \
protoc --version && \
echo "=== Prebuilt rocksdb ===" && \
curl -L --proto '=https' --tlsv1.2 -sSf https://crates.io/api/v1/crates/librocksdb-sys/$LIB_ROCKS_SYS_VER/download | tar -zxf - && \
cd librocksdb-sys-$LIB_ROCKS_SYS_VER/rocksdb/ && \
make install && \
cd /xline && \
rm -rf librocksdb-sys-$LIB_ROCKS_SYS_VER/
protoc --version

# Set some environments that librocksdb-sys will use them to skip building rocksdb
ENV ROCKSDB_STATIC=1
ENV ROCKSDB_INCLUDE_DIR=/usr/local/include
ENV ROCKSDB_LIB_DIR=/usr/local/lib

# No incremental build and debug info, which might cause slow build in CI
# Refer to https://matklad.github.io/2021/09/04/fast-rust-builds.html#CI-Workflow
Expand Down
2 changes: 1 addition & 1 deletion ci/build-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ arch
echo "=== Docker build ==="
set -x

docker build -t ${BUILD_TAG} --progress=plain --no-cache --build-arg LIB_ROCKS_SYS_VER=$LIB_ROCKS_SYS_VER .
docker build -t ${BUILD_TAG} --progress=plain --no-cache .

set +x

Expand Down

0 comments on commit 6768e83

Please sign in to comment.