Friday, January 16, 2009

IronPython - Nightly Builds

As well as the 'signed-and-supported' releases of IronPython, source code drops of the latest sources are available from the public facing repository. The same is also true of the Dynamic Language Runtime project.

The scripts that pushed from the Microsoft internal repositories to the public ones were broken over Christmas, but on Wednesday new drops arrived with some nice performance improvements.

The source code drops include the 2.0 branch (the stable branch that will shortly be released as 2.0.1) and head (IronPython_Main) that includes deeper changes to the DLR, with even more dramatic performance gains in some areas. Until recently this was referred to as the 2.1 branch; more on that shortly.

To get working binaries from the source code releases it needs to be compiled with the .NET 3.5 compiler. This doesn't require Visual Studio (the compiler is part of the framework) and the resulting binaries will run on .NET 2.0 (SP1). It does require some command line magic, and as I can never remember the exact invocation I blogged it a while back.

Even that isn't now necessary. In his further adventures with Azure (the Microsoft cloud platform), Harry Pierson has created a web application that delivers compiled binaries from the source drops:
Given how often we ship source, we’re thinking of extending the the time between binary drops. Binary releases have to be signed and there’s a fairly arduous process we have to go thru in order to get each binary release out the door.

However, there’s something nice and convenient about downloading a pre-compiled binary release. So I spent my Christmas vacation building a script to download and build IronPython nightly builds. Once built, I compress the binaries and upload them to Azure blob storage. Finally, I built a *very* simple cloud app for users to view and download available nightly builds. As an extra benefit, I’m also providing nightly builds of the DLR.
He's also written a post explaining the technical details behind the nightly build application. As you might expect, most of it is built in IronPython.
The one part I didn’t write in IPy was the Azure cloud web app, which I wrote in C#. Jon Udell’s been investigating getting IPy to run in Azure, but I just wanted something quick and dirty so I decided to use C#.

As for the IronPython parts, for the most part I’m using external tools for downloading, building and compressing. I use the Source Control RSS Feed to discover recent source code changesets, CodePlex Client to download source from CodePlex, MSBuild to build the binaries, 7-zip to compress the binaries and the StorageClient library sample to upload the compressed binaries up to Azure blob storage.

For building and compressing, I’m literally shelling out to MSBuild and 7-Zip via os.system.

Uploading to Azure was very straightforward because of the StorageClient library. Here’s the code to create a blob container object (creating the actual blob container if it doesn’t already exist) and to upload a file to a container.
There are several interesting snippets of information and code in the post.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.