Index: build/jenkins/win_autobuild.Jenkinsfile =================================================================== --- build/jenkins/win_autobuild.Jenkinsfile +++ build/jenkins/win_autobuild.Jenkinsfile @@ -0,0 +1,91 @@ +def AtlasPrj = "" +def output = "" +pipeline { + agent { label 'WindowsSlave' } + 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('Setup workspace') { + steps { + bat 'robocopy /MIR C:\\wxwidgets3.0.2\\lib libraries\\win32\\wxwidgets\\lib & IF %ERRORLEVEL% LEQ 1 exit 0' + bat 'robocopy /MIR C:\\wxwidgets3.0.2\\include libraries\\win32\\wxwidgets\\include & IF %ERRORLEVEL% LEQ 1 exit 0' + bat "cd build\\workspaces && update-workspaces.bat --atlas --build-shared-glooxwrapper --large-address-aware --jenkins-tests" + bat "del binaries\\system\\pyrogenesis.pdb binaries\\system\\pyrogenesis.exe" + script { + if (env.atlas.toBoolean() == true) { + AtlasPrj = "/t:AtlasUI" + bat "del binaries\\system\\AtlasUI.dll" + echo "atlas is enabled" + } + if (env.gloox.toBoolean() == true) { + bat "del binaries\\system\\glooxwrapper.pdb binaries\\system\\glooxwrapper.lib binaries\\system\\glooxwrapper.dll" + echo "gloox is enabled" + } + if(env.collada.toBoolean() == true) { + bat "del binaries\\system\\Collada.dll" + echo "collada is enabled" + } + output = bat(returnStdout: true, script: 'svnversion source -n').trim() + output = output.readLines().drop(1).join("") + } + bat "echo L\"${output}\" > build\\svn_revision\\svn_revision.txt" + } + } + stage ('Build') { + steps { + bat 'cd build\\workspaces\\vc2015 && MSBuild.exe pyrogenesis.sln /m /t:pyrogenesis %AtlasPrj% /t:test /p:Configuration="Release"' + } + } + stage ('Tests') { + steps { + // does not work here, works in batch file called from cmd + bat 'binaries\\system\\test > cxxtest_release.xml' + } + post { + always { + junit "cxxtest_*.xml" + } + } + } + stage ('Commit') { + steps { + bat "svn changelist --remove --recursive --cl commit" + script { + if (env.pyrogenesis.toBoolean() == true) { + bat "svn changelist commit binaries\\system\\pyrogenesis.pdb binaries\\system\\pyrogenesis.exe" + } + if (env.atlas.toBoolean() == true) { + bat "svn changelist commit binaries\\system\\AtlasUI.dll" + } + if (env.collada.toBoolean() == true) { + bat "svn changelist commit binaries\\system\\Collada.dll" + } + if (env.gloox.toBoolean() == true) { + bat "svn changelist commit binaries\\system\\glooxwrapper.dll binaries\\system\\glooxwrapper.lib binaries\\system\\glooxwrapper.pdb" + } + } + bat 'svn ci --changelist commit --non-interactive -m "[Windows] Automated build."' + } + } + } + post { + always { + bat "svn revert -R ." + } + } +}