Add skeleton project

This commit is contained in:
Cyberboss
2018-03-28 12:20:59 -04:00
parent 7f54bf32e3
commit 6a94907392
11 changed files with 2672 additions and 24 deletions
+2 -1
View File
@@ -9,4 +9,5 @@ artifacts/
*.suo
*.userprefs
*DS_Store
*.sln.ide
*.sln.ide
/TestResults
+16 -23
View File
@@ -1,37 +1,29 @@
version: {build}
pull_requests:
do_not_increment_build_number: true
environment:
repo_token:
secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK
snk_passphrase:
secure: dsRGlNewYn/JoycPaMoxLCrb3wkL31RsdU7Xwbo7TIAmClwShCVWeRPN+eGA+fMZX12MDNRBs8Fws4IxqLKQ36thQo6p2B+kPksAUJiAOR5QKJoT6nt8JB1wBMFS2kH4
skip_branch_with_pr: true
branches:
only:
- master
- V4
skip_tags: true
image: Visual Studio 2017
configuration: Release
configuration:
- Debug
- Release
shallow_clone: true
artifacts:
- path: TGS3-Server-v*.exe
name: TGS3Server
- path: MD5-SHA1-Server-v*.txt
name: MD5SHA1Server
- path: TGS3-ServerConsole-v*.zip
name: TGS3ServerConsole
- path: MD5-SHA1-ServerConsole-v*.txt
name: MD5SHA1ServerConsole
- path: TGS3-Client-v*.zip
name: TGS3Client
- path: MD5-SHA1-Client-v*.txt
name: MD5SHA1Client
- path artifacts/ServerConsole
cache:
- packages -> **\packages.config
- ~\.nuget\packages -> **\*.csproj
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
install:
- choco install fciv doxygen.portable codecov
before_build:
- nuget restore TGStationServer3.sln
build:
project: TGStationServer3.sln
project: tgstation-server.sln
parallel: false
verbosity: minimal
publish_nuget: true
@@ -43,12 +35,13 @@ after_build:
test_script:
- set path=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow;%path%
- copy "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions\appveyor.*" "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions" /y
- vstest.console /logger:trx;LogFileName=results.trx "TGS.Tests\bin\Release\TGS.Tests.dll" /Enablecodecoverage /Settings:"Tools/CoverageExclusions.runsettings" /inIsolation /Platform:x64
- vstest.console /logger:trx;LogFileName=results.trx "src\Tgstation.Server.Host.Console.Tests\bin\Release\netcoreapp2.1\Tgstation.Server.Host.Console.Tests.dll" /Enablecodecoverage /Settings:"Tools/CoverageExclusions.runsettings" /inIsolation /Platform:x64
- ps: $wc = New-Object 'System.Net.WebClient'
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResults\results.trx))
after_test:
- ps: Tools/UploadCoverage.ps1
- ps: Tools/BuildDox.ps1
- ps: build/UploadCoverage.ps1
- ps: build/BuildDox.ps1
- ps: cd src/Tgstation.Server.Host.Console && dotnet publish -o artifacts/ServerConsole -c $env:CONFIGURATION
deploy:
- provider: GitHub
release: "tgstation-server-v$(TGSVersion)"
+35
View File
@@ -0,0 +1,35 @@
$bf = $Env:APPVEYOR_BUILD_FOLDER
$doxdir = "C:\tgsdox"
New-Item -Path $doxdir -ItemType directory
$publish_dox = (-not (Test-Path Env:APPVEYOR_PULL_REQUEST_NUMBER)) -and ("$Env:APPVEYOR_REPO_BRANCH" -eq "master")
if($publish_dox){
$github_url = "github.com/$Env:APPVEYOR_REPO_NAME"
echo "Cloning https://git@$github_url..."
git clone -b gh-pages --single-branch "https://git@$github_url" "$doxdir" 2>$null
rm -r "$doxdir\*"
Add-Content "$bf\build\Doxyfile" "`nPROJECT_NUMBER = $version`nINPUT = $bf`nOUTPUT_DIRECTORY = $doxdir`nPROJECT_LOGO = $bf/build/tgs.ico"
}else{
Add-Content "$bf\build\Doxyfile" "`nPROJECT_NUMBER = $version`nINPUT = $bf`nOUTPUT_DIRECTORY = $doxdir`nPROJECT_LOGO = $bf/build/tgs.ico"
}
doxygen.exe "$bf\build\Doxyfile"
if($publish_dox){
cd $doxdir
git config --global push.default simple
git config user.name "tgstation-server"
git config user.email "tgstation-server@tgstation13.org"
echo '# THIS BRANCH IS AUTO GENERATED BY APPVEYOR CI' > README.md
# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
echo "" > .nojekyll
git add --all
git commit -m "Deploy code docs to GitHub Pages for Appveyor build $Env:APPVEYOR_BUILD_NUMBER" -m "Commit: $Env:APPVEYOR_REPO_COMMIT"
git push -f "https://$Env:repo_token@$github_url" 2>&1 | out-null
cd "$bf"
}
+2479
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
$coverageFilePath = Resolve-Path -path "TestResults\*\*.coverage"
$coverageFilePath = $coverageFilePath.ToString()
Write-Host "Running CodeCoverage.exe..."
&"C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe" analyze /output:coverage.coveragexml "$coverageFilePath"
rm -r TestResults
codecov -f coverage.coveragexml
@@ -0,0 +1,3 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Tgstation.Server.Host.Console.Tests")]
@@ -0,0 +1,20 @@
using System.Threading.Tasks;
namespace Tgstation.Server.Host.Console
{
/// <summary>
/// Contains the entrypoint for the application
/// </summary>
static class Program
{
/// <summary>
/// Entrypoint for the application
/// </summary>
/// <returns>A <see cref="Task"/> representing the running operation</returns>
public static async Task Main()
{
System.Console.WriteLine("Hello World!");
await Task.CompletedTask.ConfigureAwait(false);
}
}
}
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>Full</DebugType>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile>bin\Release\netcoreapp2.0\Tgstation.Server.Host.Console.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.0" />
</ItemGroup>
</Project>
@@ -0,0 +1,15 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Threading.Tasks;
namespace Tgstation.Server.Host.Console.Tests
{
[TestClass]
public class TestProgram
{
[TestMethod]
public async Task TestProgramRuns()
{
await Program.Main().ConfigureAwait(false);
}
}
}
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.2" />
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Tgstation.Server.Host.Console\Tgstation.Server.Host.Console.csproj" />
</ItemGroup>
</Project>
+48
View File
@@ -0,0 +1,48 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27428.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DA32568D-1D8D-4A4C-9943-BFD3CE796B3F}"
ProjectSection(SolutionItems) = preProject
.codecov.yml = .codecov.yml
.gitignore = .gitignore
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tgstation.Server.Host.Console", "src\Tgstation.Server.Host.Console\Tgstation.Server.Host.Console.csproj", "{A09C947F-4B9B-4AEE-AB50-47055EA05F18}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tgstation.Server.Host.Console.Tests", "tests\Tgstation.Server.Host.Console.Tests\Tgstation.Server.Host.Console.Tests.csproj", "{D36B99C4-E771-42D6-A95F-1102B3E236DF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6-3E2C-46D4-872D-D528F77D6973}"
ProjectSection(SolutionItems) = preProject
build\BuildDox.ps1 = build\BuildDox.ps1
build\Doxyfile = build\Doxyfile
build\UploadCoverage.ps1 = build\UploadCoverage.ps1
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A09C947F-4B9B-4AEE-AB50-47055EA05F18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A09C947F-4B9B-4AEE-AB50-47055EA05F18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A09C947F-4B9B-4AEE-AB50-47055EA05F18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A09C947F-4B9B-4AEE-AB50-47055EA05F18}.Release|Any CPU.Build.0 = Release|Any CPU
{D36B99C4-E771-42D6-A95F-1102B3E236DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D36B99C4-E771-42D6-A95F-1102B3E236DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D36B99C4-E771-42D6-A95F-1102B3E236DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D36B99C4-E771-42D6-A95F-1102B3E236DF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DFD36C95-3E49-41C7-ACDB-86BAF5B18A79}
EndGlobalSection
EndGlobal