diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 2a89e390..97f70998 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -1,99 +1,7 @@ jobs: -- job: Windows - 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: Samples\XamlUIBasics\cs\AppUIBasics.sln - msbuildLocationMethod: version - msbuildVersion: latest - msbuildArchitecture: x86 - msbuildArguments: "/r /p:Configuration=Release /detailedsummary /m:16 /nr:false" - clean: false - maximumCpuCount: true - restoreNugetPackages: false - logProjectEvents: false - createLogFile: false - - - task: CopyFiles@2 - inputs: - SourceFolder: $(build.sourcesdirectory)/Samples/XamlUIBasics/cs/AppUIBasics.Wasm/bin/Release/netstandard2.0/dist - Contents: '*.*' - TargetFolder: $(build.artifactstagingdirectory)/XamlUIBasics-wasm - 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 - -- job: macos - condition: ne(variables['iOSSigning.Certificate'], '') - pool: - vmImage: 'macOS-10.13' - - 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.sourcesdirectory)/Samples/XamlUIBasics/cs/AppUIBasics.iOS/AppUIBasics.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 - inputs: - SourceFolder: $(build.sourcesdirectory)/Samples/XamlUIBasics/cs/AppUIBasics.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 +- template: .vsts-win-build.yml + parameters: + name: Windows + pool: + vmImage: 'vs2017-win2016' \ No newline at end of file diff --git a/.vsts-macOS-build.yml b/.vsts-macOS-build.yml new file mode 100644 index 00000000..a6f6abb1 --- /dev/null +++ b/.vsts-macOS-build.yml @@ -0,0 +1,52 @@ +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.sourcesdirectory)/Samples/XamlUIBasics/cs/AppUIBasics.iOS/AppUIBasics.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 + inputs: + SourceFolder: $(build.sourcesdirectory)/Samples/XamlUIBasics/cs/AppUIBasics.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 diff --git a/.vsts-prod.yml b/.vsts-prod.yml new file mode 100644 index 00000000..859f0e8b --- /dev/null +++ b/.vsts-prod.yml @@ -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' \ No newline at end of file diff --git a/.vsts-win-build.yml b/.vsts-win-build.yml new file mode 100644 index 00000000..578b25b5 --- /dev/null +++ b/.vsts-win-build.yml @@ -0,0 +1,53 @@ +parameters: + pool: '' + sign: false + +jobs: +- job: Windows + pool: ${{ parameters.pool }} + + 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: Samples\XamlUIBasics\cs\AppUIBasics.sln + msbuildLocationMethod: version + msbuildVersion: latest + msbuildArchitecture: x86 + msbuildArguments: "/r /p:Configuration=Release /detailedsummary /m:16 /nr:false" + clean: false + maximumCpuCount: true + restoreNugetPackages: false + logProjectEvents: false + createLogFile: false + + - task: CopyFiles@2 + inputs: + SourceFolder: $(build.sourcesdirectory)/Samples/XamlUIBasics/cs/AppUIBasics.Wasm/bin/Release/netstandard2.0/dist + Contents: '*.*' + TargetFolder: $(build.artifactstagingdirectory)/XamlUIBasics-wasm + 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