language: objective-c # OSX host

cache:
  directories:
    - monopkg/

env:
  - MONO_VERSION=3.2.4

install:
  - mkdir -p monopkg
  - cd monopkg
  - wget -c "http://download.mono-project.com/archive/${MONO_VERSION}/macos-10-x86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg"
  - sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target /
  - cd -

script:
  # Build
  - xbuild /verbosity:quiet
  # Run Tests
  - if ! grep -q 'Version 11.00' OpenTween.sln; then echo 'OpenTween.sln is not compatible with Visual C# 2010 Express.'; false; fi
  - mono ./OpenTween.Tests/dlls/xunit.console.clr4.x86.exe ./OpenTween.Tests/OpenTween.Tests.xunit
