diff --git a/.vsts-ci.yml b/.vsts-ci.yml new file mode 100644 index 0000000..97f7099 --- /dev/null +++ b/.vsts-ci.yml @@ -0,0 +1,7 @@ +jobs: + +- 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 0000000..42f0394 --- /dev/null +++ b/.vsts-macOS-build.yml @@ -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 diff --git a/.vsts-prod.yml b/.vsts-prod.yml new file mode 100644 index 0000000..859f0e8 --- /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 0000000..4c9f88e --- /dev/null +++ b/.vsts-win-build.yml @@ -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 diff --git a/build/Build.csproj b/build/Build.csproj new file mode 100644 index 0000000..68f6ed9 --- /dev/null +++ b/build/Build.csproj @@ -0,0 +1,62 @@ + + + + net462 + false + + + + + + + + + + + + + + <_PListFiles Include="../**/Info.plist" Exclude="../**/bin/**;../**/obj/**" /> + <_AndroidManifestFiles Include="../**/Properties/AndroidManifest.xml" Exclude="../**/bin/**;../**/obj/**"/> + <_WindowsManifests Include="../**/package.appxmanifest" Exclude="../**/bin/**;../**/obj/**" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/nventive.keystore b/build/nventive.keystore new file mode 100644 index 0000000..ecfc945 Binary files /dev/null and b/build/nventive.keystore differ