| 1 | |
| 2 | |
| 3 | {{{ |
| 4 | |
| 5 | |
| 6 | <build description="Building System" |
| 7 | xmlns:svn="http://bitten.cmlenz.net/tools/svn" |
| 8 | xmlns:sh="http://bitten.cmlenz.net/tools/sh" |
| 9 | xmlns:python="http://bitten.cmlenz.net/tools/python" |
| 10 | xmlns:x="http://bitten.cmlenz.net/tools/xml"> |
| 11 | <step id="Checkout"> |
| 12 | <sh:exec file="echo" args="Checkout start"/> |
| 13 | <svn:checkout url="file:///C:/Trac/Repo/project" path="" |
| 14 | revision="${revision}"/> |
| 15 | <sh:exec file="echo" args="Checkout complete"/> |
| 16 | </step> |
| 17 | <step id="Build"> |
| 18 | <sh:exec file="echo" args="Build start"/> |
| 19 | <sh:exec file="msbuild.exe" args="project.sln @C:\\Builds\\utils\ |
| 20 | \logger\\msbuild.rsp"/> |
| 21 | <x:transform src="msbuild-output.xml" dest="msbuild-result.xml" |
| 22 | stylesheet="..\\utils\\logger\\msbuild.xsl" /> |
| 23 | <sh:exec file="type" args="msbuild-result.xml"/> |
| 24 | <sh:exec file="echo" args="Build complete"/> |
| 25 | </step> |
| 26 | <step id="Document"> |
| 27 | <!-- Doxygen to be used here --> |
| 28 | </step> |
| 29 | <step id="Smoke Test"> |
| 30 | <sh:exec file="echo" args="Test start"/> |
| 31 | <python:exec file="C:\Python25\Scripts\qmtest.py" |
| 32 | args="-DC:\\Builds\\tdb report -o..\\PreDist\ |
| 33 | \results.xml c:\\Builds\\PreDist\\results.qmr"/> |
| 34 | <x:transform src="C:\\Builds\\PreDist\\results.xml" dest="test- |
| 35 | results.xml" stylesheet="C:\\Builds\\Utils\\logger\\qmtest.xsl" /> |
| 36 | <report category="test" file="test-results.xml" /> |
| 37 | <sh:exec file="echo" args="Test complete"/> |
| 38 | </step> |
| 39 | <step id="Package"> |
| 40 | <sh:exec file="echo" args="Predist start"/> |
| 41 | <sh:exec file="C:\Program Files\NSIS\makensis" args="c:\\Builds\ |
| 42 | \project.nsi"/> |
| 43 | <sh:exec file="echo" args="Predist complete"/> |
| 44 | </step> |
| 45 | </build> |
| 46 | |
| 47 | }}} |
| 48 | |
| 49 | Comments |
| 50 | 'Checkout'. |
| 51 | This is straightforward and simply pulls the latest source into the |
| 52 | build directory. |
| 53 | |
| 54 | 'Build' |
| 55 | Here I use MSBUILD to build my project, using a custom logger (see |
| 56 | http://confluence.public.thoughtworks.org/display/CCNETCOMM/Improved+MSBuild+Integration) |
| 57 | and a .xsl file to make the output from the logger pretty (This is |
| 58 | based on the msbuild2ccnet.xsl file mentioned on the link) |
| 59 | |
| 60 | 'Document' |
| 61 | I plan to use doxygen to auto generate documentation from my source |
| 62 | code here |
| 63 | |
| 64 | 'Smoke Test' |
| 65 | Using a tool called qmtest (here-http://www.codesourcery.com/qmtest) I |
| 66 | have created a database of tests to run. The results are fed back |
| 67 | into bitten. |
| 68 | The tests themselves are AutoIt (http://www.autoitscript.com/autoit3/) |
| 69 | scripts. |
| 70 | |
| 71 | 'Package' |
| 72 | Finally, if all the above succeeds, I use NSIS (http:// |
| 73 | nsis.sourceforge.net/Main_Page) to create an install package that can |
| 74 | be deployed on the target system. |
| 75 | |