1stages:
2- build
3- deploy
4
5################################################################################
6# Linux / gcc
7################################################################################
8
9linux_agrum_11:
10  image: agrumery/ubuntu-11
11  tags:
12    - docker
13    - linux
14  cache:
15    key: linux
16    paths:
17      - build/
18  stage: build
19  script:
20    - python3 act clean
21    - python3 act --no-fun test release aGrUM -j halfexcept1
22
23linux_pyagrum:
24  image: agrumery/ubuntu
25  tags:
26    - docker
27    - linux
28  cache:
29    key: linux
30    paths:
31      - build/
32  stage: build
33  script:
34    - python3 act clean
35    - pip3 install -r wrappers/pyAgrum/testunits/requirements.txt
36    - python3 act --no-fun test release pyAgrum -j halfexcept1 -t quick
37
38################################################################################
39# Linux / gcc merge requests
40################################################################################
41linux_agrum_merge_requests:
42  image: agrumery/ubuntu
43  only:
44    - merge_requests
45  tags:
46    - docker
47    - linux
48  cache:
49    key: linux
50    paths:
51      - build/
52  stage: build
53  script:
54    - python3 act clean
55    - python3 act --no-fun test release aGrUM -j halfexcept1
56
57linux_agrum_merge_requests_11:
58  image: agrumery/ubuntu-11
59  only:
60    - merge_requests
61  tags:
62    - docker
63    - linux
64  cache:
65    key: linux
66    paths:
67      - build/
68  stage: build
69  script:
70    - python3 act clean
71    - python3 act --no-fun test release aGrUM -j halfexcept1
72
73linux_pyagrum_merge_requests:
74  only:
75    - merge_requests
76  image: agrumery/ubuntu
77  tags:
78    - docker
79    - linux
80  cache:
81    key: linux
82    paths:
83      - build/
84  stage: build
85  script:
86    - python3 act clean
87    - pip3 install -r wrappers/pyAgrum/testunits/requirements.txt
88    - python3 act --no-fun test release pyAgrum -j halfexcept1 -t quick
89
90################################################################################
91# MacOS / clang
92################################################################################
93macos_agrum:
94  only:
95    - master@agrumery/aGrUM
96    - web@agrumery/aGrUM
97    - merge_requests
98  tags:
99    - macos
100    - conda
101  variables:
102    CC: "/usr/bin/clang"
103    CXX: "/usr/bin/clang++"
104  stage: build
105  cache:
106    key: macos
107    paths:
108      - build/
109  script:
110    - . /Users/agrum/miniconda3/etc/profile.d/conda.sh
111    - conda activate py37
112    - python act clean
113    - python act --no-fun test release aGrUM -j halfexcept1
114    - conda deactivate
115
116macos_pyagrum:
117  only:
118    - master@agrumery/aGrUM
119    - web@agrumery/aGrUM
120    - merge_requests
121  tags:
122    - macos
123    - conda
124  variables:
125    CC: "/usr/bin/clang"
126    CXX: "/usr/bin/clang++"
127  stage: build
128  cache:
129    key: macos
130    paths:
131      - build/
132  script:
133    - . /Users/agrum/miniconda3/etc/profile.d/conda.sh
134    - conda activate py37
135    - python act clean
136    - python act --no-fun test release pyAgrum -t quick -j halfexcept1
137    - conda deactivate
138
139################################################################################
140# Windows / MVSC
141################################################################################
142
143windows_agrum_2015:
144  only:
145   - master@agrumery/aGrUM
146   - web@agrumery/aGrUM
147   - merge_requests
148  tags:
149    - windows
150    - conda
151    - agrumerie2
152  variables:
153    PATH: $PATH_64_MVSC15_AGRUMERIE2
154  cache:
155    key: mvsc
156    paths:
157      - build/
158  stage: build
159  script:
160    - call conda.bat create -n "gitlab-ci-%CI_JOB_ID%" -c conda-forge python=3.7
161    - call conda.bat activate "gitlab-ci-%CI_JOB_ID%"
162    - call conda.bat install -y -c conda-forge --file wrappers\pyAgrum\testunits\requirements.txt
163    - call conda.bat install -y -c conda-forge cmake
164    - python act clean
165    - python act --no-fun --windows=mvsc15 -d build -j except1 test release aGrUM
166    - call conda.bat deactivate
167    - call conda.bat remove -n "gitlab-ci-%CI_JOB_ID%" --all --force -y
168  retry: 1
169
170windows_pyagrum_2015:
171  only:
172   - master@agrumery/aGrUM
173   - web@agrumery/aGrUM
174   - merge_requests
175  tags:
176    - windows
177    - conda
178    - agrumerie2
179  variables:
180    PATH: $PATH_64_MVSC15_AGRUMERIE2
181  cache:
182    key: mvsc
183    paths:
184      - build/
185  stage: build
186  script:
187    - call conda.bat create -n "gitlab-ci-%CI_JOB_ID%" -c conda-forge python=3.7
188    - call conda.bat activate "gitlab-ci-%CI_JOB_ID%"
189    - call conda.bat install -y -c conda-forge --file wrappers\pyAgrum\testunits\requirements.txt
190    - call conda.bat install -y -c conda-forge cmake
191    - python act clean
192    - python act --no-fun test release pyAgrum --no-fun --windows=mvsc15 -d build -j except1 -t quick
193    - call conda.bat deactivate
194    - call conda.bat remove -n "gitlab-ci-%CI_JOB_ID%" --all --force -y
195  retry: 1
196
197windows_agrum_2019:
198  only:
199    - master@agrumery/aGrUM
200    - web@agrumery/aGrUM
201    - merge_requests
202  tags:
203    - windows
204    - conda
205    - agrumerie2
206  variables:
207    PATH: $PATH_64_MVSC19_AGRUMERIE2
208  cache:
209    key: mvsc19
210    paths:
211      - build/
212  stage: build
213  script:
214    - call conda.bat create -n "gitlab-ci-%CI_JOB_ID%" python=3.7
215    - call conda.bat activate "gitlab-ci-%CI_JOB_ID%"
216    - call conda.bat install -y -c conda-forge --file wrappers\pyAgrum\testunits\requirements.txt
217    - call conda.bat install -y -c conda-forge cmake
218    - python act clean
219    - python act --no-fun test release aGrUM --no-fun --windows=mvsc19 -d build -j halfexcept1
220    - call conda.bat deactivate
221    - call conda.bat remove -n "gitlab-ci-%CI_JOB_ID%" --all --force -y
222  retry: 2
223
224windows_pyagrum_2019:
225  only:
226   - master@agrumery/aGrUM
227   - web@agrumery/aGrUM
228   - merge_requests
229  tags:
230    - windows
231    - conda
232    - agrumerie2
233  variables:
234    PATH: $PATH_64_MVSC19_AGRUMERIE2
235  cache:
236    key: mvsc19
237    paths:
238      - build/
239  stage: build
240  script:
241    - call conda.bat create -n "gitlab-ci-%CI_JOB_ID%" python=3.7
242    - call conda.bat activate "gitlab-ci-%CI_JOB_ID%"
243    - call conda.bat install -y -c conda-forge --file wrappers\pyAgrum\testunits\requirements.txt
244    - call conda.bat install -y -c conda-forge cmake
245    - python act clean
246    - python act --no-fun test release pyAgrum --no-fun --windows=mvsc19 -d build -j halfexcept1 -t quick
247    - call conda.bat deactivate
248    - call conda.bat remove -n "gitlab-ci-%CI_JOB_ID%" --all --force -y
249  retry: 2
250
251################################################################################
252# Deploy  wheels
253################################################################################
254linux_build:
255  image: agrumery/ubuntu
256  only:
257    - tags@agrumery/aGrUM
258  tags:
259    - docker
260    - linux
261  cache:
262    key: linux
263    paths:
264      - build/
265  stage: deploy
266  script:
267    - apt-get install -y curl
268    - curl -X POST -F token=${AGRUM_DEPLOY_TOKEN} -F ref=master -F "variables[AGRUM_TAG]=${CI_COMMIT_TAG}" -F "variables[AGRUM_BUILD]=1" -F "variables[DEPLOY_TO_PYPI]=TRUE" -F "variables[DEPLOY_DOC]=TRUE"  https://gitlab.com/api/v4/projects/4935470/trigger/pipeline
269  retry: 1
270