SkiaSharp/scripts/azure-pipelines.yml

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

trigger:
- main
2020-04-28 22:45:19 +03:00
- develop
- patch/*
2020-03-10 00:57:56 +03:00
pr:
- main
2020-04-28 22:45:19 +03:00
- develop
- patch/*
2020-03-10 00:57:56 +03:00
variables:
SKIASHARP_VERSION: 2.88.0
FEATURE_NAME_PREFIX: 'feature/'
VERBOSITY: normal
GIT_SHA: $(Build.SourceVersion)
GIT_BRANCH_NAME: $(Build.SourceBranch)
GIT_URL: $(Build.Repository.Uri)
FEATURE_NAME: ''
2020-06-05 16:46:06 +03:00
PREVIEW_LABEL: 'preview'
2021-07-27 01:36:47 +03:00
BUILD_NUMBER: $[counter(format('_{0}_{1}_{2}__', variables['SKIASHARP_VERSION'], variables['Build.SourceBranch'], variables['PREVIEW_LABEL']), 1)]
TIZEN_LINUX_PACKAGES: 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
2020-07-20 13:21:44 +03:00
MANAGED_LINUX_PACKAGES: ttf-ancient-fonts ninja-build
MONO_VERSION_MACOS: '6_12_7'
MONO_VERSION_LINUX: ''
XCODE_VERSION: 12.4
DOTNET_VERSION_PREVIOUS: 3.1.413
DOTNET_VERSION: 5.0.401
DOTNET_VERSION_PREVIEW: 6.0.100
2021-10-28 19:38:56 +03:00
DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.101/preview.10.json'
VS_VERSION_PREVIEW: 17/pre
CONFIGURATION: 'Release'
VM_IMAGE_WINDOWS: windows-2022
VM_IMAGE_WINDOWS_PREVIOUS: windows-2019
2020-07-20 13:21:44 +03:00
VM_IMAGE_MAC: macOS-10.15
VM_IMAGE_LINUX: ubuntu-18.04
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
THROW_ON_TEST_FAILURE: true
2020-05-20 10:39:06 +03:00
NUGET_DIFF_PRERELEASE: false
2020-06-25 18:30:34 +03:00
ENABLE_CODE_COVERAGE: true
EMSCRIPTEN_VERSION: 2.0.23
2021-08-19 07:43:33 +03:00
XHARNESS_VERSION: 1.0.0-prerelease.21404.1
2021-10-28 19:38:56 +03:00
XAMARIN_ANDROID_WINDOWS_URL: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/5343278/d17-0/6b0e6b265390832dcfb499e9e1e893c462548a30/signed/Xamarin.Android.Sdk-12.1.0.5.vsix
XAMARIN_ANDROID_MACOS_URL: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/5343278/d17-0/6b0e6b265390832dcfb499e9e1e893c462548a30/xamarin.android-12.1.0.5.pkg
resources:
repositories:
- repository: xamarin-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
2020-12-27 15:47:09 +03:00
ref: refs/heads/main
stages:
- stage: prepare
displayName: Prepare Build
jobs:
- job: prepare # Prepare Build
displayName: Prepare Build
pool:
2020-07-20 13:21:44 +03:00
vmImage: $(VM_IMAGE_LINUX)
steps:
- checkout: none
- template: azure-templates-variables.yml
parameters:
updateBuild: true
- stage: native_windows
displayName: Native Windows
dependsOn: prepare
jobs:
- template: azure-templates-bootstrapper.yml # Build Native Android|x86 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_android_x86_windows
displayName: Android x86
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-android
additionalArgs: --buildarch=x86
installWindowsSdk: false
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Android|x64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_android_x64_windows
displayName: Android x64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-android
additionalArgs: --buildarch=x64
installWindowsSdk: false
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Android|arm (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_android_arm_windows
displayName: Android arm
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-android
additionalArgs: --buildarch=arm
installWindowsSdk: false
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Android|arm64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_android_arm64_windows
displayName: Android arm64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-android
additionalArgs: --buildarch=arm64
installWindowsSdk: false
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Tizen (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_tizen_windows
displayName: Tizen
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-tizen
installWindowsSdk: false
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build ANGLE UWP|x86 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_angle_x86_windows
displayName: ANGLE x86
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: ANGLE
additionalArgs: -Script .\native\uwp\build.cake --buildarch=x86
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build ANGLE UWP|x64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_angle_x64_windows
displayName: ANGLE x64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: ANGLE
additionalArgs: -Script .\native\uwp\build.cake --buildarch=x64
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build ANGLE UWP|arm (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_angle_arm_windows
displayName: ANGLE arm
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: ANGLE
additionalArgs: -Script .\native\uwp\build.cake --buildarch=arm
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build ANGLE UWP|arm64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_angle_arm64_windows
displayName: ANGLE arm64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: ANGLE
additionalArgs: -Script .\native\uwp\build.cake --buildarch=arm64
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native UWP|x86 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_x86_windows
displayName: UWP x86
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-uwp
additionalArgs: --buildarch=x86 --skipAngle=true
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native UWP|x64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_x64_windows
displayName: UWP x64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-uwp
additionalArgs: --buildarch=x64 --skipAngle=true
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native UWP|arm (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_arm_windows
displayName: UWP arm
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-uwp
additionalArgs: --buildarch=arm --skipAngle=true
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native UWP|arm64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_uwp_arm64_windows
displayName: UWP arm64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-uwp
additionalArgs: --buildarch=arm64 --skipAngle=true
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Win32|x86 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_win32_x86_windows
displayName: Win32 x86
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-windows
additionalArgs: --buildarch=x86
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Win32|x64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_win32_x64_windows
displayName: Win32 x64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-windows
additionalArgs: --buildarch=x64
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Win32|arm64 (Win)
parameters:
name: native_win32_arm64_windows
displayName: Win32 arm64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
target: externals-windows
additionalArgs: --buildarch=arm64
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native NanoServer|x64 (Win)
2020-06-20 22:12:43 +03:00
parameters:
name: native_win32_x64_nanoserver_windows
displayName: Nano Server x64
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-20 22:12:43 +03:00
target: externals-nanoserver
additionalArgs: --buildarch=x64
2021-08-09 00:28:10 +03:00
artifactName: native
2020-06-25 18:14:30 +03:00
tools:
- nano-api-scan
- stage: native_macos
displayName: Native macOS
dependsOn: prepare
jobs:
2020-06-20 22:12:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Native Android|x86 (macOS)
parameters:
name: native_android_x86_macos
displayName: Android x86
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-android
additionalArgs: --buildarch=x86
- template: azure-templates-bootstrapper.yml # Build Native Android|x64 (macOS)
parameters:
name: native_android_x64_macos
displayName: Android x64
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-android
additionalArgs: --buildarch=x64
- template: azure-templates-bootstrapper.yml # Build Native Android|arm (macOS)
parameters:
name: native_android_arm_macos
displayName: Android arm
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-android
additionalArgs: --buildarch=arm
- template: azure-templates-bootstrapper.yml # Build Native Android|arm64 (macOS)
parameters:
name: native_android_arm64_macos
displayName: Android arm64
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-android
additionalArgs: --buildarch=arm64
- template: azure-templates-bootstrapper.yml # Build Native iOS (macOS)
parameters:
name: native_ios_macos
displayName: iOS
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-ios
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Mac Catalyst (macOS)
parameters:
name: native_maccatalyst_macos
displayName: Mac Catalyst
vmImage: $(VM_IMAGE_MAC)
target: externals-maccatalyst
2021-08-09 00:28:10 +03:00
artifactName: native
2020-06-20 22:12:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Native macOS (macOS)
parameters:
name: native_macos_macos
displayName: macOS
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-macos
2021-08-09 00:28:10 +03:00
artifactName: native
2020-06-20 22:12:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Native tvOS (macOS)
parameters:
name: native_tvos_macos
displayName: tvOS
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-tvos
2021-08-09 00:28:10 +03:00
artifactName: native
2020-06-20 22:12:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Native watchOS (macOS)
parameters:
name: native_watchos_macos
displayName: watchOS
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: externals-watchos
2021-08-09 00:28:10 +03:00
artifactName: native
- template: azure-templates-bootstrapper.yml # Build Native Tizen (macOS)
parameters:
name: native_tizen_macos
displayName: Tizen
vmImage: $(VM_IMAGE_MAC)
target: externals-tizen
condition: false # TODO: TIZEN INSTALL BUGS
- stage: native_linux
displayName: Native Linux
dependsOn: prepare
jobs:
- template: azure-templates-linux-matrix.yml # Build Native Linux (Linux)
parameters:
2021-08-09 00:28:10 +03:00
artifactName: native
builds:
- name: ''
- name: nodeps
desc: 'No Deps'
additionalArgs: --verifyExcluded=fontconfig
gnArgs: skia_use_fontconfig=false
matrix:
- arch: x64
docker: scripts/Docker/debian9/amd64
- arch: x64
variant: alpine
docker: scripts/Docker/alpine/amd64
- arch: arm
docker: scripts/Docker/debian9/clang-cross
target: externals-linux-clang-cross
- arch: arm64
docker: scripts/Docker/debian9/clang-cross
dockerArgs: --build-arg TOOLCHAIN_ARCH=aarch64-linux-gnu --build-arg TOOLCHAIN_ARCH_SHORT=arm64
target: externals-linux-clang-cross
- template: azure-templates-bootstrapper.yml # Build Native Tizen (Linux)
parameters:
name: native_tizen_linux
displayName: Tizen
vmImage: $(VM_IMAGE_LINUX)
packages: $(TIZEN_LINUX_PACKAGES)
target: externals-tizen
- stage: native_wasm
displayName: Native WASM
dependsOn: prepare
jobs:
- template: azure-templates-wasm-matrix.yml # Build Native WASM (Linux)
parameters:
2021-08-09 00:28:10 +03:00
artifactName: native
emscripten:
- 2.0.5
- 2.0.6
- 2.0.9
- 2.0.11
- 2.0.12
- 2.0.23
2020-06-25 23:28:43 +03:00
- stage: managed
displayName: Build Managed
dependsOn:
- native_windows
- native_macos
- native_linux
- native_wasm
2020-06-25 23:28:43 +03:00
jobs:
- template: azure-templates-bootstrapper.yml # Build Managed (Windows)
parameters:
name: managed_windows
displayName: Managed (Windows)
2020-06-25 23:28:43 +03:00
vmImage: $(VM_IMAGE_WINDOWS)
target: libs
additionalArgs: --skipExternals="all"
2020-06-25 23:28:43 +03:00
requiredArtifacts:
2021-08-09 00:28:10 +03:00
- native
artifactName: managed
postBuildSteps:
- pwsh: Remove-Item ./output/native/ -Recurse -Force -ErrorAction Continue
displayName: Delete the native folder
2020-06-25 23:28:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Managed (macOS)
parameters:
name: managed_macos
displayName: Managed (macOS)
2020-06-25 23:28:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: libs
additionalArgs: --skipExternals="all"
2020-06-25 23:28:43 +03:00
requiredArtifacts:
2021-08-09 00:28:10 +03:00
- native
artifactName: managed
postBuildSteps:
- pwsh: Remove-Item ./output/native/ -Recurse -Force -ErrorAction Continue
displayName: Delete the native folder
2020-06-25 23:28:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Managed (Linux)
parameters:
name: managed_linux
displayName: Managed (Linux)
2020-06-25 23:28:43 +03:00
vmImage: $(VM_IMAGE_LINUX)
packages: $(MANAGED_LINUX_PACKAGES)
target: libs
additionalArgs: --skipExternals="all"
2020-06-25 23:28:43 +03:00
requiredArtifacts:
2021-08-09 00:28:10 +03:00
- native
artifactName: managed
postBuildSteps:
- pwsh: Remove-Item ./output/native/ -Recurse -Force -ErrorAction Continue
displayName: Delete the native folder
2020-06-25 23:28:43 +03:00
- stage: package
displayName: Package NuGets
dependsOn: managed
jobs:
- template: azure-templates-bootstrapper.yml # Package NuGets
parameters:
name: package_windows
displayName: Package NuGets
vmImage: $(VM_IMAGE_WINDOWS)
target: nuget
additionalArgs: --packall=true --skipbuild=true
installWindowsSdk: false
installDotNet: false
2020-06-25 23:28:43 +03:00
requiredArtifacts:
2021-08-09 00:28:10 +03:00
- managed
- native
2020-06-25 23:28:43 +03:00
postBuildSteps:
- task: PublishBuildArtifacts@1
displayName: Publish the nuget artifacts
inputs:
artifactName: nuget
pathToPublish: 'output/nugets'
2020-12-27 15:47:09 +03:00
- task: PublishBuildArtifacts@1
displayName: Publish the special nuget artifacts
inputs:
artifactName: nuget_special
pathToPublish: 'output/nugets-special'
- task: PublishBuildArtifacts@1
displayName: Publish the special nuget artifacts
inputs:
artifactName: nuget_symbols
pathToPublish: 'output/nugets-symbols'
2020-12-27 15:47:09 +03:00
- task: PublishBuildArtifacts@1
displayName: Publish the SignList.xml into nuget artifacts
inputs:
artifactName: nuget
pathToPublish: 'SignList.xml'
- pwsh: |
Remove-Item ./output/native/ -Recurse -Force
Remove-Item ./output/nugets/ -Recurse -Force
Remove-Item ./output/nugets-special/ -Recurse -Force
Remove-Item ./output/nugets-symbols/ -Recurse -Force
displayName: Delete the pre-published folders
2020-06-25 23:28:43 +03:00
- stage: api_diff
displayName: API Diff
dependsOn: package
jobs:
- template: azure-templates-bootstrapper.yml # API Diff
parameters:
name: api_diff_windows
displayName: API Diff
2020-07-20 13:21:44 +03:00
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-25 23:28:43 +03:00
target: docs-api-diff
additionalArgs: --nugetDiffPrerelease=$(NUGET_DIFF_PRERELEASE)
installPreviewVs: false
2020-06-25 23:28:43 +03:00
shouldPublish: false
requiredArtifacts:
- package_windows
requiredArtifactsMap:
- src: nuget
dst: nugets
2020-06-25 23:28:43 +03:00
preBuildSteps:
- pwsh: .\scripts\install-gtk.ps1
2020-06-25 23:28:43 +03:00
displayName: Install GTK# 2.12
postBuildSteps:
- task: PublishBuildArtifacts@1
displayName: Publish the API diffs
condition: always()
inputs:
artifactName: api-diff
pathToPublish: '$(Build.SourcesDirectory)\output\api-diff'
2020-06-25 23:28:43 +03:00
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- stage: signing
displayName: Sign NuGets
dependsOn: package
jobs:
2020-12-27 15:47:09 +03:00
- template: sign-artifacts/jobs/v2.yml@xamarin-templates
2021-08-19 19:58:02 +03:00
parameters:
${{ if or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/patch/')) }}:
signType: 'Real'
${{ if not(or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/patch/'))) }}:
signType: 'Test'
- stage: tests
displayName: Tests
dependsOn:
- native_windows
- native_macos
- native_linux
- native_wasm
jobs:
- template: azure-templates-bootstrapper.yml # Tests|netfx (Windows)
2020-06-20 22:12:43 +03:00
parameters:
name: tests_netfx_windows
displayName: Windows (.NET Framework)
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_WINDOWS)
target: tests-netfx
2020-06-25 18:30:34 +03:00
additionalArgs: --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
installWindowsSdk: false
2020-06-20 22:12:43 +03:00
shouldPublish: false
requiredArtifacts:
- native_win32_x86_windows
- native_win32_x64_windows
postBuildSteps:
- task: PublishTestResults@2
displayName: Publish the .NET Framework test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'tests/SkiaSharp*.Desktop.Tests/**/TestResults.xml'
testRunTitle: 'Windows .NET Framework Tests'
- template: azure-templates-bootstrapper.yml # Tests|netcore (Windows)
parameters:
name: tests_netcore_windows
displayName: Windows (.NET Core)
vmImage: $(VM_IMAGE_WINDOWS)
target: tests-netcore
additionalArgs: --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
installWindowsSdk: false
shouldPublish: false
requiredArtifacts:
- native_win32_x86_windows
- native_win32_x64_windows
tools:
- dotnet-reportgenerator-globaltool
postBuildSteps:
2020-06-20 22:12:43 +03:00
- task: PublishTestResults@2
displayName: Publish the .NET Core test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'tests/SkiaSharp*.NetCore.Tests/**/TestResults.xml'
testRunTitle: 'Windows .NET Core Tests'
2020-06-25 19:37:28 +03:00
- task: PublishBuildArtifacts@1
2020-06-25 18:14:30 +03:00
displayName: 'Publish the code coverage results'
inputs:
artifactName: coverage_netcore_windows
2020-06-25 19:37:28 +03:00
pathToPublish: 'output/coverage'
- template: azure-templates-bootstrapper.yml # Tests|netfx (macOS)
2020-06-20 22:12:43 +03:00
parameters:
name: tests_netfx_macos
displayName: macOS (.NET Framework)
2020-06-20 22:12:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: tests-netfx
2020-06-25 18:30:34 +03:00
additionalArgs: --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
2020-06-20 22:12:43 +03:00
shouldPublish: false
requiredArtifacts:
- native_macos_macos
postBuildSteps:
- task: PublishTestResults@2
displayName: Publish the Mono test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'tests/SkiaSharp*.Desktop.Tests/**/TestResults.xml'
testRunTitle: 'macOS Mono Tests'
- template: azure-templates-bootstrapper.yml # Tests|netcore (macOS)
parameters:
name: tests_netcore_macos
displayName: macOS (.NET Core)
vmImage: $(VM_IMAGE_MAC)
target: tests-netcore
additionalArgs: --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
shouldPublish: false
requiredArtifacts:
- native_macos_macos
tools:
- dotnet-reportgenerator-globaltool
postBuildSteps:
2020-06-20 22:12:43 +03:00
- task: PublishTestResults@2
displayName: Publish the .NET Core test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'tests/SkiaSharp*.NetCore.Tests/**/TestResults.xml'
testRunTitle: 'macOS .NET Core Tests'
2020-06-25 19:37:28 +03:00
- task: PublishBuildArtifacts@1
2020-06-25 18:14:30 +03:00
displayName: 'Publish the code coverage results'
inputs:
artifactName: coverage_netcore_macos
2020-06-25 19:37:28 +03:00
pathToPublish: 'output/coverage'
- template: azure-templates-bootstrapper.yml # Tests|android (macOS)
parameters:
name: tests_android_macos
displayName: Android (macOS)
vmImage: $(VM_IMAGE_MAC)
target: tests-android
additionalArgs: --device=android-emulator-32_30 --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
shouldPublish: false
requiredArtifacts:
- native_android_x86_macos
- native_android_x64_macos
- native_android_arm_macos
- native_android_arm64_macos
preBuildSteps:
- pwsh: |
dotnet tool install Microsoft.DotNet.XHarness.CLI `
--global `
--add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json `
--version "$env:XHARNESS_VERSION"
displayName: Install the xharness .NET Core tool
- bash: sh -c "echo \"y\" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \"emulator\" \"system-images;android-30;google_apis_playstore;x86\""
displayName: Install the Android emulator
postBuildSteps:
- task: PublishTestResults@2
displayName: Publish the Android test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'output/logs/testlogs/SkiaSharp.Android.Tests/**/TestResults.xml'
testRunTitle: 'Android Tests'
- task: PublishBuildArtifacts@1
displayName: Publish the test logs
condition: always()
inputs:
artifactName: testlogs_android
pathToPublish: 'output/logs/testlogs'
2021-02-21 19:11:28 +03:00
- template: azure-templates-bootstrapper.yml # Tests|ios (macOS)
parameters:
name: tests_ios_macos
displayName: iOS (macOS)
vmImage: $(VM_IMAGE_MAC)
target: tests-ios
additionalArgs: --device=ios-simulator-64 --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
shouldPublish: false
requiredArtifacts:
- native_ios_macos
preBuildSteps:
- template: azure-templates-provisioning-profiles.yml
- pwsh: |
dotnet tool install Microsoft.DotNet.XHarness.CLI `
--global `
--add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json `
--version "$env:XHARNESS_VERSION"
2021-02-21 19:11:28 +03:00
displayName: Install the xharness .NET Core tool
postBuildSteps:
- task: PublishTestResults@2
displayName: Publish the iOS test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'output/logs/testlogs/SkiaSharp.iOS.Tests/**/TestResults.xml'
2021-02-21 19:11:28 +03:00
testRunTitle: 'iOS Tests'
- task: PublishBuildArtifacts@1
displayName: Publish the test logs
condition: always()
inputs:
artifactName: testlogs_ios
pathToPublish: 'output/logs/testlogs'
- template: azure-templates-bootstrapper.yml # Tests|netfx (Linux)
parameters:
name: tests_netfx_linux
displayName: Linux (.NET Framework)
vmImage: $(VM_IMAGE_LINUX)
packages: $(MANAGED_LINUX_PACKAGES)
target: tests-netfx
2020-06-25 18:30:34 +03:00
additionalArgs: --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
shouldPublish: false
requiredArtifacts:
- native_linux_x64_linux
postBuildSteps:
- task: PublishTestResults@2
displayName: Publish the Mono test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'tests/SkiaSharp*.Desktop.Tests/**/TestResults.xml'
testRunTitle: 'Linux Mono Tests'
- template: azure-templates-bootstrapper.yml # Tests|netcore (Linux)
parameters:
name: tests_netcore_linux
displayName: Linux (.NET Core)
vmImage: $(VM_IMAGE_LINUX)
packages: $(MANAGED_LINUX_PACKAGES)
target: tests-netcore
additionalArgs: --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=$(ENABLE_CODE_COVERAGE)
shouldPublish: false
requiredArtifacts:
- native_linux_x64_linux
tools:
- dotnet-reportgenerator-globaltool
postBuildSteps:
- task: PublishTestResults@2
displayName: Publish the .NET Core test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'tests/SkiaSharp*.NetCore.Tests/**/TestResults.xml'
testRunTitle: 'Linux .NET Core Tests'
2020-06-25 19:37:28 +03:00
- task: PublishBuildArtifacts@1
2020-06-25 18:14:30 +03:00
displayName: 'Publish the code coverage results'
inputs:
artifactName: coverage_netcore_linux
2020-06-25 19:37:28 +03:00
pathToPublish: 'output/coverage'
2020-06-29 20:28:12 +03:00
- template: azure-templates-bootstrapper.yml # Tests [WASM] (Linux)
parameters:
name: tests_wasm_linux
displayName: WASM (Linux)
2020-06-29 20:28:12 +03:00
vmImage: $(VM_IMAGE_LINUX)
packages: $(MANAGED_LINUX_PACKAGES) ninja-build
target: tests-wasm
additionalArgs: --skipExternals="all" --throwOnTestFailure=$(THROW_ON_TEST_FAILURE) --coverage=false --chromedriver=$(CHROMEWEBDRIVER)
2020-06-29 20:28:12 +03:00
shouldPublish: false
requiredArtifacts:
- native_wasm_linux
2020-07-20 13:21:44 +03:00
installEmsdk: true
initScript: source ~/emsdk/emsdk_env.sh
2020-06-29 20:28:12 +03:00
postBuildSteps:
- task: PublishTestResults@2
displayName: Publish the WASM test results
condition: always()
inputs:
testResultsFormat: xUnit
testResultsFiles: 'tests/SkiaSharp*.Wasm.Tests/**/TestResults.xml'
testRunTitle: 'Linux WASM Tests'
# TODO: add tests for linux alpine
# TODO: add tests for linux no dependencies
# TODO: add tests for windows nano server
2020-06-25 19:37:28 +03:00
- job: coverage_reports # Coverage Reports
displayName: Coverage Reports
pool:
2020-07-20 13:21:44 +03:00
vmImage: $(VM_IMAGE_LINUX)
2020-06-25 19:37:28 +03:00
dependsOn:
- tests_netcore_windows
- tests_netcore_macos
- tests_netcore_linux
2020-06-25 19:37:28 +03:00
steps:
2020-06-25 21:13:13 +03:00
- checkout: self
2020-06-25 19:37:28 +03:00
- template: azure-templates-variables.yml
- task: DownloadBuildArtifacts@0
displayName: Download the coverage_netcore_windows artifact
2020-06-25 19:37:28 +03:00
inputs:
artifactName: coverage_netcore_windows
2020-06-25 19:37:28 +03:00
downloadPath: output
- task: DownloadBuildArtifacts@0
displayName: Download the coverage_netcore_macos artifact
2020-06-25 19:37:28 +03:00
inputs:
artifactName: coverage_netcore_macos
2020-06-25 19:37:28 +03:00
downloadPath: output
- task: DownloadBuildArtifacts@0
displayName: Download the coverage_netcore_linux artifact
2020-06-25 19:37:28 +03:00
inputs:
artifactName: coverage_netcore_linux
2020-06-25 19:37:28 +03:00
downloadPath: output
- task: PublishCodeCoverageResults@1
displayName: 'Publish the code coverage results'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: 'output/**/Cobertura.xml'
2020-06-25 23:28:43 +03:00
- stage: samples
displayName: Samples
2020-06-25 23:28:43 +03:00
dependsOn: package
jobs:
- template: azure-templates-bootstrapper.yml # Build Samples (Windows)
parameters:
name: samples_windows
displayName: Windows
2020-06-25 23:28:43 +03:00
vmImage: $(VM_IMAGE_WINDOWS)
target: samples
requiredArtifactsMap:
- src: nuget
dst: nugets
postBuildSteps:
- pwsh: Remove-Item ./output/nugets/ -Recurse -Force -ErrorAction Continue
displayName: Delete the nugets folder
2020-06-25 23:28:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Samples (macOS)
parameters:
name: samples_macos
displayName: macOS
2020-06-25 23:28:43 +03:00
vmImage: $(VM_IMAGE_MAC)
target: samples
shouldPublish: false
requiredArtifactsMap:
- src: nuget
dst: nugets
2020-06-25 23:28:43 +03:00
preBuildSteps:
2021-02-21 19:11:28 +03:00
- template: azure-templates-provisioning-profiles.yml
2020-06-25 23:28:43 +03:00
- template: azure-templates-bootstrapper.yml # Build Samples (Linux)
parameters:
name: samples_linux
displayName: Linux
2020-06-25 23:28:43 +03:00
vmImage: $(VM_IMAGE_LINUX)
packages: $(MANAGED_LINUX_PACKAGES)
target: samples
shouldPublish: false
requiredArtifactsMap:
- src: nuget
dst: nugets
2020-07-20 13:21:44 +03:00
installEmsdk: true
initScript: source ~/emsdk/emsdk_env.sh
2020-06-25 23:28:43 +03:00
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- stage: checks
displayName: Run Code Checks
dependsOn: prepare
jobs:
- template: azure-templates-bootstrapper.yml # Run Code Checks
parameters:
name: native_checks_windows
displayName: Run Code Checks
2021-08-19 19:58:02 +03:00
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/patch/'))
2021-10-11 13:08:47 +03:00
vmImage: $(VM_IMAGE_WINDOWS_PREVIOUS)
2020-06-25 23:28:43 +03:00
target: git-sync-deps
installWindowsSdk: false
installDotNet: false
2020-06-25 23:28:43 +03:00
shouldPublish: false
postBuildSteps:
- task: CredScan@2
displayName: Analyze source for credentials
condition: always()
inputs:
toolMajorVersion: 'V2'
- task: PoliCheck@1
displayName: Run PoliCheck
condition: always()
inputs:
inputType: 'Basic'
targetType: 'F'
- task: SdtReport@1
displayName: Create security analysis report
condition: always()
inputs:
AllTools: false
APIScan: false
BinSkim: false
CodesignValidation: false
CredScan: true
FortifySCA: false
FxCop: false
ModernCop: false
MSRD: false
PoliCheck: true
RoslynAnalyzers: false
SDLNativeRules: false
Semmle: false
TSLint: false
ToolLogsNotFoundAction: 'Standard'
- task: PublishSecurityAnalysisLogs@3
displayName: Publish security analysis logs
condition: always()
- task: TSAUpload@1
displayName: Publish TSA logs
condition: always()
continueOnError: true
2020-06-25 23:28:43 +03:00
inputs:
tsaVersion: 'TsaV2'
codebase: 'NewOrUpdate'
tsaEnvironment: 'PROD'
codeBaseName: 'SkiaSharp_main'
2020-06-25 23:28:43 +03:00
notificationAlias: 'xamacomd@microsoft.com'
notifyAlwaysV2: false
instanceUrlForTsaV2: 'DEVDIV'
projectNameDEVDIV: 'DevDiv'
2021-09-09 00:36:16 +03:00
areaPath: 'DevDiv\VS Client - Runtime SDKs\SkiaSharp'
2020-06-25 23:28:43 +03:00
iterationPath: 'DevDiv\OneVS'
uploadAPIScan: false
uploadBinSkim: false
uploadCredScan: true
uploadFortifySCA: false
uploadFxCop: false
uploadModernCop: false
uploadPoliCheck: true
uploadPREfast: false
uploadRoslyn: false
uploadTSLint: false
uploadAsync: true