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: |
| 8 | - rocksdb-5.11.3/ |
| 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 | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 19 | - curl -L https://github.com/facebook/rocksdb/archive/refs/tags/v5.11.3.tar.gz | tar zx |
| 20 | - cd rocksdb-5.11.3 |
| 21 | - export PROCS=$(cat /proc/cpuinfo | grep -c processor) |
| 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 | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 24 | - end_section install_rocksdb_static |
| 25 | |
| 26 | - start_section install_rocksdb_shared "Building and installing rocksdb-shared" |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 27 | - make -j $PROCS shared_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w |
| 28 | - make install-shared DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w |
Marc Kupietz | 2a0c25a | 2022-04-13 12:41:59 +0200 | [diff] [blame] | 29 | - ldconfig |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 30 | - cd .. |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 31 | - end_section rocksdb_shared |
| 32 | |
| 33 | - start_section install_collocatordb "Building and installing collocatordb" |
Marc Kupietz | b738ec7 | 2022-04-13 12:42:17 +0200 | [diff] [blame] | 34 | - git clone "https://korap.ids-mannheim.de/gerrit/ids-kl/collocatordb" |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 35 | - cd collocatordb |
| 36 | - mkdir -p build |
| 37 | - cd build |
| 38 | - cmake .. |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 39 | - make |
| 40 | - make install # && ctest --extra-verbose |
Marc Kupietz | 2a0c25a | 2022-04-13 12:41:59 +0200 | [diff] [blame] | 41 | - ldconfig |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 42 | - end_section install_collocatordb |
| 43 | - cd ../.. |
| 44 | |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 45 | script: |
Marc Kupietz | 2a93f3a | 2022-04-10 15:11:16 +0200 | [diff] [blame] | 46 | - start_section build_dereko2vec "Building and testing dereko2vec" |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 47 | - pwd |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 48 | - mkdir build |
| 49 | - cd build |
| 50 | - cmake .. |
| 51 | - make |
Marc Kupietz | 2a93f3a | 2022-04-10 15:11:16 +0200 | [diff] [blame] | 52 | - ctest --extra-verbose |
| 53 | - end_section build_dereko2vec |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 54 | |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 55 | artifacts: |
| 56 | paths: |
| 57 | - build/dereko2vec |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 58 | |