.gitlab-ci.yml 2.66 KB
Newer Older
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
1
2
# 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.
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
3

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
4
5
6
# Definition of global variables (all stages)
variables:
  CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
7

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
8
9

# Definition of our build pipeline order
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
10
11
stages:
  - build
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
12
  - deploy
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
13
  - pypi
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
14
15


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
16
# Build targets
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
17
18
19
.build_template: &build_job
  stage: build
  before_script:
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
20
    - mkdir _ci
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
21
    - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/condapackage/gitlab/install.sh" > _ci/install.sh
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
22
    - chmod 755 _ci/install.sh
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
23
    - ./_ci/install.sh _ci condapackage #installs ci support scripts
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
24
    - ./_ci/before_build.sh
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
25
  script:
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
26
    - ./_ci/build.sh
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
27
28
29
30
31
32
33
34
35
36
37
38
  cache: &build_caches
    paths:
      - miniconda.sh
      - ${CONDA_ROOT}/pkgs/*.tar.bz2
      - ${CONDA_ROOT}/pkgs/urls.txt


.build_linux_template: &linux_build_job
  <<: *build_job
  tags:
    - docker
  image: continuumio/conda-concourse-ci
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
39
  artifacts:
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
40
    expire_in: 1 week
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
41
    paths:
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
42
      - _ci/
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
43
44
45
46
      - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
  cache:
    <<: *build_caches
    key: "linux-cache"
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
47
48


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
49
50
51
52
53
54
55
56
57
58
59
60
.build_macosx_template: &macosx_build_job
  <<: *build_job
  tags:
    - macosx
  artifacts:
    expire_in: 1 week
    paths:
      - _ci/
      - ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2
  cache:
    <<: *build_caches
    key: "macosx-cache"
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
61
62


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
63
64
65
66
build_linux_27:
  <<: *linux_build_job
  variables:
    PYTHON_VERSION: "2.7"
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
67
68


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
build_linux_36:
  <<: *linux_build_job
  variables:
    PYTHON_VERSION: "3.6"
    BUILD_EGG: "true"
  artifacts:
    expire_in: 1 week
    paths:
      - _ci/
      - dist/*.zip
      - sphinx
      - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2


build_macosx_27:
  <<: *macosx_build_job
  variables:
    PYTHON_VERSION: "2.7"

Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
88

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
89
90
91
92
build_macosx_36:
  <<: *macosx_build_job
  variables:
    PYTHON_VERSION: "3.6"
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
93

Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
94
95

# Deploy targets
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
96
97
98
.deploy_template: &deploy_job
  stage: deploy
  before_script:
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
99
    - ./_ci/install.sh _ci condapackage #updates ci support scripts
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
100
  script:
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
101
    - ./_ci/deploy.sh
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
102
  dependencies:
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
103
    - build_linux_27
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
104
105
106
    - build_linux_36
    - build_macosx_27
    - build_macosx_36
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
107
  tags:
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
108
    - deployer
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
109
110


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
111
deploy_beta:
Pavel KORSHUNOV's avatar
Pavel KORSHUNOV committed
112
  <<: *deploy_job
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
113
114
115
116
  environment: beta
  only:
    - master
    - condapackage
117
118


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
119
120
121
122
123
124
125
deploy_stable:
  <<: *deploy_job
  environment: stable
  only:
    - /^v\d+\.\d+\.\d+([abc]\d*)?$/  # PEP-440 compliant version (tags)
  except:
    - branches
126
127


Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
128
129
130
131
132
133
134
135
136
137
138
pypi:
  stage: pypi
  environment: pypi
  only:
    - /^v\d+\.\d+\.\d+([abc]\d*)?$/  # PEP-440 compliant version (tags)
  except:
    - branches
  before_script:
    - ./_ci/install.sh _ci condapackage #updates ci support scripts
  script:
    - ./_ci/pypi.sh
139
  dependencies:
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
140
    - build_linux_36
141
  tags:
Amir MOHAMMADI's avatar
Amir MOHAMMADI committed
142
    - deployer