2019-01-02 03:59:41 +01:00
|
|
|
# https://aka.ms/yaml
|
|
|
|
|
jobs:
|
2019-01-02 04:40:33 +01:00
|
|
|
- job: 'Build'
|
2019-01-02 03:59:41 +01:00
|
|
|
pool:
|
|
|
|
|
vmImage: 'vs2017-win2016' # other options: 'macOS-10.13', 'ubuntu-16.04'
|
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
2019-01-02 05:45:28 +01:00
|
|
|
# Python27:
|
|
|
|
|
# python.version: '2.7'
|
|
|
|
|
Python35:
|
|
|
|
|
python.version: '3.5'
|
2019-01-02 05:50:18 +01:00
|
|
|
python.architecture: 'x64'
|
2019-01-02 05:45:28 +01:00
|
|
|
Python36:
|
|
|
|
|
python.version: '3.6'
|
2019-01-02 05:50:18 +01:00
|
|
|
python.architecture: 'x64'
|
2019-01-02 05:47:47 +01:00
|
|
|
Python37:
|
|
|
|
|
python.version: '3.7'
|
2019-01-02 05:50:18 +01:00
|
|
|
python.architecture: 'x64'
|
|
|
|
|
Python35_x86:
|
|
|
|
|
python.version: '3.5'
|
|
|
|
|
python.architecture: 'x86'
|
|
|
|
|
Python36_x86:
|
|
|
|
|
python.version: '3.6'
|
|
|
|
|
python.architecture: 'x86'
|
|
|
|
|
Python37_x86:
|
|
|
|
|
python.version: '3.7'
|
|
|
|
|
python.architecture: 'x86'
|
|
|
|
|
maxParallel: 6
|
2019-01-02 03:59:41 +01:00
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
|
inputs:
|
|
|
|
|
versionSpec: '$(python.version)'
|
2019-01-02 05:50:18 +01:00
|
|
|
architecture: '$(python.architecture)'
|
2019-01-02 03:59:41 +01:00
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
dir
|
|
|
|
|
Invoke-WebRequest -Uri "https://www.dropbox.com/s/ioax2mnic4987kn/klayout-microbits-1.0.zip?dl=1" -MaximumRedirection 2 -OutFile klayout-microbits-1.0.zip
|
|
|
|
|
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: 'Downloading and Extracting KLayout bits'
|
|
|
|
|
|
2019-01-02 05:45:28 +01:00
|
|
|
# - 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: 'Installing Microsoft Visual C++ Compiler for Python 2.7'
|
2019-01-02 04:40:33 +01:00
|
|
|
|
2019-01-02 04:11:02 +01:00
|
|
|
- script: |
|
2019-01-02 05:50:18 +01:00
|
|
|
python -m pip install --upgrade pip setuptools wheel
|
2019-01-02 04:11:02 +01:00
|
|
|
displayName: 'Updating pip, setuptools and wheel'
|
|
|
|
|
|
2019-01-02 03:59:41 +01:00
|
|
|
- script: |
|
|
|
|
|
python -V
|
2019-01-02 05:50:18 +01:00
|
|
|
set "KLAYOUT_BITS=%cd%\klayout-microbits\klayout-microbits-1.0\msvc2017\%PYTHON_ARCHITECTURE%"
|
|
|
|
|
echo KLAYOUT_BITS=%KLAYOUT_BITS%
|
2019-01-02 04:11:02 +01:00
|
|
|
python setup.py install
|
2019-01-02 06:09:27 +01:00
|
|
|
displayName: 'Build KLayout'
|
|
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
|
set PATH=%KLAYOUT_BITS%\curl\bin;%KLAYOUT_BITS%\expat\bin;%KLAYOUT_BITS%\ptw\bin;%KLAYOUT_BITS%\zlib\bin;%PATH%
|
|
|
|
|
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'
|
|
|
|
|
|
|
|
|
|
# - script : |
|
|
|
|
|
# python setup.py bdist_wheel
|
|
|
|
|
# displayName: 'Building KLayout wheel'
|
2019-01-02 04:11:02 +01:00
|
|
|
|