You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use travis to automatically test builds on different platforms #625
Do you mean use Travis to check for these issues? My primary concern there would be the build time required to check everything. Maybe if it could be set up to run once a night rather than whenever a commit happens - won't get immediate results, but issues would still be detected. But mostly I think the revamp just hasn't been tested well in OSX, not that there is any regression.
Yeah I meant to setup travis to continuously check for build issues. We can use something like nightli.es for this. Or any alternative mentioned here.
That would be interesting to have Continuous Integration indeed.
Unfortunately we would have issues with conflicting recipes. But I guess we could at least start with a small subset of recipes to compile. I feel that would be a good start and better than nothing.
I guess that would require to create a dedicated buildozer.spec file with the target recipes in the requirements list.
Because as far as I know there's no command to build a single recipe (buildozer android p4a -- --help), right?
Because as far as I know there's no command to build a single recipe
There isn't really a command for this, but it would be easy to add one. It wouldn't be any barrier (and you don't need to build recipes one by one anyway, for the testing).
There isn't really a command for this, but it would be easy to add one.
OK
It wouldn't be any barrier (and you don't need to build recipes one by one anyway, for the testing).
What do you mean? How would you do if not building one by one for CI? I see only this way or creating buildozer.spec files per "compatibles recipes".
Anyway I'm currently trying to setup Travis-CI for one python-for-android project I and already so other pitfalls. I'll come back with my findings.
Would you eventually be interested with a PR that demonstrates Travis-CI building few recipes?
I'll try to take a look over the weekend.
My strategy would be:
Create a Dockerfile image with Android build tools and p4a dependencies
Actually install p4a pip install -e . within the Dockerfile
Use the Docker container to build APKs e.g. p4a apk --private testapps/testapp --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python2,kivy
So I believe if anything goes wrong (e.g. cross compilation failing) it will exit with status code other than zero and Travis CI should complain. Also I think we're free from adding any --requirements=recipe1,recipe2 as we want as long as they don't conflict with eachother.
So that would be a first iteration to continuous integration. Next steps would be to handle both Python 2 and 3. And the ultimate step would be to actually try to run the APK in an Android environment.
Tell me what you think or if you have any suggestions.
PS: sorry for the formatting and typos, I'm on phone.
Sounds reasonable to me. I don't have any docker experience, and didn't even really know that this might be a convenient way to manage the install, but it would be great if it works.
Great! Yes in fact Docker makes complete sense in this, because it let us create a completely isolated, but light environment. And you can decide which base to use, I'm gonna go for the last LTS (currently ubuntu:16.04).
Edit: And yes I forgot to add that's specially more convenient in CI tools such as Travis, because they don't always provide the Linux distribution and tools you expect, but they often provide a mean to use Docker.
@cbenhagen, @inclement and @kived pull request is ready here #1255
Please let me what you think and merge it if you don't see any blocker. It's not perfect, but we should see it as a minimal valuable product which we can later improve once it's merged.
Edit: by the way it currently build in only 15 minutes, even though it only has --requirements=python2,kivy I think we can still have relatively short timed build by introducing some caching. This will come in subsequent pull requests.
Activity
AndreMiras commentedon Jun 24, 2017
That would be interesting to have Continuous Integration indeed.
Unfortunately we would have issues with conflicting recipes. But I guess we could at least start with a small subset of recipes to compile. I feel that would be a good start and better than nothing.
I guess that would require to create a dedicated
buildozer.specfile with the target recipes in therequirementslist.Because as far as I know there's no command to build a single recipe (
buildozer android p4a -- --help), right?inclement commentedon Jun 24, 2017
There isn't really a command for this, but it would be easy to add one. It wouldn't be any barrier (and you don't need to build recipes one by one anyway, for the testing).
AndreMiras commentedon Jun 24, 2017
OK
Would you eventually be interested with a PR that demonstrates Travis-CI building few recipes?
inclement commentedon Jun 27, 2017
Sorry, I missed this reply (just noticed your edit) - yes, a PR for this would be really great!
AndreMiras commentedon Jun 27, 2017
OK great, I've implemented it for my project https://travis-ci.org/AndreMiras/PyWallet it runs two builds:
Everything is here: https://github.com/AndreMiras/PyWallet/tree/v20170625/travis/
It's bit hacky, but seems to work OK so far.
I'll work on the PR when I get time then :)
AndreMiras commentedon Apr 6, 2018
I'll try to take a look over the weekend.
My strategy would be:
pip install -e .within the Dockerfilep4a apk --private testapps/testapp --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python2,kivySo I believe if anything goes wrong (e.g. cross compilation failing) it will exit with status code other than zero and Travis CI should complain. Also I think we're free from adding any
--requirements=recipe1,recipe2as we want as long as they don't conflict with eachother.So that would be a first iteration to continuous integration. Next steps would be to handle both Python 2 and 3. And the ultimate step would be to actually try to run the APK in an Android environment.
Tell me what you think or if you have any suggestions.
PS: sorry for the formatting and typos, I'm on phone.
inclement commentedon Apr 6, 2018
Sounds reasonable to me. I don't have any docker experience, and didn't even really know that this might be a convenient way to manage the install, but it would be great if it works.
Thanks a lot for you efforts on this!
AndreMiras commentedon Apr 6, 2018
Great! Yes in fact Docker makes complete sense in this, because it let us create a completely isolated, but light environment. And you can decide which base to use, I'm gonna go for the last LTS (currently ubuntu:16.04).
Edit: And yes I forgot to add that's specially more convenient in CI tools such as Travis, because they don't always provide the Linux distribution and tools you expect, but they often provide a mean to use Docker.
Continuous integration with Travis and Docker, fixes kivy#625
Continuous integration with Travis and Docker, fixes kivy#625
Continuous integration with Travis and Docker, fixes kivy#625
Continuous integration with Travis and Docker, fixes kivy#625
AndreMiras commentedon Apr 7, 2018
@cbenhagen, @inclement and @kived pull request is ready here #1255
Please let me what you think and merge it if you don't see any blocker. It's not perfect, but we should see it as a minimal valuable product which we can later improve once it's merged.
Edit: by the way it currently build in only 15 minutes, even though it only has
--requirements=python2,kivyI think we can still have relatively short timed build by introducing some caching. This will come in subsequent pull requests.Merge pull request #1255 from AndreMiras/feature/ticket625_continuous…