Index: build/jenkins/win_diff.Jenkinsfile =================================================================== --- /dev/null +++ build/jenkins/win_diff.Jenkinsfile @@ -0,0 +1,110 @@ +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 and commit 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 'powershell.exe "svn st --no-ignore | %% {$_.substring(8)} | del -r" ' + bat "svn revert -R ." + bat "arc patch --diff ${params.DIFF_ID} --force" + } + } + } + } + stage ('Update-Workspace') { + steps { + script { + 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 /v:normal") + } + } + stage ('Test release') { + 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 /v:normal") + } + } + stage ('Test debug') { + 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 " ' + } + } +}