代码拉取完成,页面将自动刷新
同步操作将从 Danny Pan/klayout 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# 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/')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。