Updated build stuff!
This commit is contained in:
Родитель
eaa09fe04f
Коммит
8fc8353de0
|
@ -117,7 +117,7 @@ jobs:
|
|||
|
||||
- name: Push nuget-alpha to GitHub Packages
|
||||
run: |
|
||||
nuget sources add -Name "GHNuget" -Source "https://nuget.pkg.github.com/Clancey/index.json" -UserName Clancey -Password ${{ secrets.GITHUB_TOKEN }}
|
||||
nuget sources add -Name "GHNuget" -Source "https://nuget.pkg.github.com/Clancey/index.json" -UserName Clancey -Password ${{ secrets.REPO_NUGET_PAT }}
|
||||
nuget push nuget-dev-artifact\*.nupkg -Source "GHNuget" -SkipDuplicate
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ name: main-build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, sweek/ci-fix ]
|
||||
branches: [ main]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
|
|
|
@ -1,518 +0,0 @@
|
|||
# specific branch build
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- dev
|
||||
- master
|
||||
pr:
|
||||
- dev
|
||||
- master
|
||||
- releases/*
|
||||
|
||||
stages:
|
||||
- stage: BuildSource
|
||||
jobs:
|
||||
- job: BuildCometBlazor
|
||||
displayName: Build Comet Blazor
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET Core sdk'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: $(DotNetVersion)
|
||||
includePreviewVersions: true
|
||||
installationPath: $(Agent.ToolsDirectory)/dotnet
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Build Blazor'
|
||||
inputs:
|
||||
command: 'build'
|
||||
projects: 'Comet.Blazor.sln'
|
||||
arguments: '-c $(BuildConfiguration)'
|
||||
|
||||
- task: Bash@3
|
||||
displayName: 'Version Script'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
echo '$(Build_BuildID)' $BUILD_BUILDID
|
||||
BUILDNUMBER=$BUILD_BUILDID
|
||||
VERSION=0.2.$BUILDNUMBER-beta
|
||||
echo 'VERSION ' $VERSION
|
||||
|
||||
#if ! [ $BRANCH = master ]; then
|
||||
# VERSION=1.0.$BUILDNUMBER
|
||||
# echo "##vso[build.updatebuildnumber]$VERSION"
|
||||
#fi;
|
||||
|
||||
echo "##vso[task.setvariable variable=Version]$VERSION"
|
||||
# - task: DotNetCoreCLI@2
|
||||
# displayName: 'Test Blazor'
|
||||
# inputs:
|
||||
# command: 'test'
|
||||
# projects: 'Comet.Blazor.sln'
|
||||
# arguments: '-c $(BuildConfiguration)'
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Pack Blazor'
|
||||
inputs:
|
||||
command: 'pack'
|
||||
packagesToPack: 'src/Comet.Blazor/Comet.Blazor.csproj'
|
||||
includesymbols: true
|
||||
versioningScheme: byEnvVar
|
||||
versionEnvVar: VERSION
|
||||
arguments: '-c $(BuildConfiguration)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
artifactName: drop
|
||||
|
||||
- job: BuildCometMac
|
||||
displayName: Build Comet Mac
|
||||
pool:
|
||||
name: Hosted macOS
|
||||
vmImage: 'macOS-latest'
|
||||
demands:
|
||||
- MSBuild
|
||||
- Xamarin.Android
|
||||
- xcode
|
||||
- Xamarin.iOS
|
||||
- msbuild
|
||||
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET Core sdk'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: $(DotNetVersion)
|
||||
|
||||
- bash:
|
||||
sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(MonoVersion)
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget $(NugetVersion)
|
||||
inputs:
|
||||
versionSpec: $(NugetVersion)
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Mac.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet'
|
||||
inputs:
|
||||
solution: 'src/Comet/Comet.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet/bin/Debug/netstandard2.0/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Xamarin.Forms.Loader.csproj'
|
||||
inputs:
|
||||
solution: 'src/Xamarin.Forms.Loader/Xamarin.Forms.Loader.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Android'
|
||||
inputs:
|
||||
solution: 'src/Comet.Android/Comet.Android.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Android/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.iOS'
|
||||
inputs:
|
||||
solution: 'src/Comet.iOS/Comet.iOS.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.iOS/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Mac'
|
||||
inputs:
|
||||
solution: 'src/Comet.Mac/Comet.Mac.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Mac/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia/Comet.Skia.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Skia/bin/Debug/netstandard2.0/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.Android'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.Android/Comet.Skia.Android.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Skia.Android/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.iOS'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.iOS/Comet.Skia.iOS.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Skia.iOS/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.Mac'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.Mac/Comet.Skia.Mac.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Skia.Mac/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: 'drop_mac'
|
||||
publishLocation: 'Container'
|
||||
|
||||
- job: BuildCometWindows
|
||||
displayName: Build Comet Windows
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
demands:
|
||||
- MSBuild
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget $(NugetVersion)
|
||||
inputs:
|
||||
versionSpec: $(NugetVersion)
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Windows.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.UWP'
|
||||
inputs:
|
||||
solution: 'src/Comet.UWP/Comet.UWP.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.UWP/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.WPF'
|
||||
inputs:
|
||||
solution: 'src/Comet.WPF/Comet.WPF.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.WPF/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.UWP'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.UWP/Comet.Skia.UWP.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Skia.UWP/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.WPF'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.WPF/Comet.Skia.WPF.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
Contents: 'src/Comet.Skia.WPF/bin/Debug/Comet.*'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: 'drop_windows'
|
||||
publishLocation: 'Container'
|
||||
|
||||
- stage: RunTests
|
||||
jobs:
|
||||
- job: RunCometTests
|
||||
displayName: Run Comet Tests
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
demands:
|
||||
- MSBuild
|
||||
- vstest
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget $(NugetVersion)
|
||||
inputs:
|
||||
versionSpec: $(NugetVersion)
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Tests.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Tests'
|
||||
inputs:
|
||||
solution: 'tests/Comet.Tests/Comet.Tests.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: VSTest@2
|
||||
inputs:
|
||||
testSelector: 'testAssemblies'
|
||||
testAssemblyVer2: |
|
||||
**\bin\$(BuildConfiguration)\netcoreapp2.1\Comet.Tests.dll
|
||||
!**\obj\**
|
||||
!**\xunit.runner.visualstudio.testadapter.dll
|
||||
!**\xunit.runner.visualstudio.dotnetcore.testadapter.dll
|
||||
searchFolder: '$(System.DefaultWorkingDirectory)'
|
||||
codeCoverageEnabled: true
|
||||
otherConsoleOptions: '/InIsolation'
|
||||
|
||||
- stage: BuildSamples
|
||||
jobs:
|
||||
- job: BuildSamplesAndroid
|
||||
displayName: Build Comet Android Samples
|
||||
pool:
|
||||
name: Hosted macOS
|
||||
vmImage: 'macOS-latest'
|
||||
demands:
|
||||
- MSBuild
|
||||
- Xamarin.Android
|
||||
|
||||
steps:
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET Core sdk'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: $(DotNetVersion)
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget $(NugetVersion)
|
||||
inputs:
|
||||
versionSpec: $(NugetVersion)
|
||||
|
||||
- bash:
|
||||
sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(MonoVersion)
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Mac.sln
|
||||
|
||||
- task: Boots@1
|
||||
displayName: 'Set Xamarin.Android'
|
||||
inputs:
|
||||
uri: $(XamarinAndroidMac)
|
||||
- task: XamarinAndroid@1
|
||||
displayName: 'Build Comet.Android.Sample App'
|
||||
inputs:
|
||||
projectFile: sample/Comet.Android.Sample/Comet.Android.Sample.csproj
|
||||
configuration: '$(BuildConfiguration)'
|
||||
createAppPackage: false
|
||||
|
||||
# - task: XamarinAndroid@1
|
||||
# displayName: 'Build Comet.Forms.Android.Sample App'
|
||||
# inputs:
|
||||
# projectFile: sample/Forms/Comet.Forms.Sample.Android/Comet.Forms.Sample.Android.csproj
|
||||
# configuration: '$(BuildConfiguration)'
|
||||
# createAppPackage: false
|
||||
|
||||
- job: BuildCometSamplesiOSMac
|
||||
displayName: Build Comet iOS and Mac Samples
|
||||
pool:
|
||||
name: Hosted macOS
|
||||
vmImage: 'macOS-latest'
|
||||
demands:
|
||||
- xcode
|
||||
- Xamarin.iOS
|
||||
- msbuild
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget $(NugetVersion)
|
||||
inputs:
|
||||
versionSpec: $(NugetVersion)
|
||||
|
||||
- bash:
|
||||
sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(MonoVersion)
|
||||
- task: Boots@1
|
||||
displayName: 'Xamarin.Mac SDK '
|
||||
inputs:
|
||||
uri: $(MacDownloadUrl)
|
||||
|
||||
- task: Boots@1
|
||||
displayName: 'Xamarin.iOS SDK'
|
||||
inputs:
|
||||
uri: $(iOSUrl)
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET Core sdk'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: $(DotNetVersion)
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Mac.sln
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'set Xcode 11.2.1'
|
||||
inputs:
|
||||
script: '/bin/bash -c "echo ''##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]''$(xcodeRoot);sudo xcode-select --switch $(xcodeRoot)/Contents/Developer"'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build iOS'
|
||||
inputs:
|
||||
solution: 'build/Comet-Mac.sln'
|
||||
platform: iPhoneSimulator
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Mac'
|
||||
inputs:
|
||||
solution: 'sample/Comet.Mac.Sample/Comet.Mac.Sample.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- job: BuildCometSamplesWindows
|
||||
displayName: Build Comet UWP and WPF Samples
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
demands:
|
||||
- MSBuild
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget $(NugetVersion)
|
||||
inputs:
|
||||
versionSpec: $(NugetVersion)
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Windows.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build UWP Sample'
|
||||
inputs:
|
||||
solution: 'sample/Comet.UWP.Sample/Comet.UWP.Sample.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
msbuildArguments: '/p:AppxPackageSigningEnabled=false'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build WPF Sample'
|
||||
inputs:
|
||||
solution: 'sample/Comet.WPF.Sample/Comet.WPF.Sample.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
msbuildArguments: '/p:AppxPackageSigningEnabled=false'
|
||||
|
||||
|
||||
- stage: NugetPackPublish
|
||||
jobs:
|
||||
- job: DownloadArtifacts
|
||||
displayName: Download Artifacts from Build Stage
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
demands:
|
||||
- MSBuild
|
||||
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
targetPath: '$(Pipeline.Workspace)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
SourceFolder: '$(Pipeline.Workspace)/drop_windows'
|
||||
Contents: '**'
|
||||
TargetFolder: '$(Build.SourcesDirectory)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
SourceFolder: '$(Pipeline.Workspace)/drop_mac'
|
||||
Contents: '**'
|
||||
TargetFolder: '$(Build.SourcesDirectory)'
|
||||
|
||||
- task: Bash@3
|
||||
displayName: 'Version Script'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
echo '$(Build_BuildID)' $BUILD_BUILDID
|
||||
BUILDNUMBER=$BUILD_BUILDID
|
||||
VERSION=0.2.$BUILDNUMBER-beta
|
||||
echo 'VERSION ' $VERSION
|
||||
|
||||
#if ! [ $BRANCH = master ]; then
|
||||
# VERSION=1.0.$BUILDNUMBER
|
||||
# echo "##vso[build.updatebuildnumber]$VERSION"
|
||||
#fi;
|
||||
|
||||
echo "##vso[task.setvariable variable=Version]$VERSION"
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget $(NugetVersion)
|
||||
inputs:
|
||||
versionSpec: $(NugetVersion)
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'nuget pack Comet.nuspec'
|
||||
inputs:
|
||||
command: pack
|
||||
packagesToPack: 'Comet.nuspec'
|
||||
includeSymbols: true
|
||||
versioningScheme: byEnvVar
|
||||
versionEnvVar: VERSION
|
||||
|
||||
|
||||
- bash:
|
||||
nuget pack Comet.Skia.nuspec -Properties "cometVersion=$(VERSION)" -Symbols -version $(VERSION) -NonInteractive -OutputDirectory "$(Build.ArtifactStagingDirectory)"
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
SourceFolder: '$(Build.SourcesDirectory)'
|
||||
Contents: '**\*.nupkg;**\*.snupkg;**/*.symbols.nupkg'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: 'nuget'
|
||||
publishLocation: 'Container'
|
|
@ -1,302 +0,0 @@
|
|||
stages:
|
||||
- stage: BuildSource
|
||||
jobs:
|
||||
- job: BuildCometBlazor
|
||||
displayName: Build Comet Blazor
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET Core sdk'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: 3.0.100-preview9-014004
|
||||
includePreviewVersions: true
|
||||
installationPath: $(Agent.ToolsDirectory)/dotnet
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Build Blazor'
|
||||
inputs:
|
||||
command: 'build'
|
||||
projects: 'Comet.Blazor.sln'
|
||||
arguments: '-c $(BuildConfiguration)'
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Test Blazor'
|
||||
inputs:
|
||||
command: 'test'
|
||||
projects: 'Comet.Blazor.sln'
|
||||
arguments: '-c $(BuildConfiguration)'
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Pack Blazor'
|
||||
inputs:
|
||||
command: 'pack'
|
||||
packagesToPack: 'src/Comet.Blazor/Comet.Blazor.csproj'
|
||||
arguments: '-c $(BuildConfiguration)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
artifactName: drop
|
||||
|
||||
- job: BuildCometMac
|
||||
displayName: Build Comet Mac
|
||||
pool:
|
||||
name: Hosted macOS
|
||||
vmImage: 'macOS-latest'
|
||||
demands:
|
||||
- MSBuild
|
||||
- Xamarin.Android
|
||||
- xcode
|
||||
- Xamarin.iOS
|
||||
- msbuild
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget 5.0.2
|
||||
inputs:
|
||||
versionSpec: '5.0.2'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Mac.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet'
|
||||
inputs:
|
||||
solution: 'src/Comet/Comet.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Xamarin.Forms.Loader.csproj'
|
||||
inputs:
|
||||
solution: 'src/Xamarin.Forms.Loader/Xamarin.Forms.Loader.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Android'
|
||||
inputs:
|
||||
solution: 'src/Comet.Android/Comet.Android.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.iOS'
|
||||
inputs:
|
||||
solution: 'src/Comet.iOS/Comet.iOS.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Mac'
|
||||
inputs:
|
||||
solution: 'src/Comet.Mac/Comet.Mac.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia/Comet.Skia.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.Android'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.Android/Comet.Skia.Android.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.iOS'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.iOS/Comet.Skia.iOS.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.Mac'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.Mac/Comet.Skia.Mac.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- job: BuildCometWindows
|
||||
displayName: Build Comet Windows
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
demands:
|
||||
- MSBuild
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget 5.0.2
|
||||
inputs:
|
||||
versionSpec: '5.0.2'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Windows.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.UWP'
|
||||
inputs:
|
||||
solution: 'src/Comet.UWP/Comet.UWP.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.WPF'
|
||||
inputs:
|
||||
solution: 'src/Comet.WPF/Comet.WPF.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.UWP'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.UWP/Comet.Skia.UWP.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Comet.Skia.WPF'
|
||||
inputs:
|
||||
solution: 'src/Comet.Skia.WPF/Comet.Skia.WPF.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- stage: RunTests
|
||||
jobs:
|
||||
- job: RunCometTests
|
||||
displayName: Run Comet Tests
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
demands:
|
||||
- MSBuild
|
||||
- vstest
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget 5.0.2
|
||||
inputs:
|
||||
versionSpec: '5.0.2'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Tests.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Tests'
|
||||
inputs:
|
||||
solution: 'tests/Comet.Tests/Comet.Tests.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: VSTest@2
|
||||
inputs:
|
||||
testSelector: 'testAssemblies'
|
||||
testAssemblyVer2: |
|
||||
**\bin\$(BuildConfiguration)\netcoreapp2.1\Comet.Tests.dll
|
||||
!**\obj\**
|
||||
!**\xunit.runner.visualstudio.testadapter.dll
|
||||
!**\xunit.runner.visualstudio.dotnetcore.testadapter.dll
|
||||
searchFolder: '$(System.DefaultWorkingDirectory)'
|
||||
codeCoverageEnabled: true
|
||||
otherConsoleOptions: '/InIsolation'
|
||||
|
||||
- stage: BuildSamples
|
||||
jobs:
|
||||
- job: BuildSamplesAndroid
|
||||
displayName: Build Comet Android Samples
|
||||
pool:
|
||||
name: Hosted macOS
|
||||
vmImage: 'macOS-latest'
|
||||
demands:
|
||||
- MSBuild
|
||||
- Xamarin.Android
|
||||
|
||||
steps:
|
||||
- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1
|
||||
displayName: 'Select the Xamarin SDK version'
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget 5.0.2
|
||||
inputs:
|
||||
versionSpec: '5.0.2'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Mac.sln
|
||||
|
||||
- task: XamarinAndroid@1
|
||||
displayName: 'Build Comet.Android.Sample App'
|
||||
inputs:
|
||||
projectFile: sample/Comet.Android.Sample/Comet.Android.Sample.csproj
|
||||
configuration: '$(BuildConfiguration)'
|
||||
createAppPackage: false
|
||||
|
||||
# - task: XamarinAndroid@1
|
||||
# displayName: 'Build Comet.Forms.Android.Sample App'
|
||||
# inputs:
|
||||
# projectFile: sample/Forms/Comet.Forms.Sample.Android/Comet.Forms.Sample.Android.csproj
|
||||
# configuration: '$(BuildConfiguration)'
|
||||
# createAppPackage: false
|
||||
|
||||
- job: BuildCometSamplesiOSMac
|
||||
displayName: Build Comet iOS and Mac Samples
|
||||
pool:
|
||||
name: Hosted macOS
|
||||
vmImage: 'macOS-latest'
|
||||
demands:
|
||||
- xcode
|
||||
- Xamarin.iOS
|
||||
- msbuild
|
||||
|
||||
steps:
|
||||
- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1
|
||||
displayName: 'Select the Xamarin SDK version'
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget 5.0.2
|
||||
inputs:
|
||||
versionSpec: '5.0.2'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Mac.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build iOS and iOS.Forms'
|
||||
inputs:
|
||||
solution: 'build/Comet-Mac.sln'
|
||||
platform: iPhoneSimulator
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Mac'
|
||||
inputs:
|
||||
solution: 'sample/Comet.Mac.Sample/Comet.Mac.Sample.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
|
||||
- job: BuildCometSamplesWindows
|
||||
displayName: Build Comet UWP and WPF Samples
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
demands:
|
||||
- MSBuild
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget 5.0.2
|
||||
inputs:
|
||||
versionSpec: '5.0.2'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: build/Comet-Windows.sln
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build UWP Sample'
|
||||
inputs:
|
||||
solution: 'sample/Comet.UWP.Sample/Comet.UWP.Sample.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
msbuildArguments: '/p:AppxPackageSigningEnabled=false'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build WPF Sample'
|
||||
inputs:
|
||||
solution: 'sample/Comet.WPF.Sample/Comet.WPF.Sample.csproj'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
msbuildArguments: '/p:AppxPackageSigningEnabled=false'
|
Загрузка…
Ссылка в новой задаче