.gitlab-ci.yml 1.87 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# This build file uses template features from YAML so it is generic enough for
# any Bob project. Don't modify it unless you know what you're doing.

# Definition of global variables (all stages)
variables:
  CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"


# Definition of our build pipeline order
stages:
  - build
  - deploy


# Build targets
.build_template: &build_job
  stage: build
  before_script:
    - mkdir _ci
    - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
    - chmod 755 _ci/install.sh
    - ./_ci/install.sh _ci master #installs ci support scripts
    - ./_ci/before_build.sh
    - ./before_build.sh
  script:
    - ./_ci/build.sh
  after_script:
    - ./_ci/after_build.sh
  cache: &build_caches
    paths:
      - miniconda.sh
      - ${CONDA_ROOT}/pkgs/*.tar.bz2
      - ${CONDA_ROOT}/pkgs/urls.txt


36
.build_macosx_template: &macosx_build_job
37 38
  <<: *build_job
  tags:
39
    - macosx
40 41 42 43
  artifacts:
    expire_in: 1 week
    paths:
      - _ci/
44
      - ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2
45 46
  cache:
    <<: *build_caches
47
    key: "macosx-cache"
48 49


50 51
build_macosx_36:
  <<: *macosx_build_job
52 53 54 55 56 57 58 59 60
  variables:
    GITLAB_CHECKOUT_STRATEGY: "https://gitlab-ci-token:${CI_BUILD_TOKEN}@gitlab.idiap.ch/"
    PYTHON_VERSION: "3.6"
    BUILD_EGG: "true"
  artifacts:
    expire_in: 1 week
    paths:
      - _ci/
      - sphinx
61
      - ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2
62 63 64 65 66 67 68 69 70 71


# Deploy targets
.deploy_template: &deploy_job
  stage: deploy
  before_script:
    - ./_ci/install.sh _ci master #updates ci support scripts
  script:
    - ./_ci/deploy.sh
  dependencies:
72
    - build_macosx_36
73 74 75 76 77 78 79 80 81
  tags:
    - deployer


deploy_beta:
  <<: *deploy_job
  environment: beta
  only:
    - master
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
82
    - new
83 84 85 86 87 88 89 90


deploy_stable:
  <<: *deploy_job
  environment: stable
  only:
    - /^v\d+\.\d+\.\d+([abc]\d*)?$/  # PEP-440 compliant version (tags)
  except:
91
    - branches