diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0fb0778927742460a5e723702d8af2f57f12ce8a..f6cf9647c1066e2786b9ba02b07f51abf328ad4c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,13 +21,19 @@ - apt-get update .install_wolf_template: &install_wolf_definition - - git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/wolf.git - - cd wolf + - if [ -d wolf ]; then + - echo "directory wolf exists" + - cd wolf + - git pull + - else + - git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/wolf.git + - cd wolf + - fi - mkdir -pv build - cd build - cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON .. - - make -j$(nproc) - - ctest -j$(nproc) + - make -j2 + - ctest -j2 - make install - cd ../.. @@ -35,13 +41,17 @@ - mkdir -pv build - cd build - cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON .. - - make -j$(nproc) - - ctest -j$(nproc) + - make -j2 + - ctest -j2 - make install ############ UBUNTU 16.04 TESTS ############ wolf_build_and_test:xenial: image: labrobotica/wolf_deps:16.04 + cache: + - key: wolf-xenial + paths: + - wolf/ except: - master before_script: @@ -53,6 +63,10 @@ wolf_build_and_test:xenial: ############ UBUNTU 18.04 TESTS ############ wolf_build_and_test:bionic: image: labrobotica/wolf_deps:18.04 + cache: + - key: wolf-bionic + paths: + - wolf/ except: - master before_script: