---
include:
  - project: 'tango-controls/gitlab-ci-templates'
    file:
      - 'ArchiveWithSubmodules.gitlab-ci.yml'
      - 'cpp.gitlab-ci.yml'

variables:
  GIT_SUBMODULE_STRATEGY: recursive
  CMAKE_CUSTOM_ARGS: "-DTango_ROOT=/home/tango"

workflow:
  rules:
    - if: $CI_MERGE_REQUEST_IID
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

build-linux:
  rules:
    # FileDbDs only supports cppTango 10 onwards
    - if: '$VERSION == "lts"'
      when: never
    - if: '$VERSION == "9.5.0"'
      when: never
    - if: "$VERSION"
      variables:
        CMAKE_CXX_FLAGS: ''
      when: on_success
