Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 1 | image: gcc |
| 2 | |
| 3 | build-and-test: |
| 4 | stage: build |
Marc Kupietz | c8ea650 | 2022-04-13 11:50:46 +0200 | [diff] [blame] | 5 | cache: |
| 6 | - key: one-key-to-rule-them-all |
| 7 | paths: |
| 8 | - rocksdb-5.11.3/ |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 9 | 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 Kupietz | cf7224b | 2022-04-10 17:12:20 +0200 | [diff] [blame] | 17 | script: |
Marc Kupietz | 4422923 | 2024-08-05 15:00:20 +0200 | [diff] [blame^] | 18 | - 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 Kupietz | c8ea650 | 2022-04-13 11:50:46 +0200 | [diff] [blame] | 21 | - export PROCS=$(nproc) |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 22 | - 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 Kupietz | 13f4f1b | 2022-04-13 21:28:48 +0200 | [diff] [blame] | 24 | - strip --strip-unneeded `find -name librocksdb.a` |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 25 | - 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 Kupietz | 13f4f1b | 2022-04-13 21:28:48 +0200 | [diff] [blame] | 30 | - strip --strip-unneeded `find -name librocksdb.so` |
Marc Kupietz | 3e003e0 | 2022-04-10 17:11:32 +0200 | [diff] [blame] | 31 | - ldconfig |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 32 | - cd .. |
Marc Kupietz | 4422923 | 2024-08-05 15:00:20 +0200 | [diff] [blame^] | 33 | - end_section install_rocksdb |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 34 | |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 35 | - start_section install_collocatordb "Building and installing collocatordb" |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 36 | - mkdir -p build |
| 37 | - cd build |
| 38 | - cmake .. |
| 39 | - make |
| 40 | - make install |
Marc Kupietz | 3e003e0 | 2022-04-10 17:11:32 +0200 | [diff] [blame] | 41 | - ldconfig |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 42 | - ctest --extra-verbose |
Marc Kupietz | 13f4f1b | 2022-04-13 21:28:48 +0200 | [diff] [blame] | 43 | - strip --strip-unneeded `find -name libcollocatordb.so` |
Marc Kupietz | cf7224b | 2022-04-10 17:12:20 +0200 | [diff] [blame] | 44 | - cd .. |
Marc Kupietz | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 45 | - end_section install_collocatordb |
| 46 | |
| 47 | artifacts: |
| 48 | paths: |
Marc Kupietz | 13f4f1b | 2022-04-13 21:28:48 +0200 | [diff] [blame] | 49 | - "rocksdb-5.11.3/*.so*" |
| 50 | - "rocksdb-5.11.3/*.a" |
| 51 | - "build/libcollocatordb.so*" |
| 52 | - "build/libcollocatordb*.a" |