This replaces the old and probably outdated work in progress documentation about Jenkins which can still be found here: JenkinsSetupOld. '''This page is currently not up to date with respect to the changes related to [wiki:Phabricator].''' = Installation == Basic installation * The current testing system was installed using the Jenkins repository for debian: http://pkg.jenkins-ci.org/debian/ == Additional plugins * xUnit plugin for unit tests = Configuration I'm still testing different settings and configurations, but the settings listed at the end of this page should be a good base to get a working Jenkins setup. It basically polls SVN for changes, then does svn update, runs update-workspaces.sh and make. After that it executes the unit tests and checks if they all pass. This procedure is done for a debug and a release configuration. == Unit test configuration You can configure Jenkins to run our unit tests and report the results on the web interface. The test executable can be configured and built to produce an xUnit compliant xml file with the test results. 1. Install the xUnit plugin 1. In the project configuration, make sure to pass the argument --jenkins-tests to update-workspaces.sh 1. In the execute shell section, add this script for running the tests. It also contains a small fix for an incompatibility with the xUnit format used by Jenkins. {{{ #!/bin/bash cd 0ad/binaries/system echo "releasetype: $releasetype" if [ "$releasetype" == "debug" ]; then ./test_dbg > ../../../cxxtest_result_$releasetype.xml else ./test > ../../../cxxtest_result_$releasetype.xml fi sed -i 's/date/timestamp/g' ../../../cxxtest_result_$releasetype.xml }}} 4. Add a post-build action to "Publish xUnit test report" as described in the configuration section. == Jenkins config.xml This is the config.xml from /var/lib/jenkins/jobs/0ad. It should contain all required information to configure Jenkins. This format should be sufficient as long as the whole setup and the configuration is not final yet. {{{ #!xml false http://svn.wildfiregames.com/public/ps/trunk 0ad infinity false false false true false false false */10 * * * * false false releasetype debug release 0ad/build/workspaces/update-workspaces.sh -j3 --jenkins-tests --with-system-enet --with-system-nvtt cd 0ad/build/workspaces/gcc make -j3 config=$releasetype #!/bin/bash cd 0ad/binaries/system echo "releasetype: $releasetype" if [ "$releasetype" == "debug" ]; then ./test_dbg > ../../../cxxtest_result_$releasetype.xml else ./test > ../../../cxxtest_result_$releasetype.xml fi sed -i 's/date/timestamp/g' ../../../cxxtest_result_$releasetype.xml cxxtest_result_$releasetype.xml false true false true 1 3000 false }}}