-
Notifications
You must be signed in to change notification settings - Fork 624
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
Conan package distribution #39
Conan package distribution #39
Conversation
- Add Travis support for Conan package - Add Appveyor file to build on Windows Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Hi @facontidavide ! Is there anything I could do to help you in this PR? |
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.
LGTM
@@ -41,6 +48,10 @@ def build(self): | |||
"""project(behaviortree_cpp) | |||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | |||
conan_basic_setup()""") | |||
# INFO (uilian): zmq could require libsodium |
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.
Is this a "to-do" of this recipe or of the zmq one?
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.
it's zmq cpp requirement. I think I wrote this when zmq was not official in Conan Center.
I have little or no time to review it for the time being, and my little understanding of Conan doesn-t help. I will just merge it. Better to ask for forgiveness than permission... |
Thanks @facontidavide! We will keep an eye on it but just ping us if you have any trouble 😄 |
travis is unhappy https://travis-ci.org/BehaviorTree/BehaviorTree.CPP/builds/473857934 |
It requires conan-io/conan-package-tools#313 but until to be merged (maybe 2 Jan), I'll provide a patch for you. |
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Hi!
This PR is related to support BehaviorTree.CPP as distributed package.
Also, including:
Build script to create Conan package on Travis CI
CMake file to build test package
Conan recipe to build test package
Example code to consume Conan package created
Update to run Conan job on CI
Conan uses the file conanfile.py as recipe to execute all steps necessary to create the package. As your project is a library, it needs to be built, and Conan defines the package id by settings + options + requires.
To make sure that your package is working well, Conan provides test_package, where we put a simple example consuming your package and building as well. When test_package.cpp is including BehaviorTree header, all files are imported from the packaged provided by Conan. Test package is not for unit testing propose, it's a package validation.
When running your package on CI (appveyor, travis or any other) we could run Conan to create the package and check. But prepare a full environment with compiler, build-essential , conan and all stuff could be boring, so we use Docker. Conan provides a good range of images, including gcc and clang. I added multiple jobs because your project should match (compiler version, arch, os, release/debug) when required as dependency.
How to upload?
Conan uses Bintray to store their packages. You need to create an account on bintray for that. There is a good documentation how to create a bintray account here.
In short, you need to create a new account here.
So you will have two options:
I would recommend the second one, because you will be able to add more people to maintain your organization.
Following the second choice, create a new organization named BehaviorTree or any preferred name. And create a new repository named conan or any preferred name.
The build.py is configured following the reference BehaviorTree/conan/BehaviorTree.CPP/. Where:
Also, build.py has a rule to upload only tags or any branch with the pattern name "\d+.\d+.\d+".
And finally, you must set the variable CONAN_PASSWORD on Travis settings. The password is the Bintray API Key, it's not your account password. To read your API key you need to access https://bintray.com/profile/edit and click on API Key button. Don't forget to mark as secret on Travis settings.
Bintray package page
After to upload your package by CI, we recommend update your Bintray package page:
https://bintray.com/BehaviorTree/conan/BehaviorTree.CPP%3ABehaviorTree/edit?tab=general
The page contains only project metadata, as url, maturity (official), license.
Conan Center request
Now that all steps are done. Just click on "Add to Conan Center" button, present on your package page, and wait for a review.
Okay, this is a lot of information. Please, feel free to ask anything.
I'm including @danimtb and @SSE4 to review this PR. They are Conan experts.
Regards!
/cc @danimtb @SSE4
related issue #2