-
Notifications
You must be signed in to change notification settings - Fork 6.4k
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
OpenThread apps want to download and build OpenThread every time! #12206
Comments
Instead of doing a git clone for each build, should we add a copy in
One possibility is that one has to run Probably a different issue, but right now the openthread code is built with -j99, which might render low end machine unresponsive for a few minutes. |
That seems reasonable. Or we could add it to the SDK. Or maybe come up with a framework for "pull and build these external source trees of this particular version" which could allow us to continue to reference the specific external stuff without deploying it ourselves, but in a way that could still be set up just once in CI. |
Would it be worth disabling the two OpenThread tests until that's ready? On a highly parallel build host those four download+configure cycles are adding like 30% to my build times. (I'm in a "sanitycheck is too slow" cycle at the moment) |
I agree that the way how OpenThread is downloaded for each sample/build separately is not the most fortunate way to do this, waiting for As for providing the pre-built OpenThread copies, note that the OpenThread library is configurable, and in Zephyr it's configuration can be altered by Kconfig. Hence I don't see how this could be done without giving up on the configurability (and it's not something that we want I believe). Currently OT builds are triggerd for |
Just leaving a comment here for what needed to be done for building samples for OpenThread for me: |
Marking as enhancement since this is actually an "optimization". |
@carlescufi @rlubos can this be closed? Didn't the work done around the time of c6c20f0 fix the issue? |
I confirm that the openthread module now contains the openthread code, so it is not downloaded anymore for each build. |
Yeah, I guess we can close it. |
A default build of apps that use openthread tries to clone and build the openthread project from github as part of the app directory! This gets sucked in by sanitycheck in a few places, for example samples/net/echo_server has two cases that overlay an openthread configuration into kconfig.
The immediate problem with this is that openthread dependencies like autotools have automatically become Zephyr dependencies. These aren't part of the Zephyr required tooling as we document it, so a pristine configured build host will fail on these tests (our CI infrastructure does seem to pull in autotools, unsurprisingly, so we don't see the problem there).
Obviously this means it's not possible to get a successful sanitycheck run to complete on a host without internet access.
It also breaks "git clean", which (even with the -f switch) will refuse to remove external git repositories it finds in the tree. My personal scripting tripped over this.
And obviously it's just a moderate to severe performance problem. By my count a default sanitycheck run right now appears to be downloading and building the same code FOUR TIMES every time we run it. Each time the process (downloading and configure scripts don't parallelize, needless to say) takes about 90 seconds for me, which is shockingly high for a Zephyr test case.
At the very least we need to update the documentation so that it correctly lists external dependencies and the CI infrastructure so that it includes a prebuilt copy of openthread (my personal CI docker image doesn't have it, so I assume the build hosts don't).
But personally I'd like to see this download step taken out of the Zephyr build entirely. That's just not the right way to do things.
The text was updated successfully, but these errors were encountered: