Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 1 | image: gcc |
| 2 | |
| 3 | build: |
| 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 | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 39 | - start_section install_dereko2vec "Building and installing dereko2vec" |
| 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 | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 45 | - end_section install_dereko2vec |
| 46 | |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 47 | artifacts: |
| 48 | paths: |
| 49 | - build/dereko2vec |
Marc Kupietz | 49358e1 | 2022-04-10 14:47:48 +0200 | [diff] [blame^] | 50 | - "*.so" |
| 51 | - "*.a" |
Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame] | 52 | |
Marc Kupietz | 97ada39 | 2022-04-10 14:06:00 +0200 | [diff] [blame] | 53 | cache: |
| 54 | paths: |
| 55 | - "*.o" |
| 56 | |
| 57 | # run tests using the binary built before |
| 58 | test: |
| 59 | stage: test |
| 60 | script: |
| 61 | - ctest --extra-verbose |
| 62 | |