Skip to content

Commit 5d3645d

Browse files
committed
Testing CI support
1 parent d2da824 commit 5d3645d

5 files changed

Lines changed: 170 additions & 24 deletions

File tree

‎.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,8 @@ paket-files/
250250
# JetBrains Rider
251251
.idea/
252252
*.sln.iml
253+
254+
255+
# Binaries
256+
TorchBinaries
257+
GameBinaries

‎Essentials.sln‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26730.8
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials", "Essentials\Essentials.csproj", "{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Debug|x64 = Debug|x64
12+
Release|Any CPU = Release|Any CPU
13+
Release|x64 = Release|x64
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|Any CPU.ActiveCfg = Debug|x64
17+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|x64.ActiveCfg = Debug|x64
18+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|x64.Build.0 = Debug|x64
19+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|Any CPU.ActiveCfg = Release|x64
20+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|x64.ActiveCfg = Release|x64
21+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|x64.Build.0 = Release|x64
22+
EndGlobalSection
23+
GlobalSection(SolutionProperties) = preSolution
24+
HideSolutionNode = FALSE
25+
EndGlobalSection
26+
GlobalSection(ExtensibilityGlobals) = postSolution
27+
SolutionGuid = {F5A14432-44BA-480B-8B20-1AC78BEF79BC}
28+
EndGlobalSection
29+
EndGlobal

‎Essentials/Essentials.csproj‎

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
</PropertyGroup>
1313
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
1414
<DebugSymbols>true</DebugSymbols>
15-
<OutputPath>bin\x64\Debug\</OutputPath>
15+
<OutputPath>$(SolutionDir)\bin\x64\Debug\</OutputPath>
1616
<DefineConstants>DEBUG;TRACE</DefineConstants>
1717
<DebugType>full</DebugType>
1818
<PlatformTarget>x64</PlatformTarget>
1919
<ErrorReport>prompt</ErrorReport>
2020
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
2121
</PropertyGroup>
2222
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
23-
<OutputPath>bin\x64\Release\</OutputPath>
23+
<OutputPath>$(SolutionDir)\bin\x64\Release\</OutputPath>
2424
<DefineConstants>TRACE</DefineConstants>
2525
<Optimize>true</Optimize>
2626
<DebugType>pdbonly</DebugType>
@@ -31,26 +31,33 @@
3131
<ItemGroup>
3232
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
3333
<HintPath>packages\NLog.4.4.11\lib\net45\NLog.dll</HintPath>
34+
<Private>False</Private>
3435
</Reference>
3536
<Reference Include="PresentationCore" />
3637
<Reference Include="PresentationFramework" />
3738
<Reference Include="Sandbox.Common">
38-
<HintPath>..\..\Torch\GameBinaries\Sandbox.Common.dll</HintPath>
39+
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Common.dll</HintPath>
40+
<Private>False</Private>
3941
</Reference>
4042
<Reference Include="Sandbox.Game">
41-
<HintPath>..\..\Torch\GameBinaries\Sandbox.Game.dll</HintPath>
43+
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Game.dll</HintPath>
44+
<Private>False</Private>
4245
</Reference>
4346
<Reference Include="Sandbox.Graphics">
44-
<HintPath>..\..\Torch\GameBinaries\Sandbox.Graphics.dll</HintPath>
47+
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Graphics.dll</HintPath>
48+
<Private>False</Private>
4549
</Reference>
4650
<Reference Include="SpaceEngineers.Game">
47-
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.Game.dll</HintPath>
51+
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.Game.dll</HintPath>
52+
<Private>False</Private>
4853
</Reference>
4954
<Reference Include="SpaceEngineers.ObjectBuilders">
50-
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
55+
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
56+
<Private>False</Private>
5157
</Reference>
5258
<Reference Include="SpaceEngineers.ObjectBuilders.XmlSerializers">
53-
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
59+
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
60+
<Private>False</Private>
5461
</Reference>
5562
<Reference Include="System" />
5663
<Reference Include="System.Core" />
@@ -63,52 +70,68 @@
6370
<Reference Include="System.Net.Http" />
6471
<Reference Include="System.Xml" />
6572
<Reference Include="Torch">
66-
<HintPath>..\..\Torch\bin\x64\Release\Torch.dll</HintPath>
73+
<HintPath>$(SolutionDir)\TorchBinaries\Torch.dll</HintPath>
74+
<Private>False</Private>
6775
</Reference>
6876
<Reference Include="Torch.API">
69-
<HintPath>..\..\Torch\bin\x64\Release\Torch.API.dll</HintPath>
77+
<HintPath>$(SolutionDir)\TorchBinaries\Torch.API.dll</HintPath>
78+
<Private>False</Private>
7079
</Reference>
7180
<Reference Include="Torch.Server">
72-
<HintPath>..\..\Torch\bin\x64\Release\Torch.Server.exe</HintPath>
81+
<HintPath>$(SolutionDir)\TorchBinaries\Torch.Server.exe</HintPath>
82+
<Private>False</Private>
7383
</Reference>
7484
<Reference Include="VRage">
75-
<HintPath>..\..\Torch\GameBinaries\VRage.dll</HintPath>
85+
<HintPath>$(SolutionDir)\GameBinaries\VRage.dll</HintPath>
86+
<Private>False</Private>
7687
</Reference>
7788
<Reference Include="VRage.Audio">
78-
<HintPath>..\..\Torch\GameBinaries\VRage.Audio.dll</HintPath>
89+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Audio.dll</HintPath>
90+
<Private>False</Private>
7991
</Reference>
8092
<Reference Include="VRage.Dedicated">
81-
<HintPath>..\..\Torch\GameBinaries\VRage.Dedicated.dll</HintPath>
93+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Dedicated.dll</HintPath>
94+
<Private>False</Private>
8295
</Reference>
8396
<Reference Include="VRage.Game">
84-
<HintPath>..\..\Torch\GameBinaries\VRage.Game.dll</HintPath>
97+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Game.dll</HintPath>
98+
<Private>False</Private>
8599
</Reference>
86100
<Reference Include="VRage.Game.XmlSerializers">
87-
<HintPath>..\..\Torch\GameBinaries\VRage.Game.XmlSerializers.dll</HintPath>
101+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Game.XmlSerializers.dll</HintPath>
102+
<Private>False</Private>
88103
</Reference>
89104
<Reference Include="VRage.Input">
90-
<HintPath>..\..\Torch\GameBinaries\VRage.Input.dll</HintPath>
105+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Input.dll</HintPath>
106+
<Private>False</Private>
91107
</Reference>
92108
<Reference Include="VRage.Library">
93-
<HintPath>..\..\Torch\GameBinaries\VRage.Library.dll</HintPath>
109+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Library.dll</HintPath>
110+
<Private>False</Private>
94111
</Reference>
95112
<Reference Include="VRage.Math">
96-
<HintPath>..\..\Torch\GameBinaries\VRage.Math.dll</HintPath>
113+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Math.dll</HintPath>
114+
<Private>False</Private>
97115
</Reference>
98116
<Reference Include="VRage.Native">
99-
<HintPath>..\..\Torch\GameBinaries\VRage.Native.dll</HintPath>
117+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Native.dll</HintPath>
118+
<Private>False</Private>
100119
</Reference>
101120
<Reference Include="VRage.OpenVRWrapper">
102-
<HintPath>..\..\Torch\GameBinaries\VRage.OpenVRWrapper.dll</HintPath>
121+
<HintPath>$(SolutionDir)\GameBinaries\VRage.OpenVRWrapper.dll</HintPath>
122+
<Private>False</Private>
103123
</Reference>
104124
<Reference Include="VRage.Render">
105-
<HintPath>..\..\Torch\GameBinaries\VRage.Render.dll</HintPath>
125+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Render.dll</HintPath>
126+
<Private>False</Private>
106127
</Reference>
107128
<Reference Include="VRage.Render11">
108-
<HintPath>..\..\Torch\GameBinaries\VRage.Render11.dll</HintPath>
129+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Render11.dll</HintPath>
130+
<Private>False</Private>
109131
</Reference>
110132
<Reference Include="VRage.Scripting">
111-
<HintPath>..\..\Torch\GameBinaries\VRage.Scripting.dll</HintPath>
133+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Scripting.dll</HintPath>
134+
<Private>False</Private>
112135
</Reference>
113136
<Reference Include="WindowsBase" />
114137
</ItemGroup>

‎Jenkins/jenkins-grab-se.ps1‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pushd
2+
3+
$steamData = "C:/Steam/Data/"
4+
$steamCMDPath = "C:/Steam/steamcmd/"
5+
$steamCMDZip = "C:/Steam/steamcmd.zip"
6+
7+
Add-Type -AssemblyName System.IO.Compression.FileSystem
8+
9+
if (!(Test-Path $steamData)) {
10+
mkdir "$steamData"
11+
}
12+
if (!(Test-Path $steamCMDPath)) {
13+
if (!(Test-Path $steamCMDZip)) {
14+
(New-Object System.Net.WebClient).DownloadFile("https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip", "$steamCMDZip");
15+
}
16+
[System.IO.Compression.ZipFile]::ExtractToDirectory($steamCMDZip, $steamCMDPath)
17+
}
18+
19+
cd "$steamData"
20+
& "$steamCMDPath/steamcmd.exe" "+login anonymous" "+force_install_dir $steamData" "+app_update 298740" "+quit"
21+
22+
popd

‎Jenkinsfile‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
def test_with_torch(branch)
2+
{
3+
try {
4+
stage('Acquire Torch ' + branch) {
5+
bat 'IF EXIST TorchBinaries RMDIR /S /Q TorchBinaries'
6+
bat 'mkdir TorchBinaries'
7+
step([$class: 'CopyArtifact', projectName: "Torch/Torch/${branch}", filter: "**/Torch*.dll", flatten: true, fingerprintArtifacts: true, target: "TorchBinaries"])
8+
}
9+
10+
stage('Build + Torch ' + branch) {
11+
// bat "\"${tool 'MSBuild'}msbuild\" Essentials.sln /p:Configuration=Release /p:Platform=x64 /t:TransformOnBuild"
12+
bat "\"${tool 'MSBuild'}msbuild\" Essentials.sln /p:Configuration=Release /p:Platform=x64"
13+
}
14+
15+
/*
16+
stage('Test + Torch ' + branch) {
17+
bat 'IF NOT EXIST reports MKDIR reports'
18+
bat "\"packages/xunit.runner.console.2.2.0/tools/xunit.console.exe\" \"bin-test/x64/Release/Essentials.Tests.dll\" -parallel none -xml \"reports/Essentials.Tests.xml\""
19+
step([
20+
$class: 'XUnitBuilder',
21+
thresholdMode: 1,
22+
thresholds: [[$class: 'FailedThreshold', failureThreshold: '1']],
23+
tools: [[
24+
$class: 'XUnitDotNetTestType',
25+
deleteOutputFiles: true,
26+
failIfNotNew: true,
27+
pattern: 'reports/*.xml',
28+
skipNoTestFiles: false,
29+
stopProcessingIfError: true
30+
]]
31+
])
32+
}
33+
*/
34+
35+
stage('Archive + Torch ' + branch) {
36+
bat "copy bin/x64/Release/Essentials.dll bin/x64/Release/Essentials-${branch}.dll"
37+
archiveArtifacts artifacts: "bin/x64/Release/Essentials-${branch}.dll", caseSensitive: false, fingerprint: true, onlyIfSuccessful: true
38+
}
39+
40+
return true
41+
} catch (e) {
42+
return false
43+
}
44+
}
45+
46+
node {
47+
stage('Checkout') {
48+
checkout scm
49+
}
50+
51+
stage('Acquire SE') {
52+
bat 'powershell -File Jenkins/jenkins-grab-se.ps1'
53+
bat 'IF EXIST GameBinaries RMDIR GameBinaries'
54+
bat 'mklink /J GameBinaries "C:/Steam/Data/DedicatedServer64/"'
55+
}
56+
57+
stage('Acquire NuGet Packages') {
58+
bat 'nuget restore Essentials.sln'
59+
}
60+
61+
bool resultMaster = test_with_torch("master")
62+
bool resultStaging = test_with_torch("staging")
63+
if (resultMaster || resultStaging)
64+
currentBuild.result = "SUCCESS"
65+
else
66+
currentBuild.result = "FAIL"
67+
}

0 commit comments

Comments
 (0)