blob: 832365ee174f422894e33ff9a000e96e4fdc6756 [file] [log] [blame]
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +01001image: gcc
2
3build-and-test:
4 stage: build
5 before_script:
6 - pwd
7 - source `find .. -name section_helper.sh`
8
9 - start_section install_linux_packages "Installing missing Linux packages"
10 - apt update && apt -y install cmake libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libomp-dev
11 - end_section install_linux_packages
12
Marc Kupietzcf7224b2022-04-10 17:12:20 +020013 script:
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010014 - start_section install_rocksdb_static "Building and installing rocksdb-static"
15 - curl -L https://github.com/facebook/rocksdb/archive/refs/tags/v5.11.3.tar.gz | tar zx
16 - cd rocksdb-5.11.3
17 - export PROCS=$(cat /proc/cpuinfo | grep -c processor)
18 - make -j $PROCS static_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
19 - make install-static DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
20 - end_section install_rocksdb_static
21
22 - start_section install_rocksdb_shared "Building and installing rocksdb-shared"
23 - make -j $PROCS shared_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
24 - make install-shared DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
Marc Kupietz3e003e02022-04-10 17:11:32 +020025 - ldconfig
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010026 - cd ..
27 - end_section rocksdb_shared
28
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010029 - start_section install_collocatordb "Building and installing collocatordb"
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010030 - mkdir -p build
31 - cd build
32 - cmake ..
33 - make
34 - make install
Marc Kupietz3e003e02022-04-10 17:11:32 +020035 - ldconfig
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010036 - ctest --extra-verbose
Marc Kupietzcf7224b2022-04-10 17:12:20 +020037 - cd ..
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010038 - end_section install_collocatordb
39
40 artifacts:
41 paths:
Marc Kupietzcf7224b2022-04-10 17:12:20 +020042 - "build/*.a"
43 - "build/*.so*"
Marc Kupietza0557a02022-04-10 17:27:21 +020044# - "rocksdb-5.11.3/*.a"
45# - "rocksdb-5.11.3/*.so*"
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010046