blob: a888765156bc2af2986fbf5b31807a493bb78286 [file] [log] [blame]
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +01001image: gcc
2
3build-and-test:
4 stage: build
Marc Kupietzc8ea6502022-04-13 11:50:46 +02005 cache:
6 - key: one-key-to-rule-them-all
7 paths:
8 - rocksdb-5.11.3/
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +01009 before_script:
10 - pwd
11 - source `find .. -name section_helper.sh`
12
13 - start_section install_linux_packages "Installing missing Linux packages"
14 - apt update && apt -y install cmake libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libomp-dev
15 - end_section install_linux_packages
16
Marc Kupietzcf7224b2022-04-10 17:12:20 +020017 script:
Marc Kupietz44229232024-08-05 15:00:20 +020018 - start_section install_rocksdb "Building and installing rocksdb"
19 - git clone https://github.com/kupietz/rocksdb.git -b 5.11.fb --single-branch
20 - cd rocksdb
Marc Kupietzc8ea6502022-04-13 11:50:46 +020021 - export PROCS=$(nproc)
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010022 - make -j $PROCS static_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
23 - make install-static DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
Marc Kupietz13f4f1b2022-04-13 21:28:48 +020024 - strip --strip-unneeded `find -name librocksdb.a`
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010025 - end_section install_rocksdb_static
26
27 - start_section install_rocksdb_shared "Building and installing rocksdb-shared"
28 - make -j $PROCS shared_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
29 - make install-shared DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
Marc Kupietz13f4f1b2022-04-13 21:28:48 +020030 - strip --strip-unneeded `find -name librocksdb.so`
Marc Kupietz3e003e02022-04-10 17:11:32 +020031 - ldconfig
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010032 - cd ..
Marc Kupietz44229232024-08-05 15:00:20 +020033 - end_section install_rocksdb
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010034
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010035 - start_section install_collocatordb "Building and installing collocatordb"
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010036 - mkdir -p build
37 - cd build
38 - cmake ..
39 - make
40 - make install
Marc Kupietz3e003e02022-04-10 17:11:32 +020041 - ldconfig
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010042 - ctest --extra-verbose
Marc Kupietz13f4f1b2022-04-13 21:28:48 +020043 - strip --strip-unneeded `find -name libcollocatordb.so`
Marc Kupietzcf7224b2022-04-10 17:12:20 +020044 - cd ..
Marc Kupietz7cf5d8a2021-03-22 17:52:52 +010045 - end_section install_collocatordb
46
47 artifacts:
48 paths:
Marc Kupietz13f4f1b2022-04-13 21:28:48 +020049 - "rocksdb-5.11.3/*.so*"
50 - "rocksdb-5.11.3/*.a"
51 - "build/libcollocatordb.so*"
52 - "build/libcollocatordb*.a"