From 9f9d8e577a74dcb8eba06fe23456424601bc7097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Fri, 26 Jan 2018 13:11:44 +0100 Subject: [PATCH] Add gitlab CI config file --- .gitlab-ci.yml | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..dcd30d288 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,85 @@ +image: segaleran/ceres + +cache: + key: "$CI_COMMIT_REF_NAME" + untracked: true + paths: + - build + - bin + - lib + +before_script: + - ls + - apt-get update + - apt-get install -y build-essential cmake + +# SPDLOG +# - apt-get install -y libspdlog-dev + - if [ -d spdlog ]; then + - echo "directory exists" + - if [ "$(ls -A ./spdlog)" ]; then + - echo "directory not empty" + - cd spdlog + - git pull + - else + - echo "directory empty" + - git clone https://github.com/gabime/spdlog.git + - cd spdlog + - fi + - else + - echo "directory inexistent" + - git clone https://github.com/gabime/spdlog.git + - cd spdlog + - fi + - mkdir -pv build + - cd build + - ls + - cmake -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fPIC" -DSPDLOG_BUILD_TESTING=OFF .. + - make install + - cd ../.. + +# YAML +# - apt-get install -y libyaml-cpp-dev + - if [ -d yaml-cpp ]; then + - echo "directory exists" + - if [ "$(ls -A ./yaml-cpp)" ]; then + - echo "directory not empty" + - cd yaml-cpp + - git pull + - else + - echo "directory empty" + - git clone https://github.com/jbeder/yaml-cpp.git + - cd yaml-cpp + - fi + - else + - echo "directory inexistent" + - git clone https://github.com/jbeder/yaml-cpp.git + - cd yaml-cpp + - fi + - mkdir -pv build + - cd build + - ls + - cmake -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fPIC" -DYAML_CPP_BUILD_TESTS=OFF .. + - make install + - cd ../.. + +wolf_build: + stage: build + only: + - renameFixPose + - master + script: + - mkdir -pv build + - cd build + - ls # we can check whether the directory was already full + - cmake -DCMAKE_BUILD_TYPE=release .. + - make + +wolf_test: + stage: test + only: + - renameFixPose + - master + script: + - cd build + - ctest -- GitLab