Add CI configuration
This commit is contained in:
Родитель
daac38ab6d
Коммит
c12172e5cc
|
@ -0,0 +1,7 @@
|
|||
jobs:
|
||||
|
||||
- template: .vsts-win-build.yml
|
||||
parameters:
|
||||
name: Windows
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
|
@ -0,0 +1,66 @@
|
|||
parameters:
|
||||
pool: ''
|
||||
|
||||
jobs:
|
||||
- job: macos
|
||||
pool: ${{ parameters.pool }}
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
- task: InstallAppleCertificate@2
|
||||
displayName: 'Install an Apple certificate'
|
||||
inputs:
|
||||
certSecureFile: '$(iOSSigning.Certificate)'
|
||||
certPwd: '$(iOSSigning.CertificatePwd)'
|
||||
signingIdentity: '$(iOSSigning.CertificateIdentity)'
|
||||
|
||||
- task: InstallAppleProvisioningProfile@1
|
||||
displayName: 'Install an Apple provisioning profile'
|
||||
inputs:
|
||||
provProfileSecureFile: '$(iOSSigning.ProvisioningProfile)'
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: build/Build.csproj
|
||||
msbuildLocationMethod: version
|
||||
msbuildVersion: latest
|
||||
msbuildArchitecture: x86
|
||||
msbuildArguments: "/r"
|
||||
clean: false
|
||||
maximumCpuCount: true
|
||||
restoreNugetPackages: false
|
||||
logProjectEvents: false
|
||||
createLogFile: false
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: '$(build.sourcesdirectory)/XamlControlsGallery.iOS/XamlControlsGallery.iOS.csproj'
|
||||
msbuildLocationMethod: version
|
||||
msbuildVersion: latest
|
||||
msbuildArchitecture: x86
|
||||
msbuildArguments: '/r /p:Configuration=Release /p:Platform=iPhone /detailedsummary /m:16 /nr:false'
|
||||
clean: false
|
||||
maximumCpuCount: true
|
||||
restoreNugetPackages: false
|
||||
logProjectEvents: true
|
||||
createLogFile: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Publish iOS Binaries'
|
||||
inputs:
|
||||
SourceFolder: $(build.sourcesdirectory)/XamlControlsGallery.iOS/bin/iPhone/Release
|
||||
Contents: '*.ipa'
|
||||
TargetFolder: $(build.artifactstagingdirectory)/XamlUIBasics-iOS
|
||||
CleanTargetFolder: false
|
||||
OverWrite: false
|
||||
flattenFolders: false
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
# https://developercommunity.visualstudio.com/content/problem/284991/public-vsts-previouw-cant-set-build-number-of-pr-b.html
|
||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||
inputs:
|
||||
PathtoPublish: $(build.artifactstagingdirectory)
|
||||
ArtifactName: universal-samples-drop
|
||||
ArtifactType: Container
|
|
@ -0,0 +1,12 @@
|
|||
jobs:
|
||||
- template: .vsts-macOS-build.yml
|
||||
parameters:
|
||||
name: macOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
|
||||
- template: .vsts-win-build.yml
|
||||
parameters:
|
||||
name: Windows
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
|
@ -0,0 +1,92 @@
|
|||
parameters:
|
||||
pool: ''
|
||||
sign: false
|
||||
|
||||
jobs:
|
||||
- job: Windows
|
||||
pool: ${{ parameters.pool }}
|
||||
|
||||
variables:
|
||||
ANDROID_NDK_HOME: C:\Microsoft\AndroidNDK64\android-ndk-r15c
|
||||
ANDROID_NDK_PATH: C:\Microsoft\AndroidNDK64\android-ndk-r15c
|
||||
AndroidNdkDirectory: C:\Microsoft\AndroidNDK64\android-ndk-r15c
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
- task: GitVersion@3
|
||||
# Ignore gitversion for forks, until this is fixed:
|
||||
# https://developercommunity.visualstudio.com/content/problem/284991/public-vsts-previouw-cant-set-build-number-of-pr-b.html
|
||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||
inputs:
|
||||
updateAssemblyInfo: false
|
||||
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: 4.7.0
|
||||
checkLatest: false
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: build/Build.csproj
|
||||
msbuildLocationMethod: version
|
||||
msbuildVersion: latest
|
||||
msbuildArchitecture: x86
|
||||
msbuildArguments: "/r"
|
||||
clean: false
|
||||
maximumCpuCount: true
|
||||
restoreNugetPackages: false
|
||||
logProjectEvents: false
|
||||
createLogFile: false
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: XamlControlsGallery.Windows\XamlControlsGallery.sln
|
||||
msbuildLocationMethod: version
|
||||
msbuildVersion: latest
|
||||
msbuildArchitecture: x86
|
||||
msbuildArguments: '/r /p:Configuration=Release /detailedsummary /m:16 /nr:false "/p:AndroidSigningStorePass=$(nventivekeystore_pwd)" "/p:AndroidSigningKeyAlias=$(nventivekeystore_alias)" "/p:AndroidSigningKeyPass=$(nventivekeystore_aliaspwd)"'
|
||||
clean: false
|
||||
maximumCpuCount: true
|
||||
restoreNugetPackages: false
|
||||
logProjectEvents: false
|
||||
createLogFile: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Publish Wasm Binaries'
|
||||
inputs:
|
||||
SourceFolder: $(build.sourcesdirectory)/XamlControlsGallery.Wasm/bin/Release/netstandard2.0/dist
|
||||
Contents: '**/*.*'
|
||||
TargetFolder: $(build.artifactstagingdirectory)/XamlUIBasics-wasm
|
||||
CleanTargetFolder: false
|
||||
OverWrite: false
|
||||
flattenFolders: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Publish Android Binaries'
|
||||
inputs:
|
||||
SourceFolder: $(build.sourcesdirectory)/XamlControlsGallery.Droid/bin/Release
|
||||
Contents: '*.apk'
|
||||
TargetFolder: $(build.artifactstagingdirectory)/XamlUIBasics-android
|
||||
CleanTargetFolder: false
|
||||
OverWrite: false
|
||||
flattenFolders: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Publish Windows Binaries'
|
||||
inputs:
|
||||
SourceFolder: $(build.sourcesdirectory)/XamlControlsGallery.Windows/AppPackages
|
||||
Contents: '**/*.appx'
|
||||
TargetFolder: $(build.artifactstagingdirectory)/XamlUIBasics-windows
|
||||
CleanTargetFolder: false
|
||||
OverWrite: false
|
||||
flattenFolders: false
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
# https://developercommunity.visualstudio.com/content/problem/284991/public-vsts-previouw-cant-set-build-number-of-pr-b.html
|
||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||
inputs:
|
||||
PathtoPublish: $(build.artifactstagingdirectory)
|
||||
ArtifactName: universal-samples-drop
|
||||
ArtifactType: Container
|
|
@ -0,0 +1,62 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net462</TargetFramework>
|
||||
<UpdateAssemblyInfo>false</UpdateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GitVersionTask" Version="3.6.5" />
|
||||
<PackageReference Include="MSBuildTasks" Version="1.5.0.235" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name="UpdateVersion" DependsOnTargets="GetVersion" BeforeTargets="Build">
|
||||
|
||||
<Message Text="Updating versions" />
|
||||
|
||||
<ItemGroup>
|
||||
<_PListFiles Include="../**/Info.plist" Exclude="../**/bin/**;../**/obj/**" />
|
||||
<_AndroidManifestFiles Include="../**/Properties/AndroidManifest.xml" Exclude="../**/bin/**;../**/obj/**"/>
|
||||
<_WindowsManifests Include="../**/package.appxmanifest" Exclude="../**/bin/**;../**/obj/**" />
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Assm: Ver $(GITVERSION_MAJOR).$(GITVERSION_MINOR).$(GITVERSION_COMMITSSINCEVERSIONSOURCE)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdateAndroidManifests" Inputs="@(_AndroidManifestFiles)" Outputs="Invalid" AfterTargets="UpdateVersion">
|
||||
|
||||
<XmlUpdate
|
||||
XmlFileName="%(_AndroidManifestFiles.Identity)"
|
||||
XPath="/manifest/@android:versionCode"
|
||||
Value="$(GITVERSION_COMMITSSINCEVERSIONSOURCE)"
|
||||
Namespace="http://schemas.android.com/apk/res/android"
|
||||
Prefix="android" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdateWindowsManifests" Inputs="@(_windowsManifests)" Outputs="Invalid" AfterTargets="UpdateVersion">
|
||||
|
||||
<XmlUpdate
|
||||
XmlFileName="%(_windowsManifests.Identity)"
|
||||
XPath="/x:Package/x:Identity/@Version"
|
||||
Value="$(GITVERSION_MAJOR).$(GITVERSION_MINOR).$(GITVERSION_COMMITSSINCEVERSIONSOURCE).0"
|
||||
Namespace="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
Prefix="x"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdatePLists" Inputs="@(_PListFiles)" Outputs="Invalid" AfterTargets="UpdateVersion">
|
||||
|
||||
<Message Text="Updating %(_PListFiles.Identity)" Importance="high" />
|
||||
|
||||
<XmlUpdate XmlFileName="%(_PListFiles.Identity)"
|
||||
XPath="//plist/dict/key[text() = 'CFBundleShortVersionString']/following-sibling::string[1]"
|
||||
Value="$(GITVERSION_MAJOR).$(GITVERSION_MINOR)" />
|
||||
|
||||
<XmlUpdate XmlFileName="%(_PListFiles.Identity)"
|
||||
XPath="//plist/dict/key[text() = 'CFBundleVersion']/following-sibling::string[1]"
|
||||
Value="$(GITVERSION_COMMITSSINCEVERSIONSOURCE)" />
|
||||
</Target>
|
||||
|
||||
|
||||
</Project>
|
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче