We have a buildbot

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

We have a buildbot

Post by Lucifer »

The subject says it all. :)

http://buildbot.sourceforge.net/

Here's how it works. I'm running a buildmaster at buildbot.davefancella.com, on port 9989. You can look at the web interface with your browser at port 9990. The buildmaster polls the repo and if there are any changes it tells its connected buildslaves to run a build. Status is in the web interface. There's an "armabuilder" bot in irc that may or may not last there.

We need to work out how we want notifications. :) It can email them, or we can write our own to make a post here to notify how the build went.

Here's what you need to do:

Decide if you have a spare machine hanging around that you can run a buildslave on. We need one for Mac OS X and Windows. My machine will suffice for sanity checking the repo, but we should have a build machine for every platform we want to support. Ideally, the build factory would upload finished packages to beta.armagetronad.net. We'll have to work that one out, too. We should have it so that it builds start-to-finish to a package, say rpm or autopackage or whatever, windows installer. I'll be looking at making the thing support our branches so that it can also be building the 0.2.8 branch.

For developers, when you want to test a build on a specific platform that's got a buildslave, you can use the web interface to run the build. Otherwise, about twice a day, if there are any changes to the repo, builds will be run automatically.

If you want to make a buildslave, go on over to the buildbot site and look in the manual. Specifically look at the build factory section. The rest I've already taken care of, all you need to provide me with is a build factory, which is just a snippet of code that tells the thing how you want the build to run. Then give me a username and password that you want to use and which builds you want to run with that username and password and I'll hook you into the buildmaster. Then read about creating a buildslave, which is insanely easy. Create one and get it running and you're hooked in. The only rules about build factories are these:

* You must build both the dedicated server and the client. By convention here, I'm building the dedicated server first. You can provide two separate factories, in fact I should have done it that way for the one I created. Sue me.
* You should build from start-to-finish an installable package. Exceptions right now are Windows and Mac OS X. Probably any bsd will be a permanent exception. Basically if you want to add yet another linux build-slave, you should be building a specific package.
* When we have tests to run, we'll have the buildslaves run them. We don't right now, afaik.
* You must be willing to let other developers trigger builds on your machine. :)

The idea is simple. The automated build runs will tell us when the source tree breaks and will hopefully make it easier to enforce the standing rule that at least the dedicated server should build in the trunk. When all platforms are supported, release managers can use the system to make releases, obviously. We'll probably want them handmade for final releases, but we can do snapshots and stuff. Anyway, as a development tool the automated builds let us enforce the no-breaking-the-trunk rule. Also, obviously, individual developers can trigger builds on platforms for which they can't build already for whatever reason. This last part is very important because it lets me (or you) work on getting my (or your) changes to build there. It also lets you throw together a build and ask users to download it from aabeta to test, so make sure your build factories ultimately upload a finished package to aabeta!

On notifications. I was considering making a mailing list to send notifications to. Ideally we'd just have them post here, so if anybody wants to write up a notifier that posts to the forums, that's best. If not, we can either do a mailing list, see if the irc bot works, and/or you can just send me your email addresses and I'll put it into the buildmaster.

We don't have to marry this particular tool, but it appears to do everything I think we need it to do. Not sure how it'll work getting it to build in windows and Mac OS X, but the manual says they're supported platforms. I think we need something, and this is what I found that doesn't require java (it uses python, surprisingly enough).

Ironically, when I was testing I discovered the trunk doesn't build right now. !
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11764
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Groovy. I wanted such a thing for a long time.

We do have some tests:
"make distcheck" is provided by autopackage, it makes sure that "make dist" produces a usable result.
"make installcheck" checks that the game installs, runs(basically) and uninstalls cleanly.

I've only got just another slow Linux box to contribute, so nothing real can be gained. Except that I'd be able to configure it exactly like the system I use to build the releases, so I could make it so that RPMs and Autopackages are done. Uploads to aabeta sound doable, too.

I wouldn't even know how to automate a build in Windows, and my Mac skills are also quite noobish. Well, I wouldn't leave those two running around the clock anyway.
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Well, Code::Blocks has a cb_console_runner program which appears to build codeblocks projects. It appears to run under Wine, but since setting up a windows development environment is nontrivial, I haven't finished setting it up. If someone else manages to get it set up......... If I get mine setup, it's to be considered proof of concept, unless someone volunteers a box to take over the generic linux build I'm running. Anyway, so far I've gotten wine to install 7-zip, so I could use it to unpack all the stuff for codeblocks. Now I just need to do the rest of the garbage to set up to build for windows. After getting SDL, SDL_mixer, and all the other junk in there I still need to get NSIS (which ran in Wine 2 years ago, I assume it still does). This is very important! With joda somewhat MIA (I see him in yahoo messenger every now and then), and K on indefinite hiatus, we currently have no windows developer! So if we can get the thing built, even in Wine, to where we can make packages, we can get people to help test quite easily.

:)

Is make distcheck useful when you've configured for the dedicated server? My understanding has been that you have to configure for the client for it to be useful, so I've only enabled it for the client build right now.

Yes, if you want to setup your spare box to build a package and hook it in to the buildbot, go right ahead. I'd suggest only setting it up for one package, in particular the autopackage, since that's probably the most useful one to setup first. The other distribution-specific packages can follow in time, but the autopackage is the one that almost everybody in linux can use. Although if you're considering setting it up for a build, I'd like you to reread my first paragraph and determine if you have the time to do that stuff. :)

Also, if belenus stumbles across this thread, I'd like him to volunteer a bsd box of some sort for us. We could better support bsd thataway. Just a build from source is fine there, afaik that's how all the bsd's distribute programs anyway. If he wants to contribute a package for his OS, that's fine too, but I'm most interested in the build from source situation.

Obviously I'm expecting nemo to show up for Mac support.

Edit: Oh yeah, the other thing we need to work out is when is a good time to run the nightly build? It should run when nobody is likely to be coding, and at a time when everyone can commit to not committing changes that break the build. :) Exceptions can be made from time to time, you know, when you're in the zone, I'd hate for you to stop because the nightly build is about to run. In those cases, you can go to the web interface and tell it to build after you're done, but those should be the exceptions and not the rules. So how about a little survey on when folks do their development? GMT would be best.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
belenus
Round Winner
Posts: 269
Joined: Wed Nov 30, 2005 6:22 pm
Location: Cologne
Contact:

Post by belenus »

Maybe Z could use my virtual server for something here since I have no clue =)
- bel
User avatar
Z-Man
God & Project Admin
Posts: 11764
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

The one you gave me access to? It reports to be a Linux machine. Or do you mean another one? Mind that the automatic build is likely to use up all of the server's CPU resources whether we renice it or not.

We also have, in theory, the SF compile farm. We're lucky if we get the server to build there, though, as the machines there are pretty stripped down.

distcheck and dist work in all configurations. Or at least, they're supposed to work in all configurations.
User avatar
belenus
Round Winner
Posts: 269
Joined: Wed Nov 30, 2005 6:22 pm
Location: Cologne
Contact:

Post by belenus »

z-man wrote:The one you gave me access to? It reports to be a Linux machine. Or do you mean another one? Mind that the automatic build is likely to use up all of the server's CPU resources whether we renice it or not.
Yes I mean that linux machine. There isn't much running on that server (bind, tor) so if the ressources are enough to get it compiled, it doesn't matter as long as you do not recompile stuff the whole day. =)
- bel
User avatar
Z-Man
God & Project Admin
Posts: 11764
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Hmm, it's debian. We currently have no debian developer either and hence, no .deb distribution files. Could be useful, I'd say, provided I manage to grok the factory stuff and the debian build process and you install the required development packages for the client libraries (IIRC, the debian build requires that, otherwise I could build .debs here from gentoo). One thing after the other, I'd say.
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Yay, the buildbot builds the trunk now. :)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Even better, the buildbot fails on the trunk because both make distcheck and make installcheck fail. I don't know if make installcheck will ever succeed in the buildbot, but make distcheck should succeed and it doesn't. Not in the trunk anyway. Haven't tested the branch.

To add a slave:
0. Install python (can't build arma without it anyway, duh)
1. Install twisted
2. Install buildbot (buildmaster is 0.75, portage has 0.74, don't know if that's a problem or not)
3. svn co https://armagetronad.svn.sourceforge.ne ... buildslave
4. cd buildslave
5. vi buildbot.tac
6. Change password, username, and the other thing (root directory)
7. make start

That's to run a slave on your machine. To actually add it to the system, I need to give you a user and password and do some work on the buildmaster. Also, as noted in the buildbot.tac file, please don't commit your buildslave directory after you create your slave. It's arguable whether or not this should even be in svn since it's just the generated files with some added comments. But don't commit it after you put your user and pass in it, because then the whole world can see it. Commit it after you generalize it so a hard-coded user and pass isn't needed anymore. :)

To make a new buildFactory:

svn co https://armagetronad.svn.sourceforge.ne ... uildmaster
cd buildmaster
vi master.cfg

Actually, I'd suggest using your regular code editor, which for me isn't vi. The file is a python source file, so you might have to set syntax highlighting manually. Test your config file with "python master.cfg". That's not a complete test, for a complete test you'll need to run a buildmaster, but don't sweat it. Just worry about adding your buildFactory and/or tweaking existing buildFactories, and test it for syntax errors with the python interpreter.

Obviously to get it going live you need to tell me so I can update the buildmaster with the new config file.

/me goes to update the buildmaster to use a svn checkout
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Ok, thre doesn't appear to be a phpbb notifier for buildbot, and the irc bot seems to require you to ask it for information, it doesn't just tell you on its own anything. So, how do we want to do notifications? It looks to me like we should just all take email notifications. It's a maximum of 12 emails a day right now (2 hour polling interval), but I can change that to something more like one build per day. Well, wait, it's probably more like 12 * numbuilders, which is currently 2.

Or someone could write up a phpbb notifier for it and I'd be happy to run it. The code should go in buildmaster/support .

Anyway, I watched it build from both the trunk and the 0.2.8 branch when changes were made, so I say it works for the two builders it has.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Last post in this monologue. :)

http://wiki.armagetronad.net/index.php/ ... buildslave (linked form development docs)

http://wiki.armagetronad.net/index.php/ ... umentation (information on the waterfall and what it's for)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Ok, the buildbot has an attached Mac OS X buildslave that builds the client. Assuming the server builds in Mac OS X, it should be fairly straightforward to get it building the server.

Trunk doesn't build, 0.2.8 branch does.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Now everybody go update their sourceforge accounts so that email sent to your user@users.sourceforge.net will go to an account you actually check. Email notification will only be sent when there's a problem, i.e. the build failed when the previous build was successful. It looks like it'll send a different one for each builder, which is fine. The logs will not be attached, but I assume there will be a link in the email for where to see the logs.

Email notifications will be sent to all people who made commits, i.e. those on the blamelist. There is an extra list that you can ask me to put you on where you'll be emailed. I'd like z-man to send me an email address that works so I can put him on that list too, but it's really up to him. Anybody else is welcome to be put on it, just tell me what email address you want to use. Note: you don't have to be a project developer for this, but the information is less useful to you if you're not. But if you're watching for something and you want in, I'll be happy to put you on the list.

The list is kept in a text file, I added more code to the master.cfg file to read this list so it doesn't get stored in svn.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8764
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

So, the 0.2.8 mac build is broke apparently. No Rakefile. I guess nemo got his notification though, just thought I'd mention it. It broke on what looked like a completely unrelated commit.

So, I've added a function to test for c++ source files and auto* files, and am trying to get enough checks to trigger the right builds in the right places. I didn't like my machine going into hardcore build mode when nemo updated the XCode project file. :roll:

I figure I"ll do plain source files trigger all builds. Mac OS build files trigger Mac OS builds, Windows build files trigger Windows builds. Then I'll split out scripting into its own check and put that only on the trunk, since it's not even in 0.2.8. What other specific file types should trigger builds, and where? And why?

I need a list of all Mac OS build files. I don't think I need one for Winders, I think I've got a pretty good handle on what's used to build there now.

Due to an interesting set of circumstances, I'm trying to get a machine that I can install windows on so my wife can take a class this semester. What with the buildbot and all, I'm thinking I'd like to keep the machine on winders and throw it in the closet as a permanent buildslave. I need the box, though. Anybody got a spare computer they can send me? :) We're pretty broke right now, and it doesn't have to be latest and greatest. I have a hard drive, case, power supply, etc. (Maybe have two hard drives, the reason I blamed the one doesn't indicate hard drive failure anymore)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

0.2.8 isn't broke, it is just that I set up the buildbot to do trunk builds, not 0.2.8 builds. I'll add a macosx-client-0.2.8 build factory. The MacOS build process differs from 0.2.8 to trunk, unlike the unix build process, so you can't just switch it over to 0.2.8 when you want.

Files that should trigger a MacOS build:
  • C++ files (duh)
  • MacOS/Armagetron Advanced.xcodeproj/project.pbxproj
  • files in src/macosx
Post Reply