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