.gitlab-ci.yml 3.99 KB
Newer Older
Payno's avatar
Payno committed
1

payno's avatar
payno committed
2
stages:
3
  - build
payno's avatar
payno committed
4
  - test
5
  - deploy
6 7 8 9 10

variables:
  http_proxy: http://proxy.esrf.fr:3128
  https_proxy: http://proxy.esrf.fr:3128
  no_proxy: .esrf.fr,localhost
11
  ORANGE_WEB_LOG: 'False'
12 13


payno's avatar
payno committed
14 15
doc:
  stage: build
16
  image: docker-registry.esrf.fr/dau/tomwer:python3.8_buster_pyqt5_sphinx
17 18 19 20
  tags:
    - linux
  before_script:
    - arch
payno's avatar
payno committed
21
    - which python
22 23 24
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
payno's avatar
payno committed
25 26
    - rm -rf artifacts
    - mkdir artifacts
27 28 29 30
  script:
    - source ./ci/install_scripts.sh
    - install_orange3
    - install_anyqt 'master'
payno's avatar
payno committed
31
    - install_bliss
32
    - python -m pip install -r requirements-dev.txt
33 34
    - python -m pip install -r requirements-test.txt
    - python -m pip install fabio --upgrade --pre
payno's avatar
payno committed
35
    - python -m pip install silx --upgrade --pre
payno's avatar
payno committed
36 37
    # for now we need to install nabu from sources
    - install_nabu_master
payno's avatar
payno committed
38
    - python -m pip install jupyterlab
39
    - python -m pip install Sphinx
payno's avatar
payno committed
40 41
    - python -m pip install nbsphinx
    - python -m pip install pandoc
42 43 44 45 46 47 48 49 50 51 52
    - python setup.py build build_doc
    - mv build/sphinx/html artifacts/doc
  artifacts:
    paths:
      - artifacts/doc/
    when: on_success
    expire_in: 2h
  only:
    - master


payno's avatar
payno committed
53 54
.build_template: &test_linux_template
  stage: test
payno's avatar
payno committed
55
  before_script:
Payno's avatar
test_CI  
Payno committed
56
    - arch
payno's avatar
payno committed
57
    - export PYTHONPATH="${PYTHONPATH}:/usr/lib/python3/dist-packages/"
Payno's avatar
test_CI  
Payno committed
58
    - export LD_LIBRARY_PATH=/lib/i386-linux-gnu/:${LD_LIBRARY_PATH}
59
    - export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}
60
    - export ORANGE_WEB_LOG='False'
Payno's avatar
Payno committed
61 62 63
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
payno's avatar
payno committed
64
    - python -m pip install numpy --upgrade
Payno's avatar
Payno committed
65
    - python -m pip install matplotlib
payno's avatar
payno committed
66
  script:
67
    - source ./ci/install_scripts.sh
payno's avatar
payno committed
68
    - install_orange3
69
    - install_anyqt 'master'
payno's avatar
payno committed
70
    - install_bliss
71
    - python -m pip install -r requirements-dev.txt
72
    - python -m pip install -r requirements-test.txt
73
    - python -m pip install fabio --upgrade --pre
payno's avatar
payno committed
74
    - python -m pip install PyQt5==5.11.3
payno's avatar
payno committed
75
    - python -m pip install silx --upgrade --pre
payno's avatar
payno committed
76 77
    # for now we need to install nabu from sources
    - install_nabu_master
78
    - python -m pip install .
Payno's avatar
test_CI  
Payno committed
79
    - python -m tomwer --help
80
    - /usr/bin/xvfb-run --server-args="-screen 0 1024x768x24" -a python -m tomwer test -v --no-orange-workflows
Payno's avatar
Payno committed
81 82


payno's avatar
payno committed
83 84
test:python3.7_stretch_pyqt5:
  image: docker-registry.esrf.fr/dau/tomwer:python3.7_stretch_pyqt5
payno's avatar
payno committed
85
  <<: *test_linux_template
86 87


88
test:test-tomwer-tutorials:
payno's avatar
payno committed
89
  stage: test
90
  image: docker-registry.esrf.fr/dau/tomwer:python3.7_buster_pyqt5
payno's avatar
payno committed
91
  before_script:
92 93 94 95 96 97
    - arch
    - export PYTHONPATH="${PYTHONPATH}:/usr/lib/python3/dist-packages/"
    - export LD_LIBRARY_PATH=/lib/i386-linux-gnu/:${LD_LIBRARY_PATH}
    - export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}
    - export ORANGE_WEB_LOG='False'
    - python --version
payno's avatar
payno committed
98
    - source ./ci/install_scripts.sh
99 100 101 102 103 104
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
    - python -m pip install numpy --upgrade
    - python -m pip install matplotlib
    - python -m pip install jupyter_client
    - python -m pip install nbconvert
105
    - python -m pip install ipykernel
payno's avatar
payno committed
106
    - install_bliss
payno's avatar
payno committed
107
    - python -m pip install -r requirements-dev.txt
108
    - python -m pip install -r requirements-test.txt
109
    - python -m pip install fabio --upgrade --pre
payno's avatar
payno committed
110
    - python -m pip install silx --upgrade --pre
payno's avatar
payno committed
111 112
    # for now we need to install nabu from sources
    - install_nabu_master
113
    - python -m pip install .
114 115
    - mkdir tmp_dir
    - cd tmp_dir
payno's avatar
payno committed
116
  script:
117
    - /usr/bin/xvfb-run --server-args="-screen 0 1024x768x24" -a jupyter nbconvert --to notebook --execute ../doc/tutorials/workflow_operation.ipynb
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136


# deploy
pages:
  stage: deploy
  tags:
    - linux
  image: docker-registry.esrf.fr/dau/tomwer:python3.7_buster_pyqt5
  script:
    - rm -rf public
    # doc
    - mv artifacts/doc public
  after_script:
    - ls -Rl public
  artifacts:
    paths:
      - public
    expire_in: 1h
  only:
payno's avatar
payno committed
137
    - master, 0.5