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 | 7cf5d8a | 2021-03-22 17:52:52 +0100 | [diff] [blame] | 18 | - start_section install_rocksdb_static "Building and installing rocksdb-static" |
| 19 | - curl -L https://github.com/facebook/rocksdb/archive/refs/tags/v5.11.3.tar.gz | tar zx |
| 20 | - cd rocksdb-5.11.3 |
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 .. |
| 33 | - end_section rocksdb_shared |
| 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" |