Jay Bazuzi
Jay Bazuzi

Reputation: 46536

How can I get Mono 2.11+ installed on Travis-CI?

I build my C# project on Travis-CI like this:

# .travis.yml
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -qq mono-devel gtk-sharp2

install:
  - xbuild Source/Pash.sln

Travis uses Precise (Ubuntu 12.04 LTS) which seems like a good choice for them, but it includes Mono 12.10. My C# project hits a bug in Mono 2.10. The bug appears to be fixed in Mono 2.11+.

I read that Ubuntu is slow to pick up new builds of Mono because so much depends on it, and it can break so much. That's fine, but for Travis dependencies aren't really a problem - the machine goes away at the end of the build!

I have considered

Suggestions?

Upvotes: 0

Views: 459

Answers (2)

jbtule
jbtule

Reputation: 31809

The best way I've found to get a full up to date mono environment is to use an OS X travis profile

language: objective-c

before_install:
 # Make sure mono is installed,
 - wget http://download.mono-project.com/archive/3.0.10/macos-10-x86/MonoFramework-MDK-3.0.10.macos10.xamarin.x86.dmg
 - hdid MonoFramework-MDK-3.0.10.macos10.xamarin.x86.dmg
 - sudo installer -pkg "/Volumes/Mono Framework MDK 3.0.10/MonoFramework-MDK-3.0.10.macos10.xamarin.x86.pkg" -target /

install:
 - xbuild Source/Pash.sln

Upvotes: 1

knocte
knocte

Reputation: 17969

If you're going to use something higher than what standard distro packages provide, I recommend you to go all the way and not use unstable 2.11.x series, but official/beta 3.x ones.

So, grab yourself some preview Debian/Ubuntu 3.0.6 packages from this PPA:

http://www.meebey.net/posts/mono_3.0_preview_debian_ubuntu_packages/

Upvotes: 1

Related Questions