gitlab-ci.yml 1.21 KB
Newer Older
1
2
3
variables:
  GIT_SUBMODULE_STRATEGY: "recursive"
  GIT_DEPTH: "3"
4
5
  NAMESPACE: {{ project.main_namespace.slug }}
  PROJECT: {{ project }}
6
7
  REGISTRY: {{ project.registry }}
  IMAGE: "${REGISTRY}/${NAMESPACE}/${PROJECT}"
Guilhem Saurel's avatar
typo    
Guilhem Saurel committed
8
  CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
9
  CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
10
11
12

cache:
  paths:
13
    - ccache
14

15
{% for robotpkg in project.robotpkg_set.all %}
Guilhem Saurel's avatar
Guilhem Saurel committed
16
.robotpkg-{{ robotpkg }}: &robotpkg-{{ robotpkg }}
17
18
19
  variables:
    ROBOTPKG: {{ robotpkg }}
    CATEGORY: {{ robotpkg.category }}
20
21
  except:
    - gh-pages
22
  before_script:
23
    - mkdir -p ccache
24
25
  script:
    - cd /root/robotpkg/${CATEGORY}/${ROBOTPKG}
Guilhem Saurel's avatar
Guilhem Saurel committed
26
    - git pull
27
28
    - make checkout MASTER_REPOSITORY="dir ${CI_PROJECT_DIR}"
    - make install
Guilhem Saurel's avatar
Guilhem Saurel committed
29
    - cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
30
    {% if project.tests %}- make check{% endif %}
Guilhem Saurel's avatar
Guilhem Saurel committed
31
32
    {% if project.docs %}- make doc
    - mv doc/doxygen-html ${CI_PROJECT_DIR}{% endif %}
33
34

{% for image in robotpkg.valid_images %}
Guilhem Saurel's avatar
Guilhem Saurel committed
35
36
robotpkg-{{ image }}:
  <<: *robotpkg-{{ robotpkg }}
37
  image: ${IMAGE}:{{ image.get_target_display }}
Guilhem Saurel's avatar
typo    
Guilhem Saurel committed
38
{% if project.docs and image.get_target_display == '16.04' %}  artifacts:
39
40
    expire_in: 1 day
    paths:
Guilhem Saurel's avatar
Guilhem Saurel committed
41
      - doxygen-html/
42
{% endif %}
43
{% endfor %}
44
{% endfor %}