加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
azure-pipelines.yml 4.60 KB
一键复制 编辑 原始数据 按行查看 历史
jobs:
- job: vs2019
timeoutInMinutes: 90
strategy:
matrix:
x64-win2019:
vmImage: windows-2019
VS_VER: "16"
PLATFORM: "x64"
ARTIFACT_PATH: "gtk/x64/release"
x86-win2019:
vmImage: windows-2019
VS_VER: "16"
PLATFORM: "x86"
ARTIFACT_PATH: "gtk/Win32/release"
pool:
vmImage: $(vmImage)
variables:
CACHE_DIR: $(Pipeline.Workspace)\_download_cache
MSYS2_ROOT: $(System.Workfolder)\msys64
BUILD_DIR: $(System.Workfolder)\gtk-build
PYTHONUNBUFFERED: 1
steps:
- task: Cache@2
inputs:
key: 'mycache | $(vmImage) | $(Build.SourceVersion)'
restoreKeys: |
mycache | $(vmImage)
mycache
path: $(CACHE_DIR)
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
# The git directory contains cygwin binaries conflicting with MSYS2
- script: |
rmdir "C:\Program Files\Git" /s /q
displayName: Remove GIT
- script: |
choco config set cacheLocation %CACHE_DIR%
choco install --no-progress msys2 --params="/InstallDir:%MSYS2_ROOT% /NoPath"
displayName: Install MSYS2
- script: |
python.exe build.py build --build-dir=%BUILD_DIR% --msys-dir=%MSYS2_ROOT% --archives-download-dir=%CACHE_DIR% --platform=%PLATFORM% --vs-ver=%VS_VER% -k --enable-gi --py-wheel --py-egg --python-ver 3.7 glib
displayName: gvsbuild
- task: ArchiveFiles@2
displayName: Archive release
inputs:
rootFolderOrFile: $(BUILD_DIR)\$(ARTIFACT_PATH)
includeRootFolder: false
archiveFile: '$(Build.ArtifactStagingDirectory)/gvsbuild-vs$(VS_VER)-$(PLATFORM).zip'
- task: PublishBuildArtifacts@1
displayName: Publish packages
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/gvsbuild-vs$(VS_VER)-$(PLATFORM).zip'
artifactName: gvsbuild-vs$(VS_VER)-$(PLATFORM)
- job: vs2017
timeoutInMinutes: 90
strategy:
matrix:
x64-win2016:
vmImage: vs2017-win2016
VS_VER: "15"
PLATFORM: "x64"
ARTIFACT_PATH: "gtk/x64/release"
x86-win2016:
vmImage: vs2017-win2016
VS_VER: "15"
PLATFORM: "x86"
ARTIFACT_PATH: "gtk/Win32/release"
pool:
vmImage: $(vmImage)
variables:
CACHE_DIR: $(Pipeline.Workspace)\_download_cache
MSYS2_ROOT: $(System.Workfolder)\msys64
BUILD_DIR: $(System.Workfolder)\gtk-build
PYTHONUNBUFFERED: 1
AZP_CACHING_CONTENT_FORMAT: 'Files' # https://github.com/microsoft/azure-pipelines-agent/issues/2595
steps:
- task: Cache@2
inputs:
key: 'mycache | $(vmImage) | $(Build.SourceVersion)'
restoreKeys: |
mycache | $(vmImage)
mycache
path: $(CACHE_DIR)
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
# The git directory contains cygwin binaries conflicting with MSYS2
- script: |
rmdir "C:\Program Files\Git" /s /q
displayName: Remove GIT
- script: |
choco config set cacheLocation %CACHE_DIR%
choco install --no-progress msys2 --params="/InstallDir:%MSYS2_ROOT% /NoPath"
displayName: Install MSYS2
- script: |
python.exe build.py build --build-dir=%BUILD_DIR% --msys-dir=%MSYS2_ROOT% --archives-download-dir=%CACHE_DIR% --platform=%PLATFORM% --vs-ver=%VS_VER% -k --enable-gi --py-wheel --py-egg --python-ver 3.7 enchant gtk gtk3-full pycairo pygobject lz4
python.exe build.py build --build-dir=%BUILD_DIR% --msys-dir=%MSYS2_ROOT% --archives-download-dir=%CACHE_DIR% --platform=%PLATFORM% --vs-ver=%VS_VER% -k --fast-build --clean-built --py-wheel --py-egg --python-ver 3.6 pycairo pygobject
python.exe build.py build --build-dir=%BUILD_DIR% --msys-dir=%MSYS2_ROOT% --archives-download-dir=%CACHE_DIR% --platform=%PLATFORM% --vs-ver=%VS_VER% -k --fast-build --clean-built --py-wheel --py-egg --python-ver 3.5 pycairo pygobject
displayName: gvsbuild
- task: ArchiveFiles@2
displayName: Archive release
inputs:
rootFolderOrFile: $(BUILD_DIR)\$(ARTIFACT_PATH)
includeRootFolder: false
archiveFile: '$(Build.ArtifactStagingDirectory)/gvsbuild-vs$(VS_VER)-$(PLATFORM).zip'
- task: PublishBuildArtifacts@1
displayName: Publish packages
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/gvsbuild-vs$(VS_VER)-$(PLATFORM).zip'
artifactName: gvsbuild-vs$(VS_VER)-$(PLATFORM)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化