Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SunboX/Prism.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Siegel <me@dansiegel.net>2017-05-16 08:11:01 +0300
committerDan Siegel <me@dansiegel.net>2017-05-20 02:53:31 +0300
commite018b7d970bcc3d86ef2f4d3ff1eabf15d39d39f (patch)
tree3615b51d6892fc811cac149311f94ff70ee44e18
parent72d9ba4fd8788ab5fa7ca804cc023b1b1ca1a00a (diff)
adding appveyor configuration
-rw-r--r--Source/nuspecs/nuget.ps113
-rw-r--r--appveyor.yml94
-rw-r--r--test.ps125
3 files changed, 131 insertions, 1 deletions
diff --git a/Source/nuspecs/nuget.ps1 b/Source/nuspecs/nuget.ps1
index 75b8c88..ca86a8d 100644
--- a/Source/nuspecs/nuget.ps1
+++ b/Source/nuspecs/nuget.ps1
@@ -1,10 +1,21 @@
-
+param([string]$configuration, [string]$solutionPath)
+
$nugetOutputDirectory = '../Build'
$releaseNotesUri = 'https://github.com/PrismLibrary/Prism/wiki/Release-Notes-'
$coreFileVersion = '1.0.0'
$nugetFileName = 'nuget.exe'
+if($solutionPath -like '*PrismLibrary_XF*' -and $configuration -eq 'Release')
+{
+ dotnet pack ../PrismLibrary_XF.sln -c $configuration
+ return
+}
+
+if($configuration -eq 'Test' -or $solutionPath -notlike 'PrismLibrary.sln')
+{
+ return
+}
function Get-FileVersion
{
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..3790a97
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,94 @@
+version: 7.0.0.{build}
+image: Visual Studio 2017
+shallow_clone: true
+skip_branch_with_pr: true
+skip_tags: true
+configuration:
+ - Test
+ - Release
+
+only_commits:
+ files:
+ - appveyor.yml
+ - Source\*
+ - Source\nuspecs\*
+
+nuget:
+ disable_publish_on_pr: true
+
+init:
+ - ps: $env:fullBuildVersion = $env:BuildVersion + $env:APPVEYOR_BUILD_NUMBER
+ - ps: $env:fullBuildSemanticVersion = $env:BuildSemanticVersion + $env:APPVEYOR_BUILD_NUMBER
+ - ps: Write-Host "Build Version:" $env:fullBuildVersion
+ - ps: Write-Host "Build Semantic Version:" $env:fullBuildSemanticVersion
+ - ps: Write-Host "Commit:" $env:APPVEYOR_REPO_COMMIT_MESSAGE
+ - ps: Write-Host "Commit extended:" $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED
+
+assembly_info:
+ patch: true
+ file: 'Source\**\AssemblyInfo.cs'
+ assembly_version: $(fullBuildVersion)
+ assembly_file_version: $(fullBuildVersion)
+ assembly_informational_version: $(fullBuildSemanticVersion)
+
+environment:
+ matrix:
+ - solution_name: .\Source\PrismLibrary_Core.sln
+ - solution_name: .\Source\PrismLibrary_Win10.sln
+ - solution_name: .\Source\PrismLibrary_Wpf.sln
+ - solution_name: .\Source\PrismLibrary_XF.sln
+ - solution_name: .\Source\PrismLibrary.sln
+
+before_build:
+ - nuget restore %solution_name%
+
+#build:
+# parallel: true
+# project: PrismLibrary.sln
+# verbosity: minimal
+
+build_script:
+ - msbuild %solution_name%
+
+test_script:
+ - ps: .\test.ps1 -configuration $Configuration -solutionPath %solution_name%
+ #- dotnet test Source\Prism.Tests\Prism.Tests.csproj -c Test
+ #- vstest.console /logger:Appveyor Source\Wpf\\Prism.Wpf.Tests\bin\Release\Prism.Wpf.Tests.dll
+ #- vstest.console /logger:Appveyor Source\Wpf\Prism.Autofac.Wpf.Tests\bin\Release\Prism.Autofac.Wpf.Tests.dll
+ #- vstest.console /logger:Appveyor Source\Wpf\Prism.DryIoc.Wpf.Tests\bin\Release\Prism.DryIoc.Wpf.Tests.dll
+ #- vstest.console /logger:Appveyor Source\Wpf\Prism.Mef.Wpf.Tests\bin\Release\Prism.Mef.Wpf.Tests.dll
+ #- vstest.console /logger:Appveyor Source\Wpf\Prism.StructureMap.Wpf.Tests\bin\Release\Prism.StructureMap.Wpf.Tests.dll
+ #- vstest.console /logger:Appveyor Source\Wpf\Prism.Unity.Wpf.Tests\bin\Release\Prism.Unity.Wpf.Tests.dll
+ #- dotnet test Source\Xamarin\Prism.Autofac.Forms.Tests\Prism.Autofac.Forms.Tests.csproj -c Test
+ #- dotnet test Source\Xamarin\Prism.DryIoc.Forms.Tests\Prism.DryIoc.Forms.Tests.csproj -c Test
+ #- dotnet test Source\Xamarin\Prism.Forms.Tests\Prism.Forms.Tests.csproj -c Test
+ #- dotnet test Source\Xamarin\Prism.Unity.Forms.Tests\Prism.Unity.Forms.Tests.csproj -c Test
+ # UWP tests are not currently not supported by appveyor: https://github.com/appveyor/ci/issues/393
+
+after_test:
+ -ps: .\Source\nuspecs\nuget.ps1 -configuration %configuration% -solutionPath %solution_name%
+ #- dotnet pack %solution_name%
+ #on:
+ # Configuration: Release
+ # solution_name:
+ #- dotnet pack Source\Prism\PrismLibrary_XF.sln -c Release
+ #- dotnet pack src\Prism.Forms\ -c Release
+ #- dotnet pack src\Prism.Autofac.Forms\ -c Release
+ #- dotnet pack src\Prism.DryIoc.Forms\ -c Release
+ #- dotnet pack src\Prism.Ninject.Forms\ -c Release
+ #- dotnet pack src\Prism.Unity.Forms\ -c Release
+ #- powershell -f .\nuget.ps1
+
+artifacts:
+ - path: 'Source\Build\*.nupkg'
+ - path: 'Source\nuspecs\Packages\*.nupkg'
+
+deploy:
+- provider: NuGet
+ server: https://www.myget.org/F/prism-pre/api/v2/package
+ api_key:
+ secure: ZR2WeSlQqSkfL6YpxWzIqhdeKSdxxPqp9yvN7l+SyIX+yIHNcKNqCENWcE8A6GsQ
+ skip_symbols: false
+ on:
+ branch: master
+ Configuration: Release \ No newline at end of file
diff --git a/test.ps1 b/test.ps1
new file mode 100644
index 0000000..f985823
--- /dev/null
+++ b/test.ps1
@@ -0,0 +1,25 @@
+param([string]$solutionPath, [string]$configuration)
+
+Write-Host "Starting Test Run: $solutionPath - $configuration"
+
+if($solutionPath -like '*PrismLibrary_Core*' -and $configuration -eq 'Release')
+{
+ dotnet test $solutionPath -c $configuration
+}
+elseif($solutionPath -like '*PrismLibrary_Win10*' -and $configuration -eq 'Release')
+{
+
+}
+elseif($solutionPath -like '*PrismLibrary_Wpf*' -and $configuration -eq 'Release')
+{
+ vstest.console /logger:Appveyor Source\Wpf\\Prism.Wpf.Tests\bin\Release\Prism.Wpf.Tests.dll
+ vstest.console /logger:Appveyor Source\Wpf\Prism.Autofac.Wpf.Tests\bin\Release\Prism.Autofac.Wpf.Tests.dll
+ vstest.console /logger:Appveyor Source\Wpf\Prism.DryIoc.Wpf.Tests\bin\Release\Prism.DryIoc.Wpf.Tests.dll
+ vstest.console /logger:Appveyor Source\Wpf\Prism.Mef.Wpf.Tests\bin\Release\Prism.Mef.Wpf.Tests.dll
+ vstest.console /logger:Appveyor Source\Wpf\Prism.StructureMap.Wpf.Tests\bin\Release\Prism.StructureMap.Wpf.Tests.dll
+ vstest.console /logger:Appveyor Source\Wpf\Prism.Unity.Wpf.Tests\bin\Release\Prism.Unity.Wpf.Tests.dll
+}
+elseif($solutionPath -like '*PrismLibrary_XF*' -and $configuration -eq 'Test')
+{
+ dotnet test $solutionPath -c $configuration
+} \ No newline at end of file