-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update azure-pipelines.yml for Azure Pipelines
- Loading branch information
Showing
1 changed file
with
72 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,82 @@ | ||
# Xamarin.Android | ||
# Build a Xamarin.Android project. | ||
# Add steps that test, sign, and distribute an app, save build artifacts, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/xamarin | ||
|
||
trigger: | ||
- master | ||
|
||
pool: | ||
vmImage: 'macos-latest' | ||
name: Hosted VS2017 | ||
demands: | ||
- msbuild | ||
- visualstudio | ||
- MSBuild | ||
- Xamarin.Android | ||
- vstest | ||
|
||
variables: | ||
buildConfiguration: 'Release' | ||
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)' | ||
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972 | ||
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972 | ||
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | ||
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | ||
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | ||
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | ||
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | ||
#Your build pipeline references a secret variable named ‘AppCenterApiToken’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 | ||
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | ||
|
||
steps: | ||
- task: NuGetToolInstaller@0 | ||
- task: NuGetToolInstaller@1 | ||
displayName: 'Use NuGet' | ||
inputs: | ||
versionSpec: 4.4.1 | ||
|
||
- task: NuGetCommand@2 | ||
displayName: 'NuGet restore' | ||
inputs: | ||
restoreSolution: '$(Parameters.solution)' | ||
|
||
- task: VSBuild@1 | ||
displayName: 'Build solution **\*.sln' | ||
inputs: | ||
restoreSolution: '**/*.sln' | ||
solution: '$(Parameters.solution)' | ||
platform: '$(BuildPlatform)' | ||
configuration: '$(BuildConfiguration)' | ||
|
||
- task: XamarinAndroid@1 | ||
displayName: 'Build Xamarin.Android project ' | ||
inputs: | ||
projectFile: '**/*Droid.csproj' | ||
configuration: '$(BuildConfiguration)' | ||
msbuildVersionOption: latest | ||
|
||
- task: VSTest@2 | ||
displayName: 'Run Unit Tests' | ||
inputs: | ||
testAssemblyVer2: '**\bin\**\*UnitTests.dll' | ||
searchFolder: '$(Build.SourcesDirectory)' | ||
platform: '$(BuildPlatform)' | ||
configuration: '$(BuildConfiguration)' | ||
|
||
- task: Bash@3 | ||
displayName: 'Submit APK to App Center Test' | ||
inputs: | ||
targetType: filePath | ||
filePath: './$(Build.SourcesDirectory)/Src/SubmitApkToAppCenterTest.sh' | ||
arguments: '$(AppCenterApiToken)' | ||
failOnStderr: true | ||
env: | ||
BuildPath: $(Build.Repository.LocalPath) | ||
NuGetPackagesPath: $(UserProfile)\.nuget\packages | ||
|
||
- task: PublishSymbols@2 | ||
displayName: 'Publish symbols path' | ||
inputs: | ||
SearchPattern: '**\bin\**\*.pdb' | ||
PublishSymbols: false | ||
continueOnError: true | ||
|
||
- task: CopyFiles@2 | ||
displayName: 'Copy Files to: $(build.artifactstagingdirectory)' | ||
inputs: | ||
SourceFolder: '$(system.defaultworkingdirectory)' | ||
Contents: '**\bin\$(BuildConfiguration)\**' | ||
TargetFolder: '$(build.artifactstagingdirectory)' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: drop' | ||
inputs: | ||
projectFile: '**/*droid*.csproj' | ||
outputDirectory: '$(outputDirectory)' | ||
configuration: '$(buildConfiguration)' | ||
PathtoPublish: '$(build.artifactstagingdirectory)' | ||
|