Marc Kupietz | 5b6a51e | 2022-04-11 21:23:30 +0200 | [diff] [blame] | 1 | image: metacpan/metacpan-api |
| 2 | |
| 3 | build-and-test: |
| 4 | stage: build |
| 5 | before_script: |
| 6 | - pwd |
| 7 | - source `find .. -name section_helper.sh` |
| 8 | |
| 9 | - start_section install_linux_packages "Installing missing Linux packages" |
| 10 | - apt update && apt -y install cmake libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libomp-dev |
| 11 | - end_section install_linux_packages |
| 12 | |
| 13 | - start_section install_rocksdb_static "Building and installing rocksdb-static" |
| 14 | - 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 |
| 19 | - end_section install_rocksdb_static |
| 20 | |
| 21 | - start_section install_rocksdb_shared "Building and installing rocksdb-shared" |
| 22 | - 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 | - ldconfig |
| 25 | - cd .. |
| 26 | - end_section rocksdb_shared |
| 27 | |
| 28 | - start_section install_collocatordb "Building and installing collocatordb" |
| 29 | - git clone "https://korap.ids-mannheim.de/gerrit/private/collocatordb" |
| 30 | - cd collocatordb |
| 31 | - mkdir -p build |
| 32 | - cd build |
| 33 | - cmake .. |
| 34 | - make |
| 35 | - make install # && ctest --extra-verbose |
| 36 | - ldconfig |
| 37 | - end_section install_collocatordb |
| 38 | - cd ../.. |
| 39 | |
| 40 | script: |
| 41 | - start_section build_perl_dependencies "Installing Perl dependencies" |
| 42 | - cpanm https://github.com/Akron/Mojolicious-Plugin-Localize.git |
| 43 | - cpanm --installdeps . |
| 44 | - end_section build_perl_dependencies |
| 45 | |
| 46 | - start_section build_derekovecs-server "Building DeReKoVecs server" |
| 47 | - perl Makefile.PL |
| 48 | - make |
| 49 | - make install |
| 50 | - end_section build_derekovecs-server |
| 51 | |
| 52 | - start_section run_derekovecs-server "Running DeReKoVecs server" |
| 53 | - morbo script/derekovecs-server & |
| 54 | - DVPID=$! |
| 55 | - sleep 40 |
| 56 | - kill $DVPID || true |
| 57 | - end_section run_derekovecs-server |
| 58 | |