blob: b57bfacb719ba096d92caa78e21d8a0910cd94e7 [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:
8 - rocksdb-5.11.3/
9 - 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 Kupietz97ada392022-04-10 14:06:00 +020019 - 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 Kupietz485be1c2022-04-10 14:21:45 +020024 - end_section install_rocksdb_static
25
26 - start_section install_rocksdb_shared "Building and installing rocksdb-shared"
Marc Kupietz97ada392022-04-10 14:06:00 +020027 - 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 Kupietz2a0c25a2022-04-13 12:41:59 +020029 - ldconfig
Marc Kupietz97ada392022-04-10 14:06:00 +020030 - cd ..
Marc Kupietz485be1c2022-04-10 14:21:45 +020031 - end_section rocksdb_shared
32
33 - start_section install_collocatordb "Building and installing collocatordb"
Marc Kupietzb738ec72022-04-13 12:42:17 +020034 - git clone "https://korap.ids-mannheim.de/gerrit/ids-kl/collocatordb"
Marc Kupietz97ada392022-04-10 14:06:00 +020035 - cd collocatordb
36 - mkdir -p build
37 - cd build
38 - cmake ..
Marc Kupietz485be1c2022-04-10 14:21:45 +020039 - make
40 - make install # && ctest --extra-verbose
Marc Kupietz2a0c25a2022-04-13 12:41:59 +020041 - ldconfig
Marc Kupietz485be1c2022-04-10 14:21:45 +020042 - end_section install_collocatordb
43 - cd ../..
44
Marc Kupietz97ada392022-04-10 14:06:00 +020045 script:
Marc Kupietz2a93f3a2022-04-10 15:11:16 +020046 - start_section build_dereko2vec "Building and testing dereko2vec"
Marc Kupietz485be1c2022-04-10 14:21:45 +020047 - pwd
Marc Kupietz97ada392022-04-10 14:06:00 +020048 - mkdir build
49 - cd build
50 - cmake ..
51 - make
Marc Kupietz2a93f3a2022-04-10 15:11:16 +020052 - ctest --extra-verbose
53 - end_section build_dereko2vec
Marc Kupietz485be1c2022-04-10 14:21:45 +020054
Marc Kupietz97ada392022-04-10 14:06:00 +020055 artifacts:
56 paths:
57 - build/dereko2vec
Marc Kupietz97ada392022-04-10 14:06:00 +020058