As my build time is increased I am profiling every parts of the build.
I already profiled swift compiler times and gain around 4 minutes on the whole build.
But it is still very long (> 30 minutes) for a very basic application.
Thus, I start digging into Bitrise logs, and I found that both Xcode Test and Xcode Archive steps were compiling the application. This lead to a double heavy work.
Unfortunately you might not be able to avoid this, because Xcode’s test action by default compiles your code with the Debug config, while archive is done with Release config.
You can of course try to change this, to e.g. run the tests with the Release config too, but that might cause issues long term.
We use this for our main website (bitrise.io), running tests only on the Pull Requests, but this requires some additional configuration / consideration on your source code hosting service. E.g. we prevent any push to master by using GitHub protected branches, enforcing that every PR have to pass the tests before merge, as well as that it have to be “up to date” with master before it could be merged (as well as it have to pass a code review before merge).
Are there any other long running steps in your workflow? 30 mins seems to be really really long for a “very basic application”. The test projects we use for continous performance checks are way faster than that:
an old, but “fairly complex” ObjC app we wrote years ago can Archive in ~120 seconds
a minimal Swift sample project can run Xcode Test in ~120 seconds and Archive in ~45 seconds, the whole workflow (including git clone, xcode test, xcode archive, deploy, …) takes ~3.5 - 4 mins.
I took a look on your project, couldn’t see any build config issue. It seems that your code is simply not that “basic” as you think
You use for example quite a few CocoaPods dependencies, which have to be compiled too.
You could try to see which dependency / dependencies take a long time to compile, I’d say there’s at least one which requires a long time for compilation.
You should reverse these two steps, cache pull should be before cocoapods install, or else cocoapods install can’t leverage the cache (as it’s simply not there before the cache-pull step). See:
One more thing, we’re experimenting with faster build machines, if you’re interested I can ping you when it’s ready for beta testing @eaappfactory
(there’s a catch, after the beta these configs will cost more, but so far we saw quite significant speed improvements for projects which are cpu intensive)