
Automatic building of OpenTK trunk
Posted Wednesday, 12 August, 2009 - 10:58 by objarni| Project: | The Open Toolkit library |
| Version: | 1.0-2010-10-06 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
As discussed in this thread, it would be good if OpenTK had a continous integration build server, featuring this:
- Hourly update-prebuild-build of OpenTK trunk
- Generation of "build report" in eg. HTML format, viewable from OpenTK.com
This would make it easier for OpenTK developers to know whether a commit has "broken the trunk", and minimize traffic on the forums for issues of mere compilation errors.
Questions:
- What OSs should the build script build on?
- What build tool should be used? NAnt, xbuild, VisualStudio, ..?
- Should the script also produce "nightly builds" of the OpenTK library?
Lets update the above together, since I'm not sure of the details on how to build OpenTK (never done it, shame on me!)


Comments
#1
I suggest using Visual Studio Express Edition as a building tool as it's free and every one can have access.
#2
On Windows, the best solution is to use MSBuild, the build engine that ships with .Net. There is no need to launch an IDE just to build a project (and how would you instruct Visual Studio to build a project anyway)?
On Linux, we have to choose between XBuild (Mono's MSBuild implementation), Nant, makefiles or another custom solution.
The actual build scripts are trivial:
The output for the build commands would be redirected to a logfile that would be copied to a specific location for further processing.
The build server could run some form of Linux with side-by-side Mono installations (for testing multiple versions), plus a Windows VM for testing on Windows. Mono's compiler is the same across operating systems, so there's no need to test *compilation* on Mac OS (testing if it runs is another issue entirely).
The final issue is finding the actual server. Does anyone know of any free build services out there?
#3
I am currently investigating the openSUSE build service as a way to build OpenTK packages automatically. My current understanding is that this will require some changes to the project structure (or at least provide an autotools build script) - if anyone is familiar with the service, please make a post.
#4
What mono version is it to build OpenTK? I'm running Ubuntu 9.04 at home "vanilla" install so to speak.. Might be possible to set something up there, if it is just about checking whether it builds or not. (I can upload the resulting HTML-file to some ftp-site I have access too, then OpenTK.com can use that URL..)
Since I got my computer 24/7 anyway, why not put it to use :)
#5
OpenTK builds correctly on Ubuntu 9.04 (ships with Mono 2.0.1).
I've managed to trace why XBuild 2.4 is failing and will log a bug report to the Mono bug tracker. If I manage to find a simple workaround for this issue, it should be trivial to create a daily build task that uploads the build results to an ftp server.
Objarni, can you please check whether the attached version of xbuild works on your system (just run it from a terminal and see if it crashes)? If it runs, can you test the following sequence of commands?
If it compiles, awesome!
Edit: fixed a typo.
#6
Fiddler, I'm at work :(
Not sure I'm home before 1900 GMT..
#7
No prob, it's not as if this is urgent. :)
#8
:)
Glad to help when I can! l8r..
#9
Ok this is the output from the above script commands:
(cutting away the co of opentk)
#10
Which probably means that xbuild needs the correct Mono stack to function. Thanks for testing, it seems that Nant is the only way to support different Linux distros (unless Prebuild manages to create a working autotools script - I'd forgotten it could do that, let me check).
Edit: the autotools target actually worked! It managed to build OpenTK.dll and OpenTK.Utilities.dll but failed on Examples.exe. I'm not sure I like this approach, but it offers an avenue that does not depend on nant.