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

Compile android in build_examples.py and move android compilation outside of Github CI #8862

Merged
merged 19 commits into from
Aug 11, 2021

Conversation

andy31415
Copy link
Contributor

Problem

Android chiptool example is not built by build_examples.py

Change overview

Add android libraries and App support in build_examples.py
Disable Github Action for 'android.yaml' and leave it to run in GCP only

Testing

Ran compilation manually in vscode environment
Unit test
GCP CI will run this.

@andy31415
Copy link
Contributor Author

vscode does not seem to allow license accepting. This will only pass after #8864

@andy31415 andy31415 requested a review from woody-apple August 11, 2021 13:37
Copy link
Contributor

@mspang mspang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use directory listings in build scripts.

@mspang
Copy link
Contributor

mspang commented Aug 11, 2021

Please don't use directory listings in build scripts.

(very few build systems delete files, they only replace them. Doing this invariably leads to broken outputs and confused engineers)

@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from 2ee1e70

File Section File VM
chip-qpg6100-lighting-example.out .text -16 -16
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
[Unmapped],0,16
.debug_ranges,0,8
.debug_str,0,1
.debug_loc,0,-5
.text,-16,-16
.debug_line,0,-25
.debug_info,0,-43


@github-actions
Copy link

Size increase report for "esp32-example-build" from 2ee1e70

File Section File VM
chip-lock-app.elf .flash.text 68 68
chip-all-clusters-app.elf .flash.text -8 -8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize

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

sections,vmsize,filesize

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

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

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

sections,vmsize,filesize
[Unmapped],0,8
.riscv.attributes,0,-2
.debug_info,0,-8
.flash.text,-8,-8
.debug_ranges,0,-16
.debug_loc,0,-48
.debug_line,0,-50

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

sections,vmsize,filesize

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

sections,vmsize,filesize

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

sections,vmsize,filesize

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

sections,vmsize,filesize


@andy31415
Copy link
Contributor Author

Please don't use directory listings in build scripts.

(very few build systems delete files, they only replace them. Doing this invariably leads to broken outputs and confused engineers)

Updated to not use rsync/path walk equivalents.
Unfortunately the 'copy to source' is still needed for gradle and cound not remove it in this PR. sideffect is that the APK instead of supporting only one platform, would 'support' everything that gets copied into jnilibs.

@andy31415 andy31415 requested a review from mspang August 11, 2021 19:02
@mspang
Copy link
Contributor

mspang commented Aug 11, 2021

Please don't use directory listings in build scripts.

(very few build systems delete files, they only replace them. Doing this invariably leads to broken outputs and confused engineers)

Updated to not use rsync/path walk equivalents.
Unfortunately the 'copy to source' is still needed for gradle and cound not remove it in this PR. sideffect is that the APK instead of supporting only one platform, would 'support' everything that gets copied into jnilibs.

Ok, that's broken, and is exactly the kind of unfortunate issue that globbing causes.

@andy31415 andy31415 merged commit 50d80b9 into project-chip:master Aug 11, 2021
woody-apple added a commit that referenced this pull request Aug 12, 2021
woody-apple added a commit that referenced this pull request Aug 12, 2021
andy31415 added a commit to andy31415/connectedhomeip that referenced this pull request Aug 12, 2021
…tion outside of Github CI

This is a revert of project-chip#8862 which in turn reverts the original project-chip#8928.

Using this revert to figure out what breaks CI
andy31415 added a commit that referenced this pull request Aug 12, 2021
* Re-make Compile android in build_examples.py and move android compilation outside of Github CI

This is a revert of #8862 which in turn reverts the original #8928.

Using this revert to figure out what breaks CI

* Noop change to trigger build actions for testing

* Ensure ENTIRE environment (including e.g. PATH) is forwarded to the test script
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
…side of Github CI (project-chip#8862)

* Starting to build android: native library seems to build

* Validate that sdkmanager is executable, then ensure ndk licenses are accepted at build time

* Compiling the apk now works (no jni so copying yet though)

* Restyle fixes

* Apk build now includes .so files for jni

* PyFormat

* Another pyformat on factory/targets

* Move android to workflow_dispatch

* Fix unit tests, pyformat android and test.py

* Update error text for writable check on android home licenses

* Accept the possibility that the android licenses folder does not exist at all

* Update to _build and build_outputs method naming for android

* Do not use rsync and instead do explicit path updates for android native libraries

* Remove obsolete code for output calculation

* Update GH Actions to use the updated examples build script

* Fix android build examples command line - script to be executed must be a string apparently
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Re-make Compile android in build_examples.py and move android compilation outside of Github CI

This is a revert of project-chip#8862 which in turn reverts the original project-chip#8928.

Using this revert to figure out what breaks CI

* Noop change to trigger build actions for testing

* Ensure ENTIRE environment (including e.g. PATH) is forwarded to the test script
@andy31415 andy31415 deleted the android_example_build_py branch October 28, 2021 14:03
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.

5 participants