Skip to content

Use travis to automatically test builds on different platforms #625

Closed

Description

@cbenhagen

@kived:

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.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. AndreMiras commented on Jun 24, 2017

    @AndreMiras
    Member

    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?

  2. inclement commented on Jun 24, 2017

    @inclement
    Member

    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).

  3. AndreMiras commented on Jun 24, 2017

    @AndreMiras
    Member

    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?

  4. inclement commented on Jun 27, 2017

    @inclement
    Member

    Sorry, I missed this reply (just noticed your edit) - yes, a PR for this would be really great!

  5. AndreMiras commented on Jun 27, 2017

    @AndreMiras
    Member

    OK great, I've implemented it for my project https://travis-ci.org/AndreMiras/PyWallet it runs two builds:

    1. Kivy Linux install + unit tests
    2. buildozer build for Android

    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 :)

  6. AndreMiras commented on Apr 6, 2018

    @AndreMiras
    Member

    I'll try to take a look over the weekend.
    My strategy would be:

    1. Create a Dockerfile image with Android build tools and p4a dependencies
    2. Actually install p4a pip install -e . within the Dockerfile
    3. 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.

  7. inclement commented on Apr 6, 2018

    @inclement
    Member

    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!

  8. AndreMiras commented on Apr 6, 2018

    @AndreMiras
    Member

    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.

  9. added 4 commits that reference this issue on Apr 7, 2018
    9668be7
    d09d6e8
    2dec324
    2982ce5
  10. AndreMiras commented on Apr 7, 2018

    @AndreMiras
    Member

    @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.

  11. added a commit that references this issue on May 7, 2018
    18a99b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions