1 Star 0 Fork 1

龙思/klayout

forked from Danny Pan/klayout 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
azure-pipelines.yml 7.37 KB
一键复制 编辑 原始数据 按行查看 历史
Matthias Koefferlein 提交于 2022-02-05 16:04 . Updated Azure configuration
# https://aka.ms/yaml
trigger:
branches:
include:
- master
- staging
tags:
include:
- 'v*'
jobs:
- job: Build
pool:
vmImage: 'windows-2019' # 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'
cp38-cp38-win_amd64.whl:
python.version: '3.8'
python.architecture: 'x64'
cp39-cp39-win_amd64.whl:
python.version: '3.9'
python.architecture: 'x64'
cp310-cp310-win_amd64.whl:
python.version: '3.10'
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'
cp38-cp38-win32.whl:
python.version: '3.8'
python.architecture: 'x86'
cp39-cp39-win32.whl:
python.version: '3.9'
python.architecture: 'x86'
cp310-cp310-win32.whl:
python.version: '3.10'
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://www.klayout.org/downloads/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/import_lib.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 and deploy to PyPI'
dependsOn: Build
pool:
vmImage: 'windows-2019' # 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.10.x64'
inputs:
artifactName: 'wheel-3.10.x64'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.9.x64'
inputs:
artifactName: 'wheel-3.9.x64'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.8.x64'
inputs:
artifactName: 'wheel-3.8.x64'
downloadPath: '$(System.DefaultWorkingDirectory)'
- 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.10.x86'
inputs:
artifactName: 'wheel-3.10.x86'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.9.x86'
inputs:
artifactName: 'wheel-3.9.x86'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts wheel-3.8.x86'
inputs:
artifactName: 'wheel-3.8.x86'
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: 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'
- bash: |
pip install -U twine
twine upload --skip-existing $BUILD_ARTIFACTSTAGINGDIRECTORY/*
env:
TWINE_USERNAME: $(TWINE_USERNAME)
TWINE_PASSWORD: $(TWINE_PASSWORD)
TWINE_REPOSITORY_URL: $(TWINE_REPOSITORY_URL)
displayName: 'Uploading to PyPI'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/circlestriker/klayout.git
[email protected]:circlestriker/klayout.git
circlestriker
klayout
klayout
master

搜索帮助