-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[CI] Runs build in macos to generate a cache for androidTest runs #1019
Conversation
So far it seems like the linux job takes 9-11 minutes (with cache hits), and will fails screenshot tests first, then jvm tests, spotless. Then it builds and uploads APKs. We probably want to fail spotless first. If the build is broken, it can be caught by either the linux job or the |
Looking at the low-hanging fruit for the androidTest-run job:
After that, the connectedCheck task is run and then gradle takes a while to assemble everything. This seems like it could be done in parallel? Not sure how much CPU the emulator boot takes.
This looks good but wouldn't it take most of the 10Gb cache?
For example, the command takes 53 seconds to run. |
On 2: I'm running a test in https://github.com/JoseAlcerreca/nowinandroid/actions/runs/6788492716/job/18453744948 to see how much cache it takes. After this run, I'll try with an ATD image. |
avd-26 Cache Size: ~4551 MB (4771592759 B) We'd probably run out of cache for other things that might impact CI times more. |
Should we consider a separate job that runs, produces the AVD snapshot, then upload as build artifacts instead of cache? It might be worthwhile having another form of cache for this? |
I don't think there's an API to download the build artifacts from another workflow, is there? |
Change-Id: I4c94aadaa9f6b7fafce17ce949c922973bd522d0
I think we can start reviewing this PR: (1) Moved some of the build to a previous step so that gradle has a bit more resources to run. Probably irrelevant. (2) Can't do this because of the size of the AVD images (3) Pinged the authors of the plugin and will look into it separately. We'll probably skip the problematic tasks on CI. (4) Filed #1026 for tracking |
Fixes #1022 Change-Id: I35040a58974bd6ce0738b38ff582d93787008a86
"Configuration cache entry stored." Now the next run should be faster. |
Change-Id: Ic2e6fe27597b29097b33e74601d32f3c70f10683
Nevermind, the cache won't be saved until this is merged into main. Ready for review. |
Experiments to fix #1011 and #1018
Relying on gradle-build-action for cache sharing. Followed some guidance in:
https://github.com/gradle/gradle-build-action#deduplication-of-gradle-user-home-cache-entries