-
Notifications
You must be signed in to change notification settings - Fork 2.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
fix --copy-artifacts-to issue in build_example.py #10437
fix --copy-artifacts-to issue in build_example.py #10437
Conversation
The difficutly I had was that a compile error was impossible to track down because I assumed that my src was clean (according to git status) but that was wrong: I had jnilibs in places hidden by .gitignore. At first I assumed 'this does not compile at all' hence the changes requested. The "Dirty source" is still there I guess. |
I tried
I tried this:
# Workaround: using relative path for -PbuildDir to avoid below issue
# https://stackoverflow.com/questions/69564314/android-studio-project-with-library-project-build-failed-when-set-pbuilddir
try:
self._Execute(['rm', '%s/src/android/%s/app/build' % (self.root,
self.app.AppName())])
except:
pass
try:
self._Execute(['mkdir', '-p', '%s/android_build/%s/app' %
(self.output_dir,
self.app.AppName())])
except:
pass
self._Execute(['ln', '-s', '%s/android_build/%s/app' % (self.output_dir,
self.app.AppName()), '%s/src/android/%s/app/build' % (self.root, self.app.AppName())
])
try:
self._Execute(['rm', '%s/src/android/%s/chip-library/build' % (self.root,
self.app.AppName())])
except:
pass
try:
self._Execute(['mkdir', '-p', '%s/android_build/%s/chip-library' %
(self.output_dir,
self.app.AppName())])
except:
pass
self._Execute(['ln', '-s', '%s/android_build/%s/chip-library' % (self.output_dir,
self.app.AppName()), '%s/src/android/%s/chip-library/build' % (self.root, self.app.AppName())
]) So, do you think we should do as 1 ( put build under android/CHIPTool/app/out/android-androidstudio-chip-tool ) or as 2 ( syslinke 3 build folders to out/android-androidstudio-chip-tool/xxx ) ? |
466a290
to
bcb793e
Compare
PR #10437: Size comparison from a56c83e to bcb793e 8 builds
14 builds
12 builds
|
bcb793e
to
8162189
Compare
PR #10437: Size comparison from f1555d1 to 8162189 2 builds
18 builds
2 builds
12 builds
|
8162189
to
a27f0a1
Compare
PR #10437: Size comparison from 1623b4b to a27f0a1 8 builds (for k32w, p6, qpg, telink)
14 builds (for efr32, linux, mbed)
12 builds (for esp32, nrfconnect)
|
a27f0a1
to
2f2f64a
Compare
PR #10437: Size comparison from 4c7f664 to 2f2f64a 8 builds (for k32w, p6, qpg, telink)
14 builds (for efr32, linux, mbed)
2 builds (for esp32)
10 builds (for nrfconnect)
|
I find some way to clear the symlink code and now it is ok, please review it again, thanks |
PR #10437: Size comparison from 4c7f664 to 221f15f 8 builds (for k32w, p6, qpg, telink)
12 builds (for efr32, linux)
2 builds (for mbed)
12 builds (for esp32, nrfconnect)
|
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.
Approving: it seems that my request of trying not to dirty our source code resulted in significant build complexity. I did not expect or intended this to be as derailing.
If in-source build keeps complexity lower, I am ok with that as well and seem to even prefer it now that I see hacks regarding dry run and other rmdir/mkdir logic
Agree with Andrei, I don't like how complex this is. Could we instead have the build script accept a custom build directory (i.e. the in-source build dir) just for Android, independent of |
So do you think we should revert to the 1st version which is more simple but build in-source build dir? Let me revert to that version and please help to have a look? |
221f15f
to
2b4de26
Compare
2b4de26
to
9fa4220
Compare
PR #10437: Size comparison from e1d51c5 to 9fa4220 8 builds (for k32w, p6, qpg, telink)
14 builds (for efr32, linux, mbed)
2 builds (for esp32)
10 builds (for nrfconnect)
|
I have revert back to the simple but build in source dir version, could you please help to review it again? Thanks |
Problem
*Android ide build and CHIPTest build into CI #10371 (comment)
Change overview
fixed file path
Testing