blob: e829496c9c21053a678330da60fb099edc68c510 [file] [log] [blame]
Marc Kupietz97ada392022-04-10 14:06:00 +02001image: gcc
2
3build:
4 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 Kupietz485be1c2022-04-10 14:21:45 +020039 - start_section install_dereko2vec "Building and installing dereko2vec"
40 - pwd
Marc Kupietz97ada392022-04-10 14:06:00 +020041 - mkdir build
42 - cd build
43 - cmake ..
44 - make
Marc Kupietz485be1c2022-04-10 14:21:45 +020045 - end_section install_dereko2vec
46
Marc Kupietz97ada392022-04-10 14:06:00 +020047 artifacts:
48 paths:
49 - build/dereko2vec
Marc Kupietz49358e12022-04-10 14:47:48 +020050 - "*.so"
51 - "*.a"
Marc Kupietz485be1c2022-04-10 14:21:45 +020052
Marc Kupietz97ada392022-04-10 14:06:00 +020053 cache:
54 paths:
55 - "*.o"
56
57# run tests using the binary built before
58test:
59 stage: test
60 script:
61 - ctest --extra-verbose
62