Skip to content

Commit 6afce74

Browse files
committed
Jenkins
1 parent b63fa12 commit 6afce74

7 files changed

Lines changed: 175 additions & 77 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,6 @@ paket-files/
250250
# JetBrains Rider
251251
.idea/
252252
*.sln.iml
253+
254+
GameBinaries
255+
TorchBinaries
Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.26730.8
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Concealment", "Concealment.csproj", "{E5C0184B-7DC4-43D8-872E-2F71162748AA}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Concealment", "Concealment/Concealment.csproj", "{E5C0184B-7DC4-43D8-872E-2F71162748AA}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10-
Debug|Any CPU = Debug|Any CPU
1110
Debug|x64 = Debug|x64
12-
Release_NoPhys|Any CPU = Release_NoPhys|Any CPU
13-
Release_NoPhys|x64 = Release_NoPhys|x64
14-
Release|Any CPU = Release|Any CPU
1511
Release|x64 = Release|x64
1612
EndGlobalSection
1713
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
2014
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Debug|x64.ActiveCfg = Debug|x64
2115
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Debug|x64.Build.0 = Debug|x64
22-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release_NoPhys|Any CPU.ActiveCfg = Release_NoPhys|Any CPU
23-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release_NoPhys|Any CPU.Build.0 = Release_NoPhys|Any CPU
24-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release_NoPhys|x64.ActiveCfg = Release_NoPhys|x64
25-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release_NoPhys|x64.Build.0 = Release_NoPhys|x64
26-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
27-
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release|Any CPU.Build.0 = Release|Any CPU
2816
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release|x64.ActiveCfg = Release|x64
2917
{E5C0184B-7DC4-43D8-872E-2F71162748AA}.Release|x64.Build.0 = Release|x64
3018
EndGlobalSection

‎Concealment/Concealment.csproj‎

Lines changed: 54 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
75
<ProjectGuid>{E5C0184B-7DC4-43D8-872E-2F71162748AA}</ProjectGuid>
86
<OutputType>Library</OutputType>
97
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -12,88 +10,62 @@
1210
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1311
<FileAlignment>512</FileAlignment>
1412
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<DebugSymbols>true</DebugSymbols>
17-
<DebugType>full</DebugType>
18-
<Optimize>false</Optimize>
19-
<OutputPath>bin\Debug\</OutputPath>
20-
<DefineConstants>DEBUG;TRACE</DefineConstants>
21-
<ErrorReport>prompt</ErrorReport>
22-
<WarningLevel>4</WarningLevel>
23-
</PropertyGroup>
24-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25-
<DebugType>pdbonly</DebugType>
26-
<Optimize>true</Optimize>
27-
<OutputPath>bin\Release\</OutputPath>
28-
<DefineConstants>TRACE</DefineConstants>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
31-
</PropertyGroup>
3213
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
3314
<DebugSymbols>true</DebugSymbols>
34-
<OutputPath>bin\x64\Debug\</OutputPath>
15+
<OutputPath>$(SolutionDir)\bin\x64\Debug\</OutputPath>
3516
<DefineConstants>DEBUG;TRACE</DefineConstants>
3617
<DebugType>full</DebugType>
3718
<PlatformTarget>x64</PlatformTarget>
3819
<ErrorReport>prompt</ErrorReport>
3920
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4021
</PropertyGroup>
4122
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
42-
<OutputPath>bin\x64\Release\</OutputPath>
43-
<DefineConstants>TRACE</DefineConstants>
44-
<Optimize>true</Optimize>
45-
<DebugType>pdbonly</DebugType>
46-
<PlatformTarget>x64</PlatformTarget>
47-
<ErrorReport>prompt</ErrorReport>
48-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
49-
</PropertyGroup>
50-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_NoPhys|AnyCPU'">
51-
<OutputPath>bin\Release_NoPhys\</OutputPath>
23+
<OutputPath>$(SolutionDir)\bin\x64\Release\</OutputPath>
5224
<DefineConstants>TRACE</DefineConstants>
5325
<Optimize>true</Optimize>
5426
<DebugType>pdbonly</DebugType>
55-
<PlatformTarget>AnyCPU</PlatformTarget>
56-
<ErrorReport>prompt</ErrorReport>
57-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
58-
</PropertyGroup>
59-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_NoPhys|x64'">
60-
<OutputPath>bin\x64\Release_NoPhys\</OutputPath>
61-
<DefineConstants>TRACE;NOPHYS</DefineConstants>
62-
<Optimize>true</Optimize>
63-
<DebugType>pdbonly</DebugType>
6427
<PlatformTarget>x64</PlatformTarget>
6528
<ErrorReport>prompt</ErrorReport>
6629
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
6730
</PropertyGroup>
6831
<ItemGroup>
6932
<Reference Include="HavokWrapper">
70-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\HavokWrapper.dll</HintPath>
33+
<HintPath>$(SolutionDir)\GameBinaries\HavokWrapper.dll</HintPath>
34+
<Private>False</Private>
7135
</Reference>
72-
<Reference Include="NLog">
73-
<HintPath>$(SolutionDir)\..\..\Torch\bin\x64\Release\NLog.dll</HintPath>
36+
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
37+
<HintPath>..\packages\NLog.4.4.12\lib\net45\NLog.dll</HintPath>
38+
<Private>False</Private>
7439
</Reference>
7540
<Reference Include="PresentationCore" />
7641
<Reference Include="PresentationFramework" />
7742
<Reference Include="Sandbox.Common">
78-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\Sandbox.Common.dll</HintPath>
43+
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Common.dll</HintPath>
44+
<Private>False</Private>
7945
</Reference>
8046
<Reference Include="Sandbox.Game">
81-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\Sandbox.Game.dll</HintPath>
47+
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Game.dll</HintPath>
48+
<Private>False</Private>
8249
</Reference>
8350
<Reference Include="Sandbox.Graphics">
84-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\Sandbox.Graphics.dll</HintPath>
51+
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Graphics.dll</HintPath>
52+
<Private>False</Private>
8553
</Reference>
8654
<Reference Include="SpaceEngineers.Game">
87-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\SpaceEngineers.Game.dll</HintPath>
55+
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.Game.dll</HintPath>
56+
<Private>False</Private>
8857
</Reference>
8958
<Reference Include="SpaceEngineers.ObjectBuilders">
90-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
59+
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
60+
<Private>False</Private>
9161
</Reference>
9262
<Reference Include="SpaceEngineers.ObjectBuilders.XmlSerializers">
93-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
63+
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
64+
<Private>False</Private>
9465
</Reference>
9566
<Reference Include="SteamSDK">
96-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\SteamSDK.dll</HintPath>
67+
<HintPath>$(SolutionDir)\GameBinaries\SteamSDK.dll</HintPath>
68+
<Private>False</Private>
9769
</Reference>
9870
<Reference Include="System" />
9971
<Reference Include="System.Core" />
@@ -106,50 +78,65 @@
10678
<Reference Include="System.Xml" />
10779
<Reference Include="Torch, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
10880
<SpecificVersion>False</SpecificVersion>
109-
<HintPath>$(SolutionDir)\..\..\Torch\bin\x64\Release\Torch.dll</HintPath>
81+
<HintPath>$(SolutionDir)\TorchBinaries\Torch.dll</HintPath>
82+
<Private>False</Private>
11083
</Reference>
11184
<Reference Include="Torch.API, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
11285
<SpecificVersion>False</SpecificVersion>
113-
<HintPath>$(SolutionDir)\..\..\Torch\bin\x64\Release\Torch.API.dll</HintPath>
86+
<HintPath>$(SolutionDir)\TorchBinaries\Torch.API.dll</HintPath>
87+
<Private>False</Private>
11488
</Reference>
11589
<Reference Include="VRage">
116-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.dll</HintPath>
90+
<HintPath>$(SolutionDir)\GameBinaries\VRage.dll</HintPath>
91+
<Private>False</Private>
11792
</Reference>
11893
<Reference Include="VRage.Audio">
119-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Audio.dll</HintPath>
94+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Audio.dll</HintPath>
95+
<Private>False</Private>
12096
</Reference>
12197
<Reference Include="VRage.Dedicated">
122-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Dedicated.dll</HintPath>
98+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Dedicated.dll</HintPath>
99+
<Private>False</Private>
123100
</Reference>
124101
<Reference Include="VRage.Game">
125-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Game.dll</HintPath>
102+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Game.dll</HintPath>
103+
<Private>False</Private>
126104
</Reference>
127105
<Reference Include="VRage.Game.XmlSerializers">
128-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Game.XmlSerializers.dll</HintPath>
106+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Game.XmlSerializers.dll</HintPath>
107+
<Private>False</Private>
129108
</Reference>
130109
<Reference Include="VRage.Input">
131-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Input.dll</HintPath>
110+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Input.dll</HintPath>
111+
<Private>False</Private>
132112
</Reference>
133113
<Reference Include="VRage.Library">
134-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Library.dll</HintPath>
114+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Library.dll</HintPath>
115+
<Private>False</Private>
135116
</Reference>
136117
<Reference Include="VRage.Math">
137-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Math.dll</HintPath>
118+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Math.dll</HintPath>
119+
<Private>False</Private>
138120
</Reference>
139121
<Reference Include="VRage.Native">
140-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Native.dll</HintPath>
122+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Native.dll</HintPath>
123+
<Private>False</Private>
141124
</Reference>
142125
<Reference Include="VRage.OpenVRWrapper">
143-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.OpenVRWrapper.dll</HintPath>
126+
<HintPath>$(SolutionDir)\GameBinaries\VRage.OpenVRWrapper.dll</HintPath>
127+
<Private>False</Private>
144128
</Reference>
145129
<Reference Include="VRage.Render">
146-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Render.dll</HintPath>
130+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Render.dll</HintPath>
131+
<Private>False</Private>
147132
</Reference>
148133
<Reference Include="VRage.Render11">
149-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Render11.dll</HintPath>
134+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Render11.dll</HintPath>
135+
<Private>False</Private>
150136
</Reference>
151137
<Reference Include="VRage.Scripting">
152-
<HintPath>$(SolutionDir)\..\..\Torch\GameBinaries\VRage.Scripting.dll</HintPath>
138+
<HintPath>$(SolutionDir)\GameBinaries\VRage.Scripting.dll</HintPath>
139+
<Private>False</Private>
153140
</Reference>
154141
<Reference Include="WindowsBase" />
155142
</ItemGroup>
@@ -183,5 +170,8 @@
183170
<ItemGroup>
184171
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
185172
</ItemGroup>
173+
<ItemGroup>
174+
<None Include="packages.config" />
175+
</ItemGroup>
186176
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
187177
</Project>

‎Concealment/packages.config‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="NLog" version="4.4.12" targetFramework="net461" />
4+
</packages>

‎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+
step([$class: 'CopyArtifact', projectName: "Torch/Torch/${branch}", filter: "**/Torch*.exe", flatten: true, fingerprintArtifacts: true, target: "TorchBinaries"])
9+
}
10+
11+
stage('Build + Torch ' + branch) {
12+
bat "\"${tool 'MSBuild'}msbuild\" Concealment.sln /p:Configuration=Release /p:Platform=x64 /t:Clean"
13+
// bat "\"${tool 'MSBuild'}msbuild\" Concealment.sln /p:Configuration=Release /p:Platform=x64 /t:TransformOnBuild"
14+
bat "\"${tool 'MSBuild'}msbuild\" Concealment.sln /p:Configuration=Release /p:Platform=x64"
15+
}
16+
17+
/*
18+
stage('Test + Torch ' + branch) {
19+
bat 'IF NOT EXIST reports MKDIR reports'
20+
bat "\"packages/xunit.runner.console.2.2.0/tools/xunit.console.exe\" \"bin-test/x64/Release/Concealment.Tests.dll\" -parallel none -xml \"reports/Concealment.Tests.xml\""
21+
step([
22+
$class: 'XUnitBuilder',
23+
thresholdMode: 1,
24+
thresholds: [[$class: 'FailedThreshold', failureThreshold: '1']],
25+
tools: [[
26+
$class: 'XUnitDotNetTestType',
27+
deleteOutputFiles: true,
28+
failIfNotNew: true,
29+
pattern: 'reports/*.xml',
30+
skipNoTestFiles: false,
31+
stopProcessingIfError: true
32+
]]
33+
])
34+
}
35+
*/
36+
return true
37+
} catch (e) {
38+
return false
39+
}
40+
}
41+
42+
node {
43+
stage('Checkout') {
44+
checkout scm
45+
}
46+
47+
stage('Acquire SE') {
48+
bat 'powershell -File Jenkins/jenkins-grab-se.ps1'
49+
bat 'IF EXIST GameBinaries RMDIR GameBinaries'
50+
bat 'mklink /J GameBinaries "C:/Steam/Data/DedicatedServer64/"'
51+
}
52+
53+
stage('Acquire NuGet Packages') {
54+
bat 'nuget restore Concealment.sln'
55+
}
56+
57+
resultMaster = test_with_torch("master")
58+
resultStaging = test_with_torch("staging")
59+
if (resultMaster || resultStaging) {
60+
currentBuild.result = "SUCCESS"
61+
stage('Archive') {
62+
archiveArtifacts artifacts: "bin/x64/Release/Concealment.dll", caseSensitive: false, fingerprint: true, onlyIfSuccessful: true
63+
}
64+
}
65+
else
66+
currentBuild.result = "FAIL"
67+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
:: This script creates a symlink to the game binaries to account for different installation directories on different systems.
2+
3+
@echo off
4+
set /p path="Please enter the folder location of your SpaceEngineersDedicated.exe: "
5+
cd %~dp0
6+
mklink /J GameBinaries %path%
7+
if errorlevel 1 goto Error
8+
echo Done!
9+
goto End
10+
:Error
11+
echo An error occured creating the symlink.
12+
goto EndFinal
13+
:End
14+
15+
set /p path="Please enter the folder location of your Torch.Server.exe: "
16+
cd %~dp0
17+
mklink /J TorchBinaries %path%
18+
if errorlevel 1 goto Error
19+
echo Done! You can now open the Torch solution without issue.
20+
goto EndFinal
21+
:Error2
22+
echo An error occured creating the symlink.
23+
:EndFinal
24+
pause

0 commit comments

Comments
 (0)