blob: 62a1ae694b869d14dd9f711784a854490a45f734 [file] [log] [blame]
Marc Kupietz97ada392022-04-10 14:06:00 +02001image: gcc
2
Marc Kupietz2a93f3a2022-04-10 15:11:16 +02003build-and-test:
Marc Kupietz97ada392022-04-10 14:06:00 +02004 stage: build
Marc Kupietz2a0c25a2022-04-13 12:41:59 +02005 cache:
6 - key: one-key-to-rule-them-all
7 paths:
Marc Kupietz6eab2f42023-12-21 11:15:14 +01008 - rocksdb/
Marc Kupietz2a0c25a2022-04-13 12:41:59 +02009 - collocatordb/
Marc Kupietz97ada392022-04-10 14:06:00 +020010 before_script:
Marc Kupietz485be1c2022-04-10 14:21:45 +020011 - pwd
12 - source `find .. -name section_helper.sh`
13
14 - start_section install_linux_packages "Installing missing Linux packages"
Marc Kupietz97ada392022-04-10 14:06:00 +020015 - apt update && apt -y install cmake libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libomp-dev
Marc Kupietz485be1c2022-04-10 14:21:45 +020016 - end_section install_linux_packages
17
18 - start_section install_rocksdb_static "Building and installing rocksdb-static"
Marc Kupietz6eab2f42023-12-21 11:15:14 +010019 - 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 Kupietz97ada392022-04-10 14:06:00 +020023 - 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 Kupietz485be1c2022-04-10 14:21:45 +020025 - end_section install_rocksdb_static
26
27 - start_section install_rocksdb_shared "Building and installing rocksdb-shared"
Marc Kupietz97ada392022-04-10 14:06:00 +020028 - 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 Kupietz2a0c25a2022-04-13 12:41:59 +020030 - ldconfig
Marc Kupietz97ada392022-04-10 14:06:00 +020031 - cd ..
Marc Kupietz485be1c2022-04-10 14:21:45 +020032 - end_section rocksdb_shared
33
34 - start_section install_collocatordb "Building and installing collocatordb"
Marc Kupietzb738ec72022-04-13 12:42:17 +020035 - git clone "https://korap.ids-mannheim.de/gerrit/ids-kl/collocatordb"
Marc Kupietz97ada392022-04-10 14:06:00 +020036 - cd collocatordb
37 - mkdir -p build
38 - cd build
39 - cmake ..
Marc Kupietz485be1c2022-04-10 14:21:45 +020040 - make
41 - make install # && ctest --extra-verbose
Marc Kupietz2a0c25a2022-04-13 12:41:59 +020042 - ldconfig
Marc Kupietz485be1c2022-04-10 14:21:45 +020043 - end_section install_collocatordb
44 - cd ../..
45
Marc Kupietz97ada392022-04-10 14:06:00 +020046 script:
Marc Kupietz2a93f3a2022-04-10 15:11:16 +020047 - start_section build_dereko2vec "Building and testing dereko2vec"
Marc Kupietz485be1c2022-04-10 14:21:45 +020048 - pwd
Marc Kupietz97ada392022-04-10 14:06:00 +020049 - mkdir build
50 - cd build
51 - cmake ..
52 - make
Marc Kupietz2a93f3a2022-04-10 15:11:16 +020053 - ctest --extra-verbose
54 - end_section build_dereko2vec
Marc Kupietz485be1c2022-04-10 14:21:45 +020055
Marc Kupietz97ada392022-04-10 14:06:00 +020056 artifacts:
57 paths:
58 - build/dereko2vec
Marc Kupietz97ada392022-04-10 14:06:00 +020059