-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Home
The conan-center-index (this repository) contains recipes for the conan-center repository.
To contribute with a Conan recipe into the conan-center
repository you can submit a Pull Request to the master branch of this repository. The connected continuous integration system will generate the binary packages automatically.
The CI system will also report with messages in the PR any error in the process, even linking to the logs to see more details and debug.
The Bintray conan-center repository contains recipes and packages contributed using the previous mechanism of doing inclusion request
on the Bintray platform. All the package recipes will be adapted and migrated to this new mechanism, in addition to the new contributions we receive.
This process of contributing to the conan central repository is much easier for the community, previously it was needed to set up the CI services like Travis, Appveyor or Azure to contribute on Bintray with the binary packages, now, the connected CI system will do all the work out of the box. You only need to open a pull request with a recipe following some simple rules.
Make sure you are using the latest Conan client version, the recipes might evolve introducing features of the newer Conan releases.
The easier way is to install the conan-index-tools
package that will create for us the needed files and folders for the new recipe.
-
Install the
conan-index-tools
by runningpip install conan-index-tools
-
Create a clean branch:
git checkout -b feature/my_recipe
- Note: You can submit only 1 recipe per pull request.
-
Create a new recipe or a version:
- Run
cit new .
and follow the wizard. (The "." is the folder with the checkout of the fork)
- Run
-
Test the recipe locally:
- Install the
conan-center
hook:
$ cit setup
(You can disable it later withcit setup --clean
)- To create a package for your default configuration:
$ cit run . lib/1.0
- To create a package for another configuration:
$ cit run . lib/1.0
--profile path/to/profile - Install the
-
Submitting a Pull Request to "master". You will receive some messages from the CI system about errors or success. Once the build is green, the Pull Request will be reviewed, feedback provided and eventually merged.
Sometimes the CI will post a message reporting that some of the configurations failed, for example, a build on Linux x86. You will find a link to the profile that failed. You can use the cit run . lib/1.0 --profile_url xxx
.
`$ cit run . lib/1.0` --profile_url https://xxxx
You can do all the process manually, without any tool, take a look at the Index folder structure page to know the needed files in a Pull Request.
To try your recipe locally you can:
- Install the hook manually:
$ conan config install https://github.com/conan-io/hooks -sf hooks -tf hooks`
$ conan config set hooks.conan-center`
- Export the env var
CONAN_HOOK_ERROR_LEVEL=40
in order to fail if an error from the hook is reported. - Call
conan create lib/1.0@cbot/stable
in the folder of the recipe using the profile you want to test.
Go to the Error Knowledge Base page to know more.