.gitlab-ci.yml 3.43 KB
Newer Older
1
2
3
include:
  - remote: 'https://gitlab.esrf.fr/silx/bob/main/raw/master/job-templates.yml'

Thomas Vincent's avatar
Thomas Vincent committed
4
stages:
5
  - build_source
Thomas Vincent's avatar
Thomas Vincent committed
6
  - build
Thomas Vincent's avatar
Thomas Vincent committed
7
8
  - test
  - deploy
9

10
11
variables:
  PROJECT: xsocs
12
  EXTRA_SETUP_PY_CMD_OPTIONS: "build --no-openmp"
Thomas Vincent's avatar
Thomas Vincent committed
13
  MANYLINUX_PYTHON_VER: cp27-cp27m cp27-cp27mu cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39
Thomas Vincent's avatar
Thomas Vincent committed
14
15
16
# Build


17
18
source:
  extends: .local_source_build
Thomas Vincent's avatar
Thomas Vincent committed
19

Thomas Vincent's avatar
Thomas Vincent committed
20

21
manylinux1_wheels:
22
  extends: .manylinux1_wheels
23
24


25
windows_wheel_python36:
26
27
28
  extends: .windows_wheel_python36


29
windows_wheel_python37:
Thomas Vincent's avatar
Thomas Vincent committed
30
  extends: .windows_wheel_python37
Thomas Vincent's avatar
Thomas Vincent committed
31
32
  only:
    - master
Thomas Vincent's avatar
Thomas Vincent committed
33
34


35
36
windows_wheel_python38:
  extends: .windows_wheel_python38
Thomas Vincent's avatar
Thomas Vincent committed
37
38
39
40
41
42
  only:
    - master


windows_wheel_python39:
  extends: .windows_wheel_python39
43
44


Thomas Vincent's avatar
Thomas Vincent committed
45
46
doc:
  stage: build
47
48
49
  tags:
    - linux
  image: python:3.7
Thomas Vincent's avatar
Thomas Vincent committed
50
51
52
53
54
  script:
    - pip install --upgrade --pre -r requirements-dev.txt
    - pip install --upgrade --pre -r requirements.txt
    # Build the doc (dependencies are needed)
    - python setup.py build build_doc
55
    - mv build/sphinx/html artifacts/doc
Thomas Vincent's avatar
Thomas Vincent committed
56
57
  artifacts:
    paths:
58
      - artifacts/doc/
Thomas Vincent's avatar
Thomas Vincent committed
59
60
    when: on_success
    expire_in: 2h
61
62
  only:
    - master
Thomas Vincent's avatar
Thomas Vincent committed
63
64


65
# Test
66

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
manylinux1_test_py27:
  stage: test
  image: python:2.7
  tags:
    - linux
  dependencies:
    - manylinux1_wheels
  before_script:
    - ls -l artifacts
  script:
    # numpy is needed to build xrayutilities
    - pip install numpy --only-binary numpy
    - pip install --find-links artifacts/ --only-binary xsocs xsocs
    - python run_tests.py --installed -v -v -v


83
84
85
86
87
88
.test_template: &test_template_defintion
  stage: test
  script:
    # numpy is needed to build xrayutilities
    - pip install --pre numpy --only-binary numpy
    - pip install --pre --find-links artifacts/ --only-binary xsocs xsocs
Thomas Vincent's avatar
Thomas Vincent committed
89
    - python run_tests.py --installed -v -v -v
90
91


92
93
.manylinux1_test:
  extends: .test_template
Thomas Vincent's avatar
Thomas Vincent committed
94
95
  tags:
    - linux
96
97
  before_script:
    - ls -l artifacts
Thomas Vincent's avatar
Thomas Vincent committed
98
  dependencies:
99
    - manylinux1_wheels
Thomas Vincent's avatar
Thomas Vincent committed
100

101
manylinux1_test_cp35:
102
103
104
  extends: .manylinux1_test
  image: python:3.5

105
manylinux1_test_cp36:
106
107
  extends: .manylinux1_test
  image: python:3.6
108
109
  only:
    - master
110

111
manylinux1_test_cp37:
112
  extends: .manylinux1_test
113
  image: python:3.7
Thomas Vincent's avatar
Thomas Vincent committed
114
115
  only:
    - master
116

Thomas Vincent's avatar
Thomas Vincent committed
117
118
119
120
121
122
123
124
125
manylinux1_test_cp38:
  extends: .manylinux1_test
  image: python:3.8
  only:
    - master

manylinux1_test_cp39:
  extends: .manylinux1_test
  image: python:3.9
126

127
windows_test_python36:
128
129
130
131
132
  <<: *test_template_defintion
  extends: .windows_base_python36
  dependencies:
    - windows_wheel_python36

133
windows_test_python37:
Thomas Vincent's avatar
Thomas Vincent committed
134
135
136
137
  <<: *test_template_defintion
  extends: .windows_base_python37
  dependencies:
    - windows_wheel_python37
Thomas Vincent's avatar
Thomas Vincent committed
138
139
  only:
    - master
Thomas Vincent's avatar
Thomas Vincent committed
140

141
142
143
144
145
windows_test_python38:
  <<: *test_template_defintion
  extends: .windows_base_python38
  dependencies:
    - windows_wheel_python38
Thomas Vincent's avatar
Thomas Vincent committed
146
147
148
149
150
151
152
153
  only:
    - master

windows_test_python39:
  <<: *test_template_defintion
  extends: .windows_base_python39
  dependencies:
    - windows_wheel_python39
154
155


Thomas Vincent's avatar
Thomas Vincent committed
156
157
158
159
160
161
162
163
164
165
166
167
168
# Deploy

pages:
  stage: deploy
  tags:
    - linux
  image: debian:stable
  before_script:
    - apt-get update
    - apt-get install --yes tree
  script:
    - rm -rf public
    # doc
169
    - mv artifacts/doc public
Thomas Vincent's avatar
Thomas Vincent committed
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
    # wheelhouse
    - mkdir public/wheels
    - cp artifacts/*.whl public/wheels
    - cp artifacts/*.tar.gz public/wheels
    # html index
    - cd public/wheels
    - tree -H '.' -h -T 'X-Socs snapshots' --noreport --charset utf-8 -o index.html
  after_script:
    - ls -Rl public
  artifacts:
    paths:
      - public
    expire_in: 1h
  only:
    - master