blob: a888765156bc2af2986fbf5b31807a493bb78286 [file] [log] [blame]
image: gcc
build-and-test:
stage: build
cache:
- key: one-key-to-rule-them-all
paths:
- rocksdb-5.11.3/
before_script:
- pwd
- source `find .. -name section_helper.sh`
- start_section install_linux_packages "Installing missing Linux packages"
- apt update && apt -y install cmake libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libomp-dev
- end_section install_linux_packages
script:
- start_section install_rocksdb "Building and installing rocksdb"
- git clone https://github.com/kupietz/rocksdb.git -b 5.11.fb --single-branch
- cd rocksdb
- export PROCS=$(nproc)
- make -j $PROCS static_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- make install-static DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- strip --strip-unneeded `find -name librocksdb.a`
- end_section install_rocksdb_static
- start_section install_rocksdb_shared "Building and installing rocksdb-shared"
- make -j $PROCS shared_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- make install-shared DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- strip --strip-unneeded `find -name librocksdb.so`
- ldconfig
- cd ..
- end_section install_rocksdb
- start_section install_collocatordb "Building and installing collocatordb"
- mkdir -p build
- cd build
- cmake ..
- make
- make install
- ldconfig
- ctest --extra-verbose
- strip --strip-unneeded `find -name libcollocatordb.so`
- cd ..
- end_section install_collocatordb
artifacts:
paths:
- "rocksdb-5.11.3/*.so*"
- "rocksdb-5.11.3/*.a"
- "build/libcollocatordb.so*"
- "build/libcollocatordb*.a"