Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 1 | image: gcc |
| 2 | |
Marc Kupietz | 2a93f3a | 2022-04-10 15:11:16 +0200 | [diff] [blame] | 3 | build-and-test: |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 4 | stage: build |
Marc Kupietz | 2a0c25a | 2022-04-13 12:41:59 +0200 | [diff] [blame] | 5 | cache: |
| 6 | - key: one-key-to-rule-them-all |
| 7 | paths: |
Marc Kupietz | 6eab2f4 | 2023-12-21 11:15:14 +0100 | [diff] [blame^] | 8 | - rocksdb/ |
Marc Kupietz | 2a0c25a | 2022-04-13 12:41:59 +0200 | [diff] [blame] | 9 | - collocatordb/ |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 10 | before_script: |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 11 | - pwd |
| 12 | - source `find .. -name section_helper.sh` |
| 13 | |
| 14 | - start_section install_linux_packages "Installing missing Linux packages" |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 15 | - apt update && apt -y install cmake libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libomp-dev |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 16 | - end_section install_linux_packages |
| 17 | |
| 18 | - start_section install_rocksdb_static "Building and installing rocksdb-static" |
Marc Kupietz | 6eab2f4 | 2023-12-21 11:15:14 +0100 | [diff] [blame^] | 19 | - git clone --branch 5.11.fb https://github.com/facebook/rocksdb.git |
| 20 | - cd rocksdb |
| 21 | - for f in db/compaction_iteration_stats.h include/rocksdb/utilities/checkpoint.h util/string_util.h; do echo $f; sed -Ei 's|^#pragma once|\0\n#include <cstdint>|' "$f"; done |
| 22 | - export PROCS=$(nproc) |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 23 | - make -j $PROCS static_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w |
| 24 | - make install-static DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 25 | - end_section install_rocksdb_static |
| 26 | |
| 27 | - start_section install_rocksdb_shared "Building and installing rocksdb-shared" |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 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 | 2a0c25a | 2022-04-13 12:41:59 +0200 | [diff] [blame] | 30 | - ldconfig |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 31 | - cd .. |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 32 | - end_section rocksdb_shared |
| 33 | |
| 34 | - start_section install_collocatordb "Building and installing collocatordb" |
Marc Kupietz | b738ec7 | 2022-04-13 12:42:17 +0200 | [diff] [blame] | 35 | - git clone "https://korap.ids-mannheim.de/gerrit/ids-kl/collocatordb" |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 36 | - cd collocatordb |
| 37 | - mkdir -p build |
| 38 | - cd build |
| 39 | - cmake .. |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 40 | - make |
| 41 | - make install # && ctest --extra-verbose |
Marc Kupietz | 2a0c25a | 2022-04-13 12:41:59 +0200 | [diff] [blame] | 42 | - ldconfig |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 43 | - end_section install_collocatordb |
| 44 | - cd ../.. |
| 45 | |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 46 | script: |
Marc Kupietz | 2a93f3a | 2022-04-10 15:11:16 +0200 | [diff] [blame] | 47 | - start_section build_dereko2vec "Building and testing dereko2vec" |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 48 | - pwd |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 49 | - mkdir build |
| 50 | - cd build |
| 51 | - cmake .. |
| 52 | - make |
Marc Kupietz | 2a93f3a | 2022-04-10 15:11:16 +0200 | [diff] [blame] | 53 | - ctest --extra-verbose |
| 54 | - end_section build_dereko2vec |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 55 | |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 56 | artifacts: |
| 57 | paths: |
| 58 | - build/dereko2vec |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 59 | |