forked from KLayout/klayout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
152 lines (140 loc) · 5.47 KB
/
azure-pipelines.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
150
151
# https://aka.ms/yaml
jobs:
- job: Build
pool:
vmImage: 'vs2017-win2016' # other options: 'macOS-10.13', 'ubuntu-16.04'
strategy:
matrix:
# Python27:
# python.version: '2.7'
cp35-cp35m-win_amd64.whl:
python.version: '3.5'
python.architecture: 'x64'
cp36-cp36m-win_amd64.whl:
python.version: '3.6'
python.architecture: 'x64'
cp37-cp37m-win_amd64.whl:
python.version: '3.7'
python.architecture: 'x64'
cp35-cp35m-win32.whl:
python.version: '3.5'
python.architecture: 'x86'
cp36-cp36m-win32.whl:
python.version: '3.6'
python.architecture: 'x86'
cp37-cp37m-win32.whl:
python.version: '3.7'
python.architecture: 'x86'
maxParallel: 6
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: '$(python.architecture)'
# Add additional tasks to run using each Python version in the matrix above
# PowerShell
# Run a PowerShell script on Windows, macOS, or Linux.
- task: PowerShell@2
inputs:
targetType: 'inline' # Optional. Options: filePath, inline
#arguments: # Optional
script: | # Required when targetType == Inline
pwd
Invoke-WebRequest -Uri "https://dl.bintray.com/lightwave-lab/klayout/klayout-microbits-1.0.zip" -OutFile klayout-microbits-1.0.zip
dir
Expand-Archive klayout-microbits-1.0.zip -DestinationPath klayout-microbits
dir klayout-microbits
#errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
#failOnStderr: false # Optional
#ignoreLASTEXITCODE: false # Optional
#pwsh: false # Optional
#workingDirectory: # Optional
displayName: 'Download and Extract KLayout bits'
# - script: |
# curl https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi -o VCForPython27.msi
# msiexec /i VCForPython27.msi /quiet
# set "VS90COMNTOOLS=C:\Users\VssAdministrator\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC"
# curl https://raw.githubusercontent.com/mattn/gntp-send/master/include/msinttypes/stdint.h -o "%VS90COMNTOOLS%\Include\stdint.h"
# dir "%VS90COMNTOOLS%\Include"
# condition: eq(variables['python.version'], '2.7')
# displayName: 'Install Microsoft Visual C++ Compiler for Python 2.7'
- script: |
python -m pip install --upgrade pip setuptools wheel
displayName: 'Update pip, setuptools and wheel'
- script: |
python -V
set "KLAYOUT_BITS=%cd%\klayout-microbits\klayout-microbits-1.0\msvc2017\%PYTHON_ARCHITECTURE%"
echo KLAYOUT_BITS=%KLAYOUT_BITS%
python setup.py bdist_wheel
displayName: 'Build KLayout'
- bash: |
bash `pwd`/ci-scripts/windows/fix_wheel.sh `pwd`/dist/*.whl "`pwd`/klayout-microbits/klayout-microbits-1.0/msvc2017/$PYTHON_ARCHITECTURE"
displayName: 'Copy klayout bits dlls into wheel'
- script: |
echo PATH=%PATH%
pip install klayout --no-index -f dist
python testdata/pymod/import_db.py
python testdata/pymod/import_rdb.py
python testdata/pymod/import_tl.py
python testdata/pymod/pya_tests.py
displayName: 'Test KLayout pymod'
- task: CopyFiles@2
condition: always()
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
contents: '**/?(*.whl)'
- task: PublishBuildArtifacts@1
condition: always()
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'wheel-$(python.version).$(python.architecture)'
- job: 'Deploy'
displayName: 'Combine Windows wheels'
dependsOn: Build
pool:
vmImage: 'vs2017-win2016' # other options: 'macOS-10.13', 'ubuntu-16.04'
steps:
- checkout: none #skip checking out the default repository resource
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.7.x64'
inputs:
artifactName: 'wheel-3.7.x64'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.6.x64'
inputs:
artifactName: 'wheel-3.6.x64'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.5.x64'
inputs:
artifactName: 'wheel-3.5.x64'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.7.x86'
inputs:
artifactName: 'wheel-3.7.x86'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.6.x86'
inputs:
artifactName: 'wheel-3.6.x86'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.5.x86'
inputs:
artifactName: 'wheel-3.5.x86'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: CopyFiles@2
condition: always()
inputs:
sourceFolder: '$(System.DefaultWorkingDirectory)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
contents: '**/?(*.whl)'
flattenFolders: true
- task: PublishBuildArtifacts@1
condition: always()
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'windows_wheels'