Search code examples
swiftllvmtravis-cixctool

Swift tests pass locally but the build fails on Travis-CI


I'm trying to setup my cocoapod project to run it's test on Travis-CI after a push. I'm using xctool 0.2.4 to run the tests and it executes well locally. But as soon as it runs on Travis-CI the compile build steps fail for various reasons which I can't seem to reproduce locally.

xctool test -project test/MEViewExtensions.xcodeproj -scheme MEViewExtensions -sdk iphonesimulator

Here are two failures which works fine on my machine:

I would at least like to get the same errors on my machine to be able to debug it. Any ideas?


Solution

  • The problem was that I was running the tests on Xcode 6.3 with a newer version of Swift while the Travis tests were run on Xcode 6.1 with an older version with different type of errors. Had to add osx_image: beta-xcode6.3 to my .travis.yml file in order to force Travis to run on the later version and then it was fine.