Changeset View
Changeset View
Standalone View
Standalone View
build/jenkins/pipelines/win_diff.Jenkinsfile
- This file was added.
def jobs = "2" | |||||
def GlooxOption = "" | |||||
pipeline { | |||||
agent { label 'WindowsSlave' } | |||||
options { | |||||
skipDefaultCheckout() | |||||
} | |||||
parameters { | |||||
string(name: 'DIFF_ID', defaultValue: '', description: 'ID of the Phabricator Differential.') | |||||
string(name: 'PHID', defaultValue: '', description: 'Phabricator ID') | |||||
booleanParam(name: 'gloox', defaultValue: false, description: 'Build the gloox wrapper.') | |||||
booleanParam(name: 'collada', defaultValue: false, description: 'Build the Collada library.') | |||||
} | |||||
stages { | |||||
stage ('Checkout') { | |||||
options { | |||||
retry(3) | |||||
} | |||||
steps { | |||||
script { | |||||
try { | |||||
svn "https://svn.wildfiregames.com/public/ps/trunk" | |||||
} catch(e) { | |||||
bat "svn cleanup" | |||||
sleep 300 | |||||
throw e | |||||
} | |||||
} | |||||
bat "svn cleanup" | |||||
} | |||||
} | |||||
stage ('Patch') { | |||||
steps { | |||||
script { | |||||
try { | |||||
bat "arc patch --diff ${params.DIFF_ID} --force" | |||||
} catch (e) { | |||||
bat "svn revert -R ." | |||||
bat 'powershell.exe "svn st --no-ignore | %% {$_.substring(8)} | del -r" ' | |||||
bat "arc patch --diff ${params.DIFF_ID} --force" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
stage ('Update-Workspace') { | |||||
steps { | |||||
script { | |||||
bat "(robocopy /MIR C:\\wxwidgets3.0.4\\lib libraries\\win32\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0" | |||||
bat "(robocopy /MIR C:\\wxwidgets3.0.4\\include libraries\\win32\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0" | |||||
if (env.gloox == 'true') { | |||||
echo "gloox is enabled" | |||||
GlooxOption = "--build-shared-glooxwrapper" | |||||
bat "del binaries\\system\\glooxwrapper.pdb binaries\\system\\glooxwrapper.lib binaries\\system\\glooxwrapper.dll" | |||||
bat "del binaries\\system\\glooxwrapper_dbg.pdb binaries\\system\\glooxwrapper_dbg.lib binaries\\system\\glooxwrapper_dbg.dll" | |||||
} | |||||
if (env.collada == 'true') { | |||||
echo "collada is enabled" | |||||
bat "del binaries\\system\\Collada.dll" | |||||
} | |||||
} | |||||
bat "cd build\\workspaces && update-workspaces.bat --atlas ${GlooxOption} --jenkins-tests" | |||||
} | |||||
} | |||||
stage ('Release build') { | |||||
steps { | |||||
bat("cd build\\workspaces\\vc2015 && MSBuild.exe pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v140_xp /t:pyrogenesis /t:AtlasUI /t:test /p:Configuration=Release -clp:Warningsonly -clp:ErrorsOnly ") | |||||
} | |||||
} | |||||
stage ('Test release') { | |||||
options { | |||||
timeout(time: 30) | |||||
} | |||||
steps { | |||||
bat 'binaries\\system\\test.exe > cxxtest_release.xml' | |||||
} | |||||
post { | |||||
failure { | |||||
echo (message: readFile (file: "cxxtest_release.xml")) | |||||
} | |||||
always { | |||||
junit "cxxtest_release.xml" | |||||
} | |||||
} | |||||
} | |||||
stage ('Debug build') { | |||||
steps { | |||||
bat("cd build\\workspaces\\vc2015 && MSBuild.exe pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v140_xp /t:pyrogenesis /t:AtlasUI /t:test /p:Configuration=Debug -clp:Warningsonly -clp:ErrorsOnly ") | |||||
} | |||||
} | |||||
stage ('Test debug') { | |||||
options { | |||||
timeout(time: 30) | |||||
} | |||||
steps { | |||||
bat 'binaries\\system\\test_dbg.exe > cxxtest_debug.xml' | |||||
} | |||||
post { | |||||
failure { | |||||
echo (message: readFile (file: "cxxtest_debug.xml")) | |||||
} | |||||
always { | |||||
junit "cxxtest_debug.xml" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
post { | |||||
always { | |||||
step([$class: 'PhabricatorNotifier', commentOnSuccess: true, commentWithConsoleLinkOnFailure: true]) | |||||
bat 'del cxxtest_*.xml' | |||||
bat "svn revert -R ." | |||||
bat 'powershell.exe "svn st binaries/data | %% {$_.substring(8)} | del -r " ' | |||||
bat 'powershell.exe "svn st source/ | %% {$_.substring(8)} | del -r " ' | |||||
} | |||||
} | |||||
} |
Wildfire Games · Phabricator