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:
https://travis-ci.org/materik/meviewextensions/builds/68458750
Basic Block in function '_TFE16MEViewExtensionsCSo8UIScreeng5widthV12CoreGraphics7CGFloat' does not have terminator!
label %entry2
LLVM ERROR: Broken function found, compilation aborted!
https://travis-ci.org/materik/meviewextensions/builds/68465719
/Users/travis/build/materik/meviewextensions/test/MEViewExtensionsTests/UIViewTests.swift:22:33: error: type '@autoclosure () -> CGFloat' does not conform to protocol 'FloatLiteralConvertible'
XCTAssertEqual(view2.x, 10.0)
I would at least like to get the same errors on my machine to be able to debug it. Any ideas?
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.