basalt/.gitlab-ci.yml

132 lines
2.5 KiB
YAML
Raw Normal View History

2019-04-14 21:07:42 +02:00
image: vladyslavusenko/b_image:latest
2019-04-15 17:38:58 +02:00
stages:
- build
- test
- test_results
- deploy
2019-04-14 21:07:42 +02:00
compile:
stage: build
variables:
CXX_MARCH: 'corei7-avx'
before_script:
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
2019-04-18 11:29:31 +02:00
tags:
- docker
2019-04-14 21:07:42 +02:00
cache:
2019-04-15 23:20:46 +02:00
key: bionic
2019-04-14 21:07:42 +02:00
paths:
- ccache/
script:
- ./scripts/update_submodules.sh
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCXX_MARCH=${CXX_MARCH} -DCMAKE_INSTALL_PREFIX=/usr/
- make -j3
- make package
- cd test/
- ctest -V
- cd ../../
- mkdir deb_bionic
- cp build/*.deb deb_bionic/
artifacts:
paths:
- deb_bionic/*.deb
2019-04-15 17:38:58 +02:00
- scripts/eval_full/*
2019-04-14 21:07:42 +02:00
expire_in: 1 week
compile_16_04:
stage: build
2019-04-15 17:38:58 +02:00
variables:
CXX_MARCH: 'corei7-avx'
2019-04-14 21:07:42 +02:00
before_script:
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
2019-04-18 11:29:31 +02:00
tags:
- docker
2019-04-14 21:07:42 +02:00
cache:
2019-04-15 23:20:46 +02:00
key: xenial
2019-04-14 21:07:42 +02:00
paths:
- ccache/
script:
- ./scripts/update_submodules.sh
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCXX_MARCH=${CXX_MARCH} -DCMAKE_INSTALL_PREFIX=/usr/
- make -j3
- make package
- cd test/
- ctest -V
- cd ../../
- mkdir deb_xenial
- cp build/*.deb deb_xenial/
artifacts:
paths:
- deb_xenial/*.deb
expire_in: 1 week
only:
- master
image: vladyslavusenko/b_image_xenial:latest
2019-04-15 17:38:58 +02:00
eval_euroc:
stage: test
parallel: 10
tags:
2019-04-18 11:29:31 +02:00
- dataset-eval
2019-04-15 17:38:58 +02:00
variables:
GIT_STRATEGY: none
only:
- master
artifacts:
paths:
- scripts/eval_full/eval_results/*
expire_in: 1 week
script:
- dpkg -i deb_bionic/*.deb
- cd scripts/eval_full
- ./run_evaluations.sh
gen_results_euroc:
stage: test_results
variables:
GIT_STRATEGY: none
when: on_success
2019-04-18 13:39:31 +02:00
tags:
- docker
2019-04-15 17:38:58 +02:00
only:
- master
artifacts:
paths:
- euroc_results.txt
script:
- cd scripts/eval_full
- ./gen_results.py eval_results > euroc_results.txt
- cat euroc_results.txt
- mv euroc_results.txt ../../
2019-04-14 21:07:42 +02:00
deploy:
stage: deploy
2019-04-18 13:39:31 +02:00
tags:
- docker
2019-04-14 21:07:42 +02:00
before_script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
variables:
GIT_STRATEGY: none
only:
- master
script:
2019-04-18 12:57:20 +02:00
- scp $SCP_FLAGS deb_xenial/*.deb $REPOSITORY_URL/xenial/
- scp $SCP_FLAGS deb_bionic/*.deb $REPOSITORY_URL/bionic/
2019-04-14 21:07:42 +02:00