variables:
  GIT_SSL_NO_VERIFY: "true"
  GIT_SUBMODULE_STRATEGY: "recursive"
  GIT_DEPTH: "3"
  NAMESPACE: stack-of-tasks
  PROJECT: pinocchio
  REGISTRY: eur0c.laas.fr:5000
  IMAGE: "${REGISTRY}/${NAMESPACE}/${PROJECT}"

cache:
  paths:
    - build/ccache


.robotpkg-pinocchio: &robotpkg-pinocchio
  variables:
    ROBOTPKG: pinocchio
    CATEGORY: wip
  before_script:
    - mkdir -p build/ccache
    - cd build
    - export CCACHE_BASEDIR=${PWD}
    - export CCACHE_DIR=${PWD}/ccache
  script:
    - cd /root/robotpkg/${CATEGORY}/${ROBOTPKG}
    - git pull
    - echo "MASTER_REPOSITORY = git ${CI_PROJECT_DIR}" >> Makefile
    - echo "REPOSITORY.pinocchio = git ${CI_PROJECT_DIR}" >> /opt/openrobots/etc/robotpkg.conf
    - make checkout
    - make install
    - cd work.*/${PROJECT}*/
    - make check
    - make doc
  except:
    - gh-pages


robotpkg-pinocchio-14.04:
  <<: *robotpkg-pinocchio
  image: ${IMAGE}:14.04

robotpkg-pinocchio-16.04:
  <<: *robotpkg-pinocchio
  image: ${IMAGE}:16.04

robotpkg-pinocchio-17.10:
  <<: *robotpkg-pinocchio
  image: ${IMAGE}:17.10

robotpkg-pinocchio-dubnium:
  <<: *robotpkg-pinocchio
  image: ${IMAGE}:dubnium
