Travis swift library compilation error

156 Views Asked by At

I'm trying to fix an error I have been getting from my Travis build lately and cannot seem to fix the issue:

The following build commands failed:
CompileSwift normal i386 /Users/travis/build/HarrisonEllerm/My-Pain-Manager/Pods/SwiftCharts/SwiftCharts/Layers/ChartPointsViewsLayer.swift
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
(2 failures)

Everything else compiles just fine but this library for some reason throws an error each time. Does anyone know a possible solution to this problem (maybe telling Travis just to ignore the library?). It fails each time on that particular file, but I can open it up in Xcode no problem and it builds just fine locally.

Link to build: https://travis-ci.org/HarrisonEllerm/My-Pain-Manager

I have seen Get Travis CI to ignore an external library? but unfortunately no luck.

Cheers

1

There are 1 best solutions below

0
On

I think you should add pod install command to your travis.yml file.

Updated before_install part:

before_install:
  - rvm install ruby-2.2.2
  - gem install cocoapods
  - gem install xcpretty -N
  - brew update
  - brew install swiftlint || true #need to clean up project at some stage using swiftlint 
  - pod repo update
  - pod install