Skip to content
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

Merge Android jobs into a single multistep job to better amortize setup time #8464

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

bzbarsky-apple
Copy link
Contributor

Problem

Android CI uses a total of ~30 minutes CI time, but a lot of this seems to be work that is duplicated across the three Android jobs.

Change overview

Combine the jobs into one job with steps that build the different configurations.

Testing

Checked that the overall job ran in ~15 minutes.

@mspang I'm a little concerned that the builds after the first one are clearly reusing some build artifacts for the "app" builds; the log at https://github.com/bzbarsky-apple/connectedhomeip/runs/3089960361 shows things like:

> Task :app:javaPreCompileRelease UP-TO-DATE
...
> Task :app:testReleaseUnitTest UP-TO-DATE

etc. Should we instead be deleting something between the steps to ensure more proper "clean" builds, or do we trust whatever build system is involved here enough to assume that it's going to redo whatever work differs between the three configurations correctly?

@mspang
Copy link
Contributor

mspang commented Jul 16, 2021

Problem

Android CI uses a total of ~30 minutes CI time, but a lot of this seems to be work that is duplicated across the three Android jobs.

Change overview

Combine the jobs into one job with steps that build the different configurations.

Testing

Checked that the overall job ran in ~15 minutes.

@mspang I'm a little concerned that the builds after the first one are clearly reusing some build artifacts for the "app" builds; the log at https://github.com/bzbarsky-apple/connectedhomeip/runs/3089960361 shows things like:

> Task :app:javaPreCompileRelease UP-TO-DATE
...
> Task :app:testReleaseUnitTest UP-TO-DATE

etc. Should we instead be deleting something between the steps to ensure more proper "clean" builds, or do we trust whatever build system is involved here enough to assume that it's going to redo whatever work differs between the three configurations correctly?

It doesn't seem surprising to me that java compilation would be considered up to date in followup builds because those steps produce portable bytecode.

While I wouldn't say that I 100% trust it, I don't see an obvious problem here and in fact this likely indicates legitimate savings.

@github-actions
Copy link

Size increase report for "esp32-example-build" from f4a6b28

File Section File VM
chip-all-clusters-app.elf .flash.text -16 -16
chip-lock-app.elf .flash.text 64 64
chip-temperature-measurement-app.elf .flash.text -51 -60
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.xt.prop._ZN4chip6System5Mutex6UnlockEv,0,108
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE14_LockChipStackEv,0,48
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE15_StartChipTimerEj,0,48
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE16_UnlockChipStackEv,0,48
[Unmapped],0,16
.xt.prop._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE14_LockChipStackEv,0,12
.xt.prop._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE15_StartChipTimerEj,0,12
.xt.prop._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE16_UnlockChipStackEv,0,12
.flash.text,-16,-16
.xt.prop._ZN4chip11DeviceLayer8Internal26GenericPlatformManagerImplINS0_19PlatformManagerImplEE14_InitChipStackEv,0,-40
.xt.lit._ZN4chip11DeviceLayer8Internal35GenericPlatformManagerImpl_FreeRTOSINS0_19PlatformManagerImplEE10_PostEventEPKNS0_15ChipDeviceEventE,0,-80
.xt.lit._ZN4chip6System5Mutex6UnlockEv,0,-128

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize
.flash.text,64,64
[Unmapped],0,-64

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize
.flash.text,-60,-51
[Unmapped],0,-4045


@bzbarsky-apple
Copy link
Contributor Author

@woody-apple @Damian-Nordic @msandstedt @saurabhst @jepenven-silabs @LuDuda @jmartinez-silabs Take a look please? Should help a bit with our CI latency.

@Damian-Nordic Damian-Nordic merged commit 13d8145 into project-chip:master Jul 20, 2021
@bzbarsky-apple bzbarsky-apple deleted the android-ci-faster branch July 20, 2021 13:36
drempelg pushed a commit to drempelg/connectedhomeip that referenced this pull request Jul 20, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants