SkiaSharp/scripts/azure-pipelines.yml

292 строки
9.4 KiB
YAML
Исходник Обычный вид История

trigger:
- master
variables:
FEATURE_NAME_PREFIX: 'feature/'
VERBOSITY: normal
GIT_SHA: $(Build.SourceVersion)
GIT_BRANCH_NAME: $(Build.SourceBranchName)
BUILD_NUMBER: $[counter('$(Build.SourceBranchName)_counter', 1)]
FEATURE_NAME: ''
BASE_LINUX_PACKAGES: curl mono-complete msbuild
NATIVE_LINUX_PACKAGES: $(BASE_LINUX_PACKAGES) python git libfontconfig1-dev clang-3.8 make
TIZEN_LINUX_PACKAGES: $(BASE_LINUX_PACKAGES) python git openjdk-8-jdk zip libxcb-xfixes0 libxcb-render-util0 libwebkitgtk-1.0-0 libxcb-image0 acl libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 libsm6 gettext rpm2cpio cpio bridge-utils openvpn
MANAGED_LINUX_PACKAGES: $(BASE_LINUX_PACKAGES) dotnet-sdk-2.1 ttf-ancient-fonts
MONO_VERSION: 5_16_0
XCODE_VERSION: 10.1
resources:
repositories:
- repository: xamarin-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
jobs:
# NATIVE JOBS - WINDOWS
- template: azure-templates-bootstrapper.yml
parameters:
name: native_android_windows
displayName: Build Native Android (Windows)
vmImage: vs2017-win2016
target: externals-android
- template: azure-templates-bootstrapper.yml
parameters:
name: native_tizen_windows
displayName: Build Native Tizen (Windows)
vmImage: vs2017-win2016
target: externals-tizen
- template: azure-templates-bootstrapper.yml
parameters:
name: native_uwp_windows
displayName: Build Native UWP (Windows)
vmImage: vs2017-win2016
target: externals-uwp
- template: azure-templates-bootstrapper.yml
parameters:
name: native_win32_windows
displayName: Build Native Win32 (Windows)
vmImage: vs2017-win2016
target: externals-windows
# NATIVE JOBS - MAC
- template: azure-templates-bootstrapper.yml
parameters:
name: native_android_macos
displayName: Build Native Android (macOS)
vmImage: macos-10.13
target: externals-android
- template: azure-templates-bootstrapper.yml
parameters:
name: native_ios_macos
displayName: Build Native iOS (macOS)
vmImage: macos-10.13
target: externals-ios
- template: azure-templates-bootstrapper.yml
parameters:
name: native_macos_macos
displayName: Build Native macOS (macOS)
vmImage: macos-10.13
target: externals-macos
- template: azure-templates-bootstrapper.yml
parameters:
name: native_tizen_macos
displayName: Build Native Tizen (macOS)
vmImage: macos-10.13
target: externals-tizen
- template: azure-templates-bootstrapper.yml
parameters:
name: native_tvos_macos
displayName: Build Native tvOS (macOS)
vmImage: macos-10.13
target: externals-tvos
- template: azure-templates-bootstrapper.yml
parameters:
name: native_watchos_macos
displayName: Build Native watchOS (macOS)
vmImage: macos-10.13
target: externals-watchos
# NATIVE JOBS - LINUX
- job: native_linux_linux
displayName: Build Native Linux (Linux)
pool:
vmImage: ubuntu-16.04
container: ubuntu:14.04
steps:
2019-02-15 00:04:20 +03:00
- checkout: self
submodules: recursive
- bash: |
sudo apt update
sudo apt install -y apt-transport-https
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install -y $NATIVE_LINUX_PACKAGES
displayName: Install any package dependencies
- bash: ./bootstrapper.sh -t externals-linux -v $VERBOSITY
displayName: Run the bootstrapper for externals-linux
env:
CC: clang-3.8
CXX: clang++-3.8
- task: PublishPipelineArtifact@0
displayName: Publish the native_linux_linux artifacts
inputs:
artifactName: native_linux_linux
targetPath: 'output'
- template: azure-templates-bootstrapper.yml
parameters:
name: native_tizen_linux
displayName: Build Native Tizen (Linux)
vmImage: ubuntu-16.04
packages: $(TIZEN_LINUX_PACKAGES)
target: externals-tizen
# MANAGED JOBS
- template: azure-templates-bootstrapper.yml
parameters:
name: managed_windows
displayName: Build Managed (Windows)
vmImage: vs2017-win2016
target: libs-only
dependsOn:
- native_android_windows
- native_tizen_windows
- native_uwp_windows
- native_win32_windows
- template: azure-templates-bootstrapper.yml
parameters:
name: managed_macos
displayName: Build Managed (macOS)
vmImage: macos-10.13
target: libs-only
dependsOn:
- native_android_macos
- native_ios_macos
- native_macos_macos
- native_tizen_macos
- native_tvos_macos
- native_watchos_macos
- template: azure-templates-bootstrapper.yml
parameters:
name: managed_linux
displayName: Build Managed (Linux)
vmImage: ubuntu-16.04
packages: $(MANAGED_LINUX_PACKAGES)
target: libs-only
dependsOn:
- native_linux_linux
- native_tizen_linux
# PACKAGING JOBS
- template: azure-templates-bootstrapper.yml
parameters:
name: package
displayName: Package NuGets
vmImage: vs2017-win2016
target: nuget-only
dependsOn:
- managed_linux
- managed_macos
- managed_windows
preBuildSteps:
- powershell: |
if ($env:GIT_BRANCH_NAME.StartsWith($env:FEATURE_NAME_PREFIX)) {
$feature = $env:GIT_BRANCH_NAME.Substring($env:FEATURE_NAME_PREFIX.Length)
Write-Host "##vso[task.setvariable variable=FEATURE_NAME]$feature"
}
postBuildSteps:
- task: PublishBuildArtifacts@1
inputs:
artifactName: native
pathToPublish: 'output/native'
- task: PublishBuildArtifacts@1
inputs:
artifactName: nuget
pathToPublish: 'output/nugets'
2019-02-15 00:04:20 +03:00
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- job: signing
displayName: Signing NuGets
dependsOn: package
pool:
name: VSEng-XamarinCustom
demands:
- corpnet
2019-02-15 00:04:20 +03:00
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
steps:
- checkout: none
- template: sign-artifacts.yml@xamarin-templates
2019-02-15 00:04:20 +03:00
parameters:
targetFolder: 'output/signed'
- task: PublishPipelineArtifact@0
inputs:
artifactName: nuget-signed
targetPath: 'output/signed'
# TEST JOBS
- template: azure-templates-bootstrapper.yml
parameters:
name: tests_windows
displayName: Tests (Windows)
vmImage: vs2017-win2016
target: tests-only
dependsOn:
- package
postBuildSteps:
- task: PublishTestResults@2
inputs:
testResultsFormat: xUnit
testResultsFiles: 'output/tests/**/*.xml'
- template: azure-templates-bootstrapper.yml
parameters:
name: tests_macos
displayName: Tests (macOS)
vmImage: macos-10.13
target: tests-only
dependsOn:
- package
postBuildSteps:
- task: PublishTestResults@2
inputs:
testResultsFormat: xUnit
testResultsFiles: 'output/tests/**/*.xml'
- template: azure-templates-bootstrapper.yml
parameters:
name: tests_linux
displayName: Tests (Linux)
vmImage: ubuntu-16.04
packages: $(MANAGED_LINUX_PACKAGES)
target: tests-only
dependsOn:
- package
postBuildSteps:
- task: PublishTestResults@2
inputs:
testResultsFormat: xUnit
testResultsFiles: 'output/tests/**/*.xml'
# SAMPLES JOBS
2019-02-15 00:04:20 +03:00
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- template: azure-templates-bootstrapper.yml
parameters:
name: samples_windows
displayName: Build Samples (Windows)
vmImage: vs2017-win2016
target: samples
dependsOn:
- managed_windows
- template: azure-templates-bootstrapper.yml
parameters:
name: samples_macos
displayName: Build Samples (macOS)
vmImage: macos-10.13
target: samples
dependsOn:
- managed_macos
preBuildSteps:
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'SkiaSharp iOS Certificate.p12'
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'SkiaSharp Mac Certificate.p12'
- task: InstallAppleProvisioningProfile@1
inputs:
provProfileSecureFile: 'SkiaSharp iOS Provisioning.mobileprovision'
- task: InstallAppleProvisioningProfile@1
inputs:
provProfileSecureFile: 'SkiaSharp Mac Provisioning.provisionprofile'
- task: InstallAppleProvisioningProfile@1
inputs:
provProfileSecureFile: 'SkiaSharp tvOS Provisioning.mobileprovision'
- template: azure-templates-bootstrapper.yml
parameters:
name: samples_linux
displayName: Build Samples (Linux)
vmImage: ubuntu-16.04
packages: $(MANAGED_LINUX_PACKAGES)
target: samples
dependsOn:
- managed_linux