views:

175

answers:

9

Say that you're developing code which needs to compile and run on multiple hosts (say Linux and Windows), how would you go about doing that in the most efficient manner given that:

  • You have full access to hardware for each host you're compiling for (in my case a Linux host and a Windows host standing on my desk)
  • Building over a network drive is too expensive
  • No commits to a central repository should be required -- assume that there is a CI engine which tries to build as soon as anything is checked in

"Efficient" means keeping the compile-edit-run cycle as short and simple as possible.

A: 

Pick one machine as your development box.

Setup the other one to automatically update from your source control on a regular basis (hourly/daily/whatever). Any build/test failures should send you some sort of warning message. (email,im,whatever). Your non-dev box is still be building locally since it has its own copy of the tree.

Before doing a real release, you still want to do human testing of course. But this keeps life sane the rest of the time.

nsanders
+1  A: 

We find that Hudson is a great CI server that can perform builds from source control as needed. As it is written in Java it can run on your target platform of choice and as the interface is web based you can control it from anywhere. There are plugins to do most things you want to do and best of all it is free!

Peter Kelley
A: 

Building simple setup for such task is very simple.
I will suggest Cygwin to be used on Windows platform. This way you can write completely portable software/scrips for both Linux and Windows platforms. It's not clear from you post on which stage of project your are, but assuming that you only starting i will suggest using make to build your software. You can use cron to schedule the frequency for your check out/build circle. You can even send an email with build log if its broken.
There is number of ready daily build test both commercial and open source you can google for it or may be somebody will add here suggestions.
We are using home grown tool for that task so i can not suggest anything ready made.

Ok, i missed the point that you don't want to use source control system (which is strange, but you are the boss :) ) in this case just replace the check out with rsync everything else stays similar.

Ilya
A: 

Use http://ccache.samba.org to speed up compiles where only a few files have changed in a larger project,

and when large changes have been made, leverage http://en.opensuse.org/Icecream at the same time for shared distributed compiling.

That should probably quicken your compile-edit-run-cycle significantly.

Kent Fredric
+3  A: 

The best thing I can recommend is an awesome cross platform project called 'BuildBot'.

BuildBot can automatically cause a build to occur on every platform you support, every time you check a new revision into your source control system. Have it build on OSX, Linux (ubuntu), Linux (debian), Linux (Redhat), Vista, Windows XP, etc, and have emails sent or whatever you prefer when a build fails.

As part of the build process, you can publish binaries if the tests pass. Useful for 'nightly' or 'bleeding edge' builds.

Here's some urls:

Jerub
But one of the requirements was that no commits should be necessary, i.e. I want to be able to build directly from a single source code tree. We're using Hudson to build on Windows and Linux, so I want to discover any problems without committing.
JesperE
A: 

Since you are using CI I assume you have already set up a build process properly. What we are doing is that we are using windows boxes as dev machines and CI is running on Solaris. This assures that the code compiles well on multiple platforms. The code is in Java and we don't use any native libraries so it is quite guaranteed that the code will work. We are using Bamboo at work - it is great but not free:-)

For my private projects I have been using Continuum, but the Husdon looks neat (I'll give it a try) - thanks Peter.

Petr Macek
+1  A: 

Most of the build servers mentioned in the other answers check out your changes from a version control system. Given your "No commits to a central repository should be required" requirement, I'd suggest that you try Jetbrains TeamCity CI server.

It has plugins fro Visual Studio and Eclipse and allows you to request a "private build", sending your changes straight to the build server. For each project you can define a number of build configurations with different requirements (OS is one of the possible reqs). If the builds succeed, the plugin will prompt you to commit your changes.

The free version supports 3 agents and you can buy more if needed.

It looks like Pulse also has the same feature, but I have no first hand experience with it.

ddimitrov
A: 

One option would be Cascade, which allows you to test your changes on all your platforms before, rather than after, commit, by "checkpointing" them on the server.

A: 

One word: Cruise (not Cruise Control) is very nice.

You can get two agents for free and one one agent per platform. It takes literally minutes to setup on mac and pc, and isn't too bad on linux from what i hear.

brooks hollar