.gitlab-ci.yml 10.5 KB
Newer Older
1
stages:
Lionel's avatar
Lionel committed
2 3 4 5
- agrum
- pyagrum
- agrum_test
- pyagrum_test
Lionel's avatar
Lionel committed
6
- wheels
7
- documentation
8

9
cache:
10
  untracked: false
11 12

################################################################################
Lionel's avatar
Lionel committed
13
# Linux / gcc
14
################################################################################
Lionel's avatar
Lionel committed
15 16 17
.linux_template: &linux_template
  only:
    - branches@agrumery/aGrUM
18
  except:
19
    - /^documentation.*$/
20 21
  tags:
    - linux
Lionel's avatar
Lionel committed
22
    - python3
Lionel's avatar
Lionel committed
23
    - gcc-5
24 25 26
  variables:
    CC: "/usr/bin/gcc-5"
    CXX: "/usr/bin/g++-5"
27
  cache:
Lionel's avatar
Lionel committed
28
    key: linux
29 30
    paths:
    - build/
31

Lionel's avatar
Lionel committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
linux_aGrUM_build:
  <<: *linux_template
  stage: agrum
  script:
    - if ! python act --no-fun lib release aGrUM --python=3; then  python act --no-fun clean ; python act --no-fun lib release aGrUM --python=3; fi

linux_pyAgrum_build:
  <<: *linux_template
  stage: pyagrum
  script:
    - if ! python act --no-fun lib release pyAgrum --python=3; then python act --no-fun clean ; python act --no-fun lib release pyAgrum --python=3; fi

linux_aGrUM_test:
  <<: *linux_template
  stage: agrum_test
  script:
    - if ! python act --no-fun test release aGrUM --python=3; then python act --no-fun clean ; python act --no-fun test release aGrUM --python=3; fi

linux_pyAgrum_test:
  <<: *linux_template
  stage: pyagrum_test
  script:
Lionel's avatar
Lionel committed
54 55 56
    - virtualenv venv --python=$(which python3)
    - source venv/bin/activate
    - pip install -r wrappers/pyAgrum/testunits/requirements.txt
Lionel's avatar
Lionel committed
57
    - if ! python act --no-fun test release pyAgrum --python=3 -t quick; then python act --no-fun clean ; python act --no-fun test release pyAgrum --python=3 -t quick; fi
Lionel's avatar
Lionel committed
58
    - deactivate
Lionel's avatar
Lionel committed
59

Lionel's avatar
Lionel committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
linux_pyagrum_wheel_i686:
  image: malichief/pyagrum_manylinux1_i686
  only:
    - tags
    - triggers
  tags:
    - linux
    - docker
    - manylinux1
  stage: wheels
  script:
    - /bin/bash wrappers/pyAgrum/wheelhouse/build_wheels.sh
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
    when: on_success
    expire_in: 1 week
    paths:
      - wheelhouse/*.whl

linux_pyagrum_wheel_x86_64:
  image: malichief/pyagrum_manylinux1_x86_64
  only:
    - tags
    - triggers
  tags:
    - linux
    - docker
    - manylinux1
  stage: wheels
  script:
    - /bin/bash wrappers/pyAgrum/wheelhouse/build_wheels.sh
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
    when: on_success
    expire_in: 1 week
    paths:
      - wheelhouse/*.whl

Lionel's avatar
Lionel committed
98 99 100
################################################################################
# MacOS / clang
################################################################################
Lionel's avatar
Lionel committed
101

Lionel's avatar
Lionel committed
102 103 104
.macos_template: &macos_template
  only:
    - branches@agrumery/aGrUM
105
  except:
106
    - /^documentation.*$/
107 108
  tags:
    - macos
Lionel's avatar
Lionel committed
109
    - python3
110 111 112
  variables:
    CC: "/usr/bin/clang"
    CXX: "/usr/bin/clang++"
113
  cache:
Lionel's avatar
Lionel committed
114
    key: macos
115 116
    paths:
    - build/
117

Lionel's avatar
Lionel committed
118 119 120
macos_aGrUM_build:
  <<: *macos_template
  stage: agrum
121
  script:
Lionel's avatar
Lionel committed
122
    - if ! python act --no-fun lib release aGrUM --python=3; then  python act --no-fun clean ; python act --no-fun lib release aGrUM --python=3; fi
123

Lionel's avatar
Lionel committed
124 125 126
macos_pyAgrum_build:
  <<: *macos_template
  stage: pyagrum
127
  script:
Lionel's avatar
Lionel committed
128
    - if ! python act --no-fun lib release pyAgrum --python=3; then python act --no-fun clean ; python act --no-fun lib release pyAgrum --python=3; fi
129

Lionel's avatar
Lionel committed
130 131 132
macos_aGrUM_test:
  <<: *macos_template
  stage: agrum_test
133
  script:
Lionel's avatar
Lionel committed
134
    - if ! python act --no-fun test release aGrUM --python=3; then python act --no-fun clean ; python act --no-fun test release aGrUM --python=3; fi
135

Lionel's avatar
Lionel committed
136 137 138
macos_pyAgrum_test:
  <<: *macos_template
  stage: pyagrum_test
139
  script:
Lionel's avatar
Lionel committed
140
    - virtualenv venv --python=$(which python3.6)
Lionel's avatar
Lionel committed
141 142
    - source venv/bin/activate
    - pip install -r wrappers/pyAgrum/testunits/requirements.txt
Lionel's avatar
Lionel committed
143
    - if ! python act --no-fun test release pyAgrum --python=3 -t quick; then python act --no-fun clean ; python act --no-fun test release pyAgrum --python=3 -t quick; fi
Lionel's avatar
Lionel committed
144
    - deactivate
145

Lionel's avatar
Lionel committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
macos_pyagrum_cp27_wheel:
  only:
    - tags
    - triggers
  tags:
    - macos
    - python3
  stage: wheels
  script:
    - rm -rf venv wheels
    - mkdir -p wheels
    - virtualenv venv --python=$(which python2.7)
    - source venv/bin/activate
    - python act release wheel pyAgrum -d ${CI_PROJECT_DIR}/wheels --python=2
    - deactivate
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
    when: on_success
    expire_in: 1 week
    paths:
      - wheels/*.whl

macos_pyagrum_cp36_wheel:
  only:
    - tags
    - triggers
  tags:
    - macos
    - python3
  stage: wheels
  script:
    - rm -rf venv wheels
    - mkdir -p wheels
    - virtualenv venv --python=$(which python3)
    - source venv/bin/activate
    - python act release wheel pyAgrum -d ${CI_PROJECT_DIR}/wheels --python=3
    - deactivate
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
    when: on_success
    expire_in: 1 week
    paths:
      - wheels/*.whl

190
################################################################################
Lionel's avatar
Lionel committed
191
# Windows / MVSC
192
################################################################################
Lionel's avatar
Lionel committed
193
.windows_template: &windows_template
194 195
  only:
    - branches@agrumery/aGrUM
196
  except:
197
    - /^documentation.*$/
198 199 200 201
  tags:
    - windows
    - conda64
  variables:
Lionel's avatar
Lionel committed
202 203
    PATH: "C:\\Program Files\\Git\\bin;C:\\Users\\conda64\\Anaconda3;C:\\Users\\conda64\\Anaconda3\\Library\\mingw-w64\\bin;C:\\Users\\conda64\\Anaconda3\\Library\\usr\\bin;C:\\Users\\conda64\\Anaconda3\\Library\\bin;C:\\Users\\conda64\\Anaconda3\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\MSBuild\\14.0\\Bin;%PATH%;"
    ACT_OPTIONS: "--no-fun --mvsc -d build"
204
  cache:
Lionel's avatar
Lionel committed
205
    key: mvsc
206 207 208
    paths:
    - build/

Lionel's avatar
Lionel committed
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
windows_aGrUM_build:
  <<: *windows_template
  stage: agrum
  script:
    - python act --no-fun install release aGrUM %ACT_OPTIONS% || python act --no-fun clean && python act --no-fun lib release aGrUM %ACT_OPTIONS%

windows_pyAgrum_build:
  <<: *windows_template
  stage: pyagrum
  script:
    - python act --no-fun install release pyAgrum %ACT_OPTIONS% || python act --no-fun clean && python act --no-fun lib release pyAgrum %ACT_OPTIONS%

windows_aGrUM_test:
  <<: *windows_template
  stage: agrum_test
  script:
    - python act --no-fun test release aGrUM %ACT_OPTIONS% || python act --no-fun clean && python act --no-fun test release aGrUM %ACT_OPTIONS%

windows_pyAgrum_test:
  <<: *windows_template
  stage: pyagrum_test
  script:
Lionel's avatar
Lionel committed
231
    - pip install -r wrappers/pyAgrum/testunits/requirements.txt
Lionel's avatar
Lionel committed
232
    - python act --no-fun test release pyAgrum %ACT_OPTIONS%  -t quick || python act --no-fun clean && python act --no-fun test release pyAgrum %ACT_OPTIONS% -t quick
Lionel's avatar
Lionel committed
233

Lionel's avatar
Lionel committed
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
windows_32_pyagrum_cp27_wheels:
  only:
    - tags
    - triggers
  tags:
    - windows
    - conda32
  stage: wheels
  variables:
    PATH: "C:\\Program Files\\Git\\bin;C:\\Users\\conda32\\Anaconda3\\envs\\py27;C:\\Users\\conda32\\Anaconda3\\envs\\py27\\Library\\bin;C:\\Users\\conda32\\Anaconda3\\envs\\py27\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\MSBuild\\14.0\\Bin;%PATH%;"
    ACT_OPTIONS: "--no-fun --mvsc32 -d build"
  script:
    - md wheels
    - python act %ACT_OPTIONS% release wheel pyAgrum -d wheels
  artifacts:
    name: "%CI_JOB_NAME%_%CI_COMMIT_REF_NAME%"
    when: on_success
    expire_in: 1 week
    untracked: true
    paths:
      - wheels\\*.whl

windows_32_pyagrum_cp36_wheels:
  only:
    - tags
    - triggers
  tags:
    - windows
    - conda32
  stage: wheels
  variables:
    PATH: "C:\\Program Files\\Git\\bin;C:\\Users\\conda32\\Anaconda3\\envs\\py36;C:\\Users\\conda32\\Anaconda3\\envs\\py36\\Library\\bin;C:\\Users\\conda32\\Anaconda3\\envs\\py36\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\MSBuild\\14.0\\Bin;%PATH%;"
    ACT_OPTIONS: "--no-fun --mvsc32 -d build"
  script:
    - md wheels
    - python act %ACT_OPTIONS% release wheel pyAgrum -d wheels
  artifacts:
    name: "%CI_JOB_NAME%_%CI_COMMIT_REF_NAME%"
    when: on_success
    expire_in: 1 week
    untracked: true
    paths:
      - wheels\\*.whl

windows_64_pyagrum_cp27_wheels:
  only:
    - tags
    - triggers
  tags:
    - windows
    - conda64
  stage: wheels
  variables:
    PATH: "C:\\Program Files\\Git\\bin;C:\\Users\\conda64\\Anaconda3\\envs\\py27;C:\\Users\\conda64\\Anaconda3\\envs\\py27\\Library\\bin;C:\\Users\\conda64\\Anaconda3\\envs\\py27\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\MSBuild\\14.0\\Bin;%PATH%;"
    ACT_OPTIONS: "--no-fun --mvsc -d build"
  script:
    - md wheels
    - python act %ACT_OPTIONS% release wheel pyAgrum -d wheels
  artifacts:
    name: "%CI_JOB_NAME%_%CI_COMMIT_REF_NAME%"
    when: on_success
    expire_in: 1 week
    untracked: true
    paths:
      - wheels\\*.whl

windows_64_pyagrum_cp36_wheels:
  only:
    - tags
    - triggers
  tags:
    - windows
    - conda64
  stage: wheels
  variables:
    PATH: "C:\\Program Files\\Git\\bin;C:\\Users\\conda64\\Anaconda3\\envs\\py36;C:\\Users\\conda64\\Anaconda3\\envs\\py36\\Library\\bin;C:\\Users\\conda64\\Anaconda3\\envs\\py36\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\MSBuild\\14.0\\Bin;%PATH%;"
    ACT_OPTIONS: "--no-fun --mvsc -d build"
  script:
    - md wheels
    - python act %ACT_OPTIONS% release wheel pyAgrum -d wheels
  artifacts:
    name: "%CI_JOB_NAME%_%CI_COMMIT_REF_NAME%"
    when: on_success
    expire_in: 1 week
    untracked: true
    paths:
      - wheels\\*.whl
321 322 323 324 325 326

################################################################################
# pyAgrum Documentation
################################################################################
pyAgrum_documentation:
  only:
327
    - branches@agrumery/aGrUM
328 329 330
  tags:
    - linux
    - python3
331
    - deploy_ovh
332 333 334 335 336 337 338 339 340 341 342 343 344 345
  variables:
    CC: "/usr/bin/gcc-5"
    CXX: "/usr/bin/g++-5"
  cache:
    key: linux
    paths:
    - build/
  stage: documentation
  script:
    - virtualenv venv --python=python3
    - source venv/bin/activate
    - pip install -r wrappers/pyAgrum/testunits/requirements.txt
    - pip install sphinx
    - python act doc pyAgrum --python=3
Lionel's avatar
Lionel committed
346
    - deploy_ovh "build/release/wrappers/pyAgrum/docs/html" "www/pyAgrum/last/${CI_COMMIT_REF_NAME}"
Lionel's avatar
Lionel committed
347 348 349 350 351 352 353 354

pyAgrum_documentation_tags:
  only:
    - tags
  tags:
    - linux
    - python3
    - deploy_ovh
355
  cache:
Lionel's avatar
Lionel committed
356 357 358 359 360 361 362 363 364 365 366 367 368 369
  variables:
    CC: "/usr/bin/gcc-5"
    CXX: "/usr/bin/g++-5"
  cache:
    key: linux
    paths:
    - build/
  stage: documentation
  script:
    - virtualenv venv --python=python3
    - source venv/bin/activate
    - pip install -r wrappers/pyAgrum/testunits/requirements.txt
    - pip install sphinx
    - python act doc pyAgrum --python=3
Lionel's avatar
Lionel committed
370 371
    - deploy_ovh "build/release/wrappers/pyAgrum/docs/html" "www/pyAgrum/tags/${CI_COMMIT_TAG}"
    - deploy_ovh "build/release/wrappers/pyAgrum/docs/html" "www/pyAgrum/last"
Lionel's avatar
Lionel committed
372