New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up workflows for CircleCI #586

Merged
merged 1 commit into from Aug 26, 2018

Conversation

Projects
None yet
2 participants
@rock3r
Collaborator

rock3r commented Aug 26, 2018

Problem

I wanted to play around with CircleCI workflows to see if we could have a nicer and more flexible build.

Solution

I did! The CI is now using a nice workflow to split up the work and execute tests and building in parallel.

First-ever build (no caches) — 8'

First ever build

Regular build (caches) — 4'

image

Build times are pretty much unchanged from the previous setup, because we don't have enough parallelisation yet to have this making much difference. If we wanted PRs to also build APKs and so on, we could then easily add more parallel steps to the build.

Note that the caches (~/.gradle, ~/.android/build-cache and $ANDROID_HOME/build_tools) are only invalidated when one of these three files change:

  • workspace/repo/.circleci/config.yml
  • workspace/repo/gradle.properties
  • workspace/repo/dependencies.gradle

What we're caching is basically only dependent on the dependencies versions, the Android build configuration (minSdk, targetSdk, etc) and the cache configuration itself (held in the CircleCI setup).

This setup is inspired by, and heavily modified from, the Litho repository's setup.

Paired with

Nobody

Set up workflows for CircleCI
Thanks to the Litho repo for the inspiration!

@quiro91 quiro91 merged commit 07934f9 into develop Aug 26, 2018

4 checks passed

ci/circleci: checkout Your tests passed on CircleCI!
Details
ci/circleci: prepare_for_checks Your tests passed on CircleCI!
Details
ci/circleci: static_analysis Your tests passed on CircleCI!
Details
ci/circleci: tests Your tests passed on CircleCI!
Details

@quiro91 quiro91 deleted the ci_workflows branch Aug 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment