Skip to content

Commit

Permalink
Setup AppVeyor CI for building, testing and deploying (#1)
Browse files Browse the repository at this point in the history
* Change AppVeyor config for auto build & test with csproj patching for versions
* Make test projects non-packable
* Add AppVeyor.TestLogger NuGet package
* Add version properties to all packed csprojs; add more to main csproj
* Add NuGet deploy on tag to AppVeyor config
  • Loading branch information
brather1ng authored Jul 11, 2019
1 parent 8fedeef commit f0d6919
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Builders.Tests</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Builders.Tests</Product>
<Copyright>Copyright © 2018</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Builders</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Builders</Product>
<Copyright>Copyright © 2018</Copyright>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Enums.NET" Version="2.3.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Common.Tests</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Common.Tests</Product>
<Copyright>Copyright © 2018</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Common</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Common</Product>
<Copyright>Copyright © 2018</Copyright>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Enums.NET" Version="2.3.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Console</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Console</Product>
<Copyright>Copyright © 2017</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibLog" Version="5.0.6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Core.Tests</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Core.Tests</Product>
<Copyright>Copyright © 2018</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Core</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Core</Product>
<Copyright>Copyright © 2017</Copyright>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibLog" Version="5.0.6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Data.Tests</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Data.Tests</Product>
<Copyright>Copyright © 2017</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Data</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Data</Product>
<Copyright>Copyright © 2017</Copyright>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibLog" Version="5.0.6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.IntegrationTests</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.IntegrationTests</Product>
<Copyright>Copyright © 2017</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="LibLog" Version="5.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Parsing.Tests</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Parsing.Tests</Product>
<Copyright>Copyright © 2017</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<AssemblyTitle>PoESkillTree.Engine.Computation.Parsing</AssemblyTitle>
<Product>PoESkillTree.Engine.Computation.Parsing</Product>
<Copyright>Copyright © 2017</Copyright>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibLog" Version="5.0.6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<AssemblyTitle>PoESkillTree.Engine.GameModel.Tests</AssemblyTitle>
<Product>PoESkillTree.Engine.GameModel.Tests</Product>
<Copyright>Copyright © 2018</Copyright>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<AssemblyTitle>PoESkillTree.Engine.GameModel</AssemblyTitle>
<Product>PoESkillTree.Engine.GameModel</Product>
<Copyright>Copyright © 2018</Copyright>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibLog" Version="5.0.6">
Expand Down
2 changes: 2 additions & 0 deletions PoESkillTree.Engine.Utils/PoESkillTree.Engine.Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<AssemblyTitle>PoESkillTree.Engine.Utils</AssemblyTitle>
<Product>PoESkillTree.Engine.Utils</Product>
<Copyright>Copyright © 2017</Copyright>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibLog" Version="5.0.6">
Expand Down
10 changes: 10 additions & 0 deletions PoESkillTree.Engine/PoESkillTree.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<FileVersion>1.0.0.0</FileVersion>

<Title>PoESkillTree.Engine</Title>
<AssemblyTitle>PoESkillTree.Engine</AssemblyTitle>
<Description>The build calculation engine used in PoESkillTree, available as a .NET Standard library.</Description>
<Product>PoESkillTree.Engine</Product>
<Authors>PoESkillTree Dev Team</Authors>
<Copyright>Copyright © PoESkillTree Dev Team 2019</Copyright>
<PackageProjectUrl>https://github.com/PoESkillTree/PoESkillTree.Engine</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/PoESkillTree/PoESkillTree.Engine/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/PoESkillTree/PoESkillTree.Engine.git</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PoESkillTree.Engine.Utils\PoESkillTree.Engine.Utils.csproj" />
Expand Down
30 changes: 23 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
version: 0.1.0-{build}
version: 0.1.0.{build}
image: Visual Studio 2019
configuration: Release
environment:
version: '0.1.0'
semantic_version: '0.1.0'

build_script:
- ps: $env:version_file = $env:version + "." + $env:APPVEYOR_BUILD_NUMBER
- ps: dotnet pack -c Release /p:Version=$env:version /p:FileVersion=$env:version_file /p:PackageOutputPath=../artifacts
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: $(semantic_version)
file_version: '{version}'

test_script:
- dotnet test -c Release
install:
- dotnet restore

build:
publish_nuget: true
publish_nuget_symbols: true
verbosity: minimal

deploy:
- provider: NuGet
api_key:
secure: 9x+8FZFMCiej5zysebNE24Pp8KFgx8R1qBG1BYvFOF10vIXZDxfvElHTEyq6BNCq
skip_symbols: false
artifact: /.*\.nupkg/
on:
APPVEYOR_REPO_TAG: true

0 comments on commit f0d6919

Please sign in to comment.