-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Optimize build_instrumented job
#6954
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c379ee9
Remove unneeded gradle task
seadowg 7c988d1
Upgrade machines with appropriate Gradle configs
seadowg 828f5ee
Correct resource name
seadowg c06dbf1
Only persist APKs from build_instrumented
seadowg a001917
Correct APK size
seadowg 107eacf
Simplify caching
seadowg 3ef66a4
Correct cache key path
seadowg 1377083
Increase heap size for what's available in large config
seadowg f3d1741
Use caching instead of workspace for speeding up builds
seadowg afe01ee
Correct environment reference
seadowg 28ea21e
Increase default gradle config
seadowg 143de12
Cache gradle wrapper as well
seadowg 9c193f0
Don't run CI for PRs without approval
seadowg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use caching instead of workspace for speeding up builds
- Loading branch information
commit f3d1741ec5eea7110864aa0d9515cbb5bbf985d8
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,16 +46,23 @@ jobs: | |
| paths: | ||
| - ~/.gradle/caches | ||
| key: compile-{{ checksum "gradle/libs.versions.toml" }} | ||
| - save_cache: | ||
| paths: | ||
| - ~/work | ||
| key: workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
|
|
||
| - persist_to_workspace: | ||
| root: ~/work | ||
| paths: | ||
| - . | ||
| - collect_app/build/outputs/apk | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still need to save the APK so that it can be definitely available to the Test Lab jobs. |
||
|
|
||
| create_dependency_backup: | ||
| <<: *android_config_small | ||
| steps: | ||
| - attach_workspace: | ||
| at: ~/work | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - restore_cache: | ||
| keys: | ||
| - compile-{{ checksum "gradle/libs.versions.toml" }} | ||
|
|
@@ -73,8 +80,10 @@ jobs: | |
| check_quality: | ||
| <<: *android_config | ||
| steps: | ||
| - attach_workspace: | ||
| at: ~/work | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - restore_cache: | ||
| keys: | ||
| - compile-{{ checksum "gradle/libs.versions.toml" }} | ||
|
|
@@ -96,8 +105,10 @@ jobs: | |
| <<: *android_config | ||
| parallelism: 4 | ||
| steps: | ||
| - attach_workspace: | ||
| at: ~/work | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - restore_cache: | ||
| keys: | ||
| - test_modules-{{ checksum "gradle/libs.versions.toml" }} | ||
|
|
@@ -133,8 +144,10 @@ jobs: | |
| <<: *android_config | ||
| parallelism: 4 | ||
| steps: | ||
| - attach_workspace: | ||
| at: ~/work | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - restore_cache: | ||
| keys: | ||
| - test_app-{{ checksum "gradle/libs.versions.toml" }} | ||
|
|
@@ -179,8 +192,10 @@ jobs: | |
| build_instrumented: | ||
| <<: *android_config_large | ||
| steps: | ||
| - attach_workspace: | ||
| at: ~/work | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - restore_cache: | ||
| keys: | ||
| - build_instrumented-{{ checksum "gradle/libs.versions.toml" }} | ||
|
|
@@ -209,8 +224,10 @@ jobs: | |
| build_release: | ||
| <<: *android_config | ||
| steps: | ||
| - attach_workspace: | ||
| at: ~/work | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - restore_cache: | ||
| keys: | ||
| - compile-{{ checksum "gradle/libs.versions.toml" }} | ||
|
|
@@ -251,6 +268,10 @@ jobs: | |
| test_smoke_instrumented: | ||
| <<: *android_config_small | ||
| steps: | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - attach_workspace: | ||
| at: ~/work | ||
|
|
||
|
|
@@ -280,6 +301,10 @@ jobs: | |
| test_instrumented: | ||
| <<: *android_config_small | ||
| steps: | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - workflow-{{ echo $CIRCLE_WORKFLOW_ID }} | ||
| - attach_workspace: | ||
| at: ~/work | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, saving to cache is much faster than persisting to workspace for large sets of files. Caching makes more sense here as well as we don't need the files we're saving here: they just help speed subsequent jobs in the worklow up.