A week ago I watched with tears how a pipeline finally finished after almost half an hour. That slow CI service pissed me off every day. And I decided to make my research to find the most powerful CI/CD service!
I've just created a blank react native project:
npx react-native init testApp --version 0.67.1
After that, I found several services which can build a mobile app and I begin integrating them:
- AppCenter: web config, stored on the service side
- appcircle: web config, stored on the service side
- Azure DevOps: azure-pipelines-android.yml
- Bitbucket Pipelines: bitbucket-pipelines.yml
- Bitrise: bitrise.yml
- Buddy: buddy.yml
- Circle CI: .circleci/config.yml
- Codemagic: codemagic.yaml
- GitHub Actions: .github/workflows/*.yml
- Gitlab CI: .gitlab-ci.yml
- Travis CI: .travis.yml
After successful integration and configuration, I started collecting metrics. I was primarily interested in the trace. parameters:
- Build Speed
- Rebuild Speed (when developer push new changes and cache invalidate)
- Hardware
- Environment
To collect hardware info and environment setup I used an envinfo
package
// package.json
{
"scripts": {
"postinstall": "npx envinfo"
},
}
All result about hardware & environment ...
Finally lets have a look at results of build speed
Given the limitations, I believe that it is obvious who is the favorite on this list 😉
if you have any question I am glad to discuss them in the comments!
(c) MurAmur
Top comments (9)
Apologies if I'm missing something but it isn't clear to me which service is concluded here as the winner, I think it might be GitHub Actions just because it has a relatively quick Android build and the only highlighted set of results that also has results for iOS, is that right?
With some aggressive caching strategies, including that of iOS binaries we have had success with a 12-15 minute pipeline that includes test runs (Detox UI and unit) as well as Android and iOS builds. We didn't get out of the gate with that of course but evolved it over time and similar frustrations over pipeline execution time.
I think this is a great start at investigating the various CICD providers in for React Native projects and sharing different approaches to optimising the pipelines/build would be really interesting.
I found a way to cache iOS build
And now our app build is 9 minutes long!!!
dev.to/retyui/react-native-how-spe...
That is nice! One of our approaches was caching the iOS build and injecting the JS bundle into it if native dependencies hadn't changed. We were in a position where the native dependencies didn't change for most builds once the app had some maturity.
Could you please share knowledge how inject a js bundle into build
I'll put together a post and link to it here :)
Could you please share knowledge of react native github actions CI/CD
What exactly you mean when ask to "share knowledge of react native github actions"?
i mean steps to execute github actions for CI/CD in react native
Here is GitHub Actions config:
github.com/retyui/react-native-ci-...