.gitlab-ci.yml 1.37 KB
Newer Older
payno's avatar
payno committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

stages:
  - build
  - test
  - deploy

variables:
  http_proxy: http://proxy.esrf.fr:3128
  https_proxy: http://proxy.esrf.fr:3128
  no_proxy: .esrf.fr,localhost

doc:
  stage: build
  image: python:3.7-buster
  tags:
    - linux
  before_script:
    - arch
    - which python
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
payno's avatar
payno committed
23
    - python -m pip install sphinx
payno's avatar
payno committed
24
    - git submodule update --init --recursive
payno's avatar
payno committed
25
26
27
    - rm -rf artifacts
    - mkdir artifacts
  script:
28
29
    - python setup.py build
    - python setup.py build_sphinx
payno's avatar
payno committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    - mv build/sphinx/html artifacts/doc
  artifacts:
    paths:
      - artifacts/doc/
    when: on_success
    expire_in: 2h
  only:
    - master


.build_template: &test_linux_template
  stage: test
  before_script:
    - arch
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
payno's avatar
payno committed
47
    - git submodule update --init --recursive
payno's avatar
payno committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
  script:
    - python -m pip install .
    - python run_tests.py -v


test:python3.5-stretch-pyqt5:
  image: python:3.7-buster
  <<: *test_linux_template

# deploy
pages:
  stage: deploy
  tags:
    - linux
  image: python:3.7-buster
  script:
    - rm -rf public
    # doc
    - mv artifacts/doc public
  after_script:
    - ls -Rl public
  artifacts:
    paths:
      - public
    expire_in: 1h
  only:
    - master