JuliaLang/julia — pull request #8774 by tkelman (2014-10-23 02:51:27+00:00)
Title: RFC: build windows cross-compile on Travis

Finally got this to work, as an alternative to #6028. It can't run the tests (something doesn't work right with wine), but it can at least compile and check that the system image bootstraps. If we're worried about our Travis queue getting too long (that's primarily been a problem for osx it seems) we can turn off either win32 or win64, we don't have to do both. I think we learn slightly more from win32, if any 32-vs-64-bit problems would prevent bootstrap but not be noticed on 64 bit Linux or OSX.

This was tricky because it's hard to get modern enough versions of MinGW cross-compilers on Ubuntu 12.04. I found a PPA that builds a recent 4.8.x snapshot, but it doesn't include gfortran so last time I tried to use it I couldn't build the dependencies. Instead I'm modifying the build script that I was using with MSVC and AppVeyor, where I download the latest Windows nightly binary and use all the dll dependencies from it. Doing this on Linux actually requires using the Windows version of `7z.exe` via wine to extract our NSIS installer, since the Linux package `p7zip` doesn't extract the installer correctly.

End result is we get about the same amount of information out of the Travis service we're already using as AppVeyor would be able to tell us within its half hour time limit. Unless we buy a premium plan on AppVeyor to get better build VM's with more memory and multiple cores, building Julia there takes 20-25 minutes and we can only run one build at a time.

Out of curiosity I tried putting `Base.runtests("all", 4)` in `userimg.jl`, but sadly that fails with
```
ERROR: LoadError(
in error at error.jl:21fatal: error thrown and no exception handler available.
Base.TypeError(func=:task_local_storage, context="typeassert", expected=Main.Base.ObjectIdDict, got=Base.ObjectIdDict(ht=Array{Any, 1}[:SOURCE_PATH, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #, #]))
```