blob: c564afb80975d7de54cbb270f3fef113904f0c73 [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
5 before_script:
Marc Kupietz485be1c2022-04-10 14:21:45 +02006 - pwd
7 - source `find .. -name section_helper.sh`
8
9 - start_section install_linux_packages "Installing missing Linux packages"
Marc Kupietz97ada392022-04-10 14:06:00 +020010 - 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 +020011 - end_section install_linux_packages
12
13 - start_section install_rocksdb_static "Building and installing rocksdb-static"
Marc Kupietz97ada392022-04-10 14:06:00 +020014 - 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 Kupietz485be1c2022-04-10 14:21:45 +020019 - end_section install_rocksdb_static
20
21 - start_section install_rocksdb_shared "Building and installing rocksdb-shared"
Marc Kupietz97ada392022-04-10 14:06:00 +020022 - 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 Kupietz485be1c2022-04-10 14:21:45 +020025 - end_section rocksdb_shared
26
27 - start_section install_collocatordb "Building and installing collocatordb"
Marc Kupietz97ada392022-04-10 14:06:00 +020028 - git clone "https://korap.ids-mannheim.de/gerrit/private/collocatordb"
29 - cd collocatordb
30 - mkdir -p build
31 - cd build
32 - cmake ..
Marc Kupietz485be1c2022-04-10 14:21:45 +020033 - make
34 - make install # && ctest --extra-verbose
35 - end_section install_collocatordb
36 - cd ../..
37
Marc Kupietz97ada392022-04-10 14:06:00 +020038 script:
Marc Kupietz2a93f3a2022-04-10 15:11:16 +020039 - start_section build_dereko2vec "Building and testing dereko2vec"
Marc Kupietz485be1c2022-04-10 14:21:45 +020040 - pwd
Marc Kupietz97ada392022-04-10 14:06:00 +020041 - mkdir build
42 - cd build
43 - cmake ..
44 - make
Marc Kupietz2a93f3a2022-04-10 15:11:16 +020045 - ctest --extra-verbose
46 - end_section build_dereko2vec
Marc Kupietz485be1c2022-04-10 14:21:45 +020047
Marc Kupietz97ada392022-04-10 14:06:00 +020048 artifacts:
49 paths:
50 - build/dereko2vec
Marc Kupietz97ada392022-04-10 14:06:00 +020051