Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Speed up iOS CI build #4678

Merged
merged 3 commits into from
Apr 12, 2016
Merged

Speed up iOS CI build #4678

merged 3 commits into from
Apr 12, 2016

Conversation

jfirebaugh
Copy link
Contributor

The iOS build is topping out our build times at 30+ minutes.

We should investigate how to bring this down to the range of other builds (10-15 minutes).

Here's one thing to try: https://labs.spotify.com/2013/11/04/shaving-off-time-from-the-ios-edit-build-test-cycle/

@jfirebaugh jfirebaugh added iOS Mapbox Maps SDK for iOS build labels Apr 11, 2016
@1ec5
Copy link
Contributor

1ec5 commented Apr 11, 2016

A typical CI build produces a fat dynamic framework compiled for five architectures (arm64, armv7, armv7s, x86_64, i386). Additionally, make test-ios appears to be recompiling everything from scratch even after the call to make ios. We should make sure both rules are using the same build settings and depend on the same derived data location. I’m working on ensuring identical output directories in #4641 for the non-gyp-managed projects, because until now, command line and GUI builds haven’t been sharing the same output directory.

Use plain “DWARF” instead of “DWARF with dSYM File” as your “Debug Information Format”.

We do use “DWARF with dSYM File” as the debug information format, but build rules other than make ipackage-sim use the Release configuration, which means we need a dSYM to symbolicate crash reports.

Don’t compile your project code or use static libraries compiled with -O4 since it tells Clang to enable Link Time Optimizations (LTO) making the linking stage much slower. Use -O3 at most.

We don’t use -O4. The core targets use -O0 for Debug builds and -O3 for Release builds. In #3183, I changed the iOS targets to use -Os for Release builds, drastically reducing the size of the build.

@jfirebaugh
Copy link
Contributor Author

Until we can build iOS on CI infrastructure that supports parallelization across a build matrix, I think we should limit per-push builds to a single architecture and target configuration. Since we want to run tests in the simulator, this should be the architecture that the simulator requires (x86_64 I assume) and the configuration that is most useful if the tests fail (Debug).

@1ec5
Copy link
Contributor

1ec5 commented Apr 12, 2016

👍 So we should bring back the old make isim and invoke that instead of make ios on Bitrise.

@jfirebaugh
Copy link
Contributor Author

Well, I was thinking more of changing make ios to do what make isim did. In general, I think it's useful to have CI be make <platform> && make test-<platform> consistently across the platforms.

@jfirebaugh
Copy link
Contributor Author

the architecture that the simulator requires (x86_64 I assume)

Surprisingly, this appears to be i386, not x86_64.

@jfirebaugh
Copy link
Contributor Author

Down to ~500 seconds with these changes. 🎉

@jfirebaugh jfirebaugh merged commit e37e08d into master Apr 12, 2016
@jfirebaugh jfirebaugh deleted the ios-build-time branch April 12, 2016 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants