blob: 62a1ae694b869d14dd9f711784a854490a45f734 [file] [log] [blame]
image: gcc
build-and-test:
stage: build
cache:
- key: one-key-to-rule-them-all
paths:
- rocksdb/
- collocatordb/
before_script:
- pwd
- source `find .. -name section_helper.sh`
- start_section install_linux_packages "Installing missing Linux packages"
- apt update && apt -y install cmake libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libomp-dev
- end_section install_linux_packages
- start_section install_rocksdb_static "Building and installing rocksdb-static"
- git clone --branch 5.11.fb https://github.com/facebook/rocksdb.git
- cd rocksdb
- 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
- export PROCS=$(nproc)
- make -j $PROCS static_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- make install-static DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- end_section install_rocksdb_static
- start_section install_rocksdb_shared "Building and installing rocksdb-shared"
- make -j $PROCS shared_lib DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- make install-shared DISABLE_WARNING_AS_ERROR=1 WARNING_FLAGS=-w
- ldconfig
- cd ..
- end_section rocksdb_shared
- start_section install_collocatordb "Building and installing collocatordb"
- git clone "https://korap.ids-mannheim.de/gerrit/ids-kl/collocatordb"
- cd collocatordb
- mkdir -p build
- cd build
- cmake ..
- make
- make install # && ctest --extra-verbose
- ldconfig
- end_section install_collocatordb
- cd ../..
script:
- start_section build_dereko2vec "Building and testing dereko2vec"
- pwd
- mkdir build
- cd build
- cmake ..
- make
- ctest --extra-verbose
- end_section build_dereko2vec
artifacts:
paths:
- build/dereko2vec