Index: build/jenkins/win_diff.Jenkinsfile =================================================================== --- /dev/null +++ build/jenkins/win_diff.Jenkinsfile @@ -0,0 +1,76 @@ +def jobs = "2" +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') + } + + 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 D${params.DIFF_ID} --force" + } catch (e) { + bat 'powershell.exe "svn st --no-ignore | %% {$_.substring(8)} | del -r" ' + bat "svn revert -R ." + bat "arc patch D${params.DIFF_ID} --force" + } + } + } + } + stage ('Update-Workspace') { + steps { + bat "cd build\\workspaces && update-workspaces.bat --jenkins-tests" + } + } + stage ('Build') { + steps { + bat("cd build\\workspaces\\vc2015 && MSBuild.exe pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v140_xp /t:pyrogenesis /t:test /p:Configuration=Release -clp:Warningsonly -clp:ErrorsOnly") + } + } + stage ('Tests') { + steps { + bat 'binaries\\system\\test.exe > cxxtest_release.xml' + } + post { + unsuccessful { + echo (message: readFile (file: "cxxtest_release.xml")) + } + always { + junit "cxxtest_release.xml" + } + } + } + } + post { + always { + step([$class: 'PhabricatorNotifier', commentOnSuccess: true, commentWithConsoleLinkOnFailure: true]) + 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 " ' + } + } +}