Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Improving Fastlane's runtime for Scan -> Gym -> Deploy

I've been trying to include Fastlane in a CI environment where the following should happen:

  • any commit to the master branch should trigger a test run and then a build into Testflight.
  • any commit to the development branch should trigger a test run and then a build into Fabric Beta.
  • any other commit or pull request should trigger a test run.

The lanes are working with all the code signing through match.

In order to avoid building twice I'm building through Gym and then Scan with skip_build: true and clean: false, as mentioned in #3353.

Although this does seem to help with the build time, due to the amount of cocoapods dependencies, it goes over the 50 minute limit in travis-ci.org. (Feel free to check the build logs)

How can this be improved in terms of running time? (Aside from fixing the slow compiling Swift functions mentioned in #3)

For reference, here's my Fastfile.

like image 335
Ivan Bruel Avatar asked Aug 29 '16 09:08

Ivan Bruel


1 Answers

One way you can speed up your build phase is using prebuilt frameworks. It's like importing AVFoundation or any other Apple toolkit on your project.

Try to identify which dependency is slowing the running time down and move it to a prebuilt framework.

Carthage is a nice tool that allows you to use prebuilt frameworks and manage dependencies as well. You can cache Carthage builds on your CI. Check out this great blog post on how you can achieve caching.

like image 127
ricardopereira Avatar answered Sep 28 '22 06:09

ricardopereira