From 046d6008dd35aad1d18a60a8e714c978bb6448ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu> Date: Fri, 5 Nov 2021 12:09:26 +0100 Subject: [PATCH] CI: using cache --- .gitlab-ci.yml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8b73e80..fe18cf6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,19 +21,31 @@ - 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 ../.. .install_wolfimu_template: &install_wolfimu_definition - - git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/plugins/imu.git - - cd imu + - if [ -d imu ]; then + - echo "directory imu exists" + - cd imu + - git pull + - else + - git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/plugins/imu.git + - cd imu + - fi - mkdir -pv build - cd build - cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON .. @@ -53,6 +65,13 @@ ############ UBUNTU 16.04 TESTS ############ wolf_build_and_test_none:xenial: image: labrobotica/wolf_deps:16.04 + cache: + - key: wolf-xenial + paths: + - wolf/ + - key: imu-xenial + paths: + - imu/ except: - master before_script: @@ -66,6 +85,13 @@ wolf_build_and_test_none:xenial: ############ UBUNTU 18.04 TESTS ############ wolf_build_and_test_none:bionic: image: labrobotica/wolf_deps:18.04 + cache: + - key: wolf-bionic + paths: + - wolf/ + - key: imu-bionic + paths: + - imu/ except: - master before_script: -- GitLab