forked from dougthor42/wafer_map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
149 lines (128 loc) · 4 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
stages:
- init
- test
- tag_deploy
- cleanup
variables:
VENV_ROOT: C:\temp\builds
VENV_PY27: C:\temp\builds\python27_x32
VENV_PY35: C:\temp\builds\python35_x64
# Set environment vars
before_script:
- REM ==================== Before Script ====================
# Create the build dir environment variable.
- set BUILD_DIR=%VENV_PY35%\%CI_PROJECT_ID%
- set BUILD_DIR=%BUILD_DIR%__%CI_PROJECT_NAMESPACE%
- set BUILD_DIR=%BUILD_DIR%__%CI_PROJECT_NAME%
- set BUILD_DIR=%BUILD_DIR%__%CI_PIPELINE_ID%
- set BUILD_DIR=%BUILD_DIR%__%CI_COMMIT_REF_NAME%
- echo %BUILD_DIR%
# And also for Py27
- set BUILD_DIR27=%VENV_PY27%\%CI_PROJECT_ID%
- set BUILD_DIR27=%BUILD_DIR27%__%CI_PROJECT_NAMESPACE%
- set BUILD_DIR27=%BUILD_DIR27%__%CI_PROJECT_NAME%
- set BUILD_DIR27=%BUILD_DIR27%__%CI_PIPELINE_ID%
- set BUILD_DIR27=%BUILD_DIR27%__%CI_COMMIT_REF_NAME%
- echo %BUILD_DIR27%
- REM ~~~~~~~~~~~~~~~~~~~~ End Before Script ~~~~~~~~~~~~~~~~~~~~
# Clear pip cache because it sometimes causes issues.
- rd /S /Q C:\Users\tph-buildbot\AppData\Local\pip\Cache
#################################################
### Python35_x64 jobs ###
#################################################
python35_x64-pip-install:
stage: init
when: always
tags:
- python-windows
script:
- "REM ==================== pip-install ===================="
- call C:\WinPython35\scripts\env.bat
- python -m venv --clear %BUILD_DIR%
- call %BUILD_DIR%\Scripts\activate.bat
# Can't upgrade pip in place.
# See https://github.com/pypa/pip/issues/1299#issuecomment-188198496
- python -m pip install --upgrade --no-cache-dir pip setuptools wheel
- python -m pip install -r requirements.txt --no-cache-dir
- python -m pip install -r dev-requirements.txt --no-cache-dir
python35_x64-tests:
stage: test
when: on_success
tags:
- python-windows
script:
- call C:\WinPython35\scripts\env.bat
- call %BUILD_DIR%\Scripts\activate.bat
- pytest -ra wafer_map --cov wafer_map --cov-report term
python35_x64-tag_bundle:
stage: tag_deploy
when: on_success
tags:
- python-windows
only:
- tags
script:
- call C:\WinPython35\scripts\env.bat
- call %BUILD_DIR%\Scripts\activate.bat
- python setup.py bdist_wheel
artifacts:
paths:
- dist/*.whl
python35_x64-clean-up:
stage: cleanup
when: always
tags:
- python-windows
script:
- rd /S /Q %BUILD_DIR%
#################################################
### Python27_x32 jobs ###
#################################################
python27_x32-pip-install:
stage: init
when: always
tags:
- python-windows
script:
- REM ==================== pip-install ====================
- call C:\WinPython27_x32\scripts\env.bat
- python -m pip install virtualenv
- python -m virtualenv --clear %BUILD_DIR27% --no-pip --no-setuptools --no-wheel
- call %BUILD_DIR27%\Scripts\activate.bat
# Python27 hangs
- python "C:\temp\builds\get-pip.py" --no-index --find-links="C:\temp\builds"
# Can't upgrade pip in place.
# See https://github.com/pypa/pip/issues/1299#issuecomment-188198496
- python -m pip install --upgrade --no-cache-dir pip setuptools wheel
- python -m pip install -r requirements.txt --no-cache-dir
- python -m pip install -r dev-requirements.txt --no-cache-dir
python27_x32-tests:
stage: test
when: on_success
tags:
- python-windows
script:
- call C:\WinPython27_x32\scripts\env.bat
- call %BUILD_DIR27%\Scripts\activate.bat
- pytest -ra wafer_map --cov wafer_map --cov-report term
python27_x32-tag_bundle:
stage: tag_deploy
when: on_success
tags:
- python-windows
only:
- tags
script:
- call C:\WinPython27_x32\scripts\env.bat
- call %BUILD_DIR27%\Scripts\activate.bat
- python setup.py bdist_wheel
artifacts:
paths:
- dist/*.whl
python27_x32-clean-up:
stage: cleanup
when: always
tags:
- python-windows
script:
- rd /S /Q %BUILD_DIR27%