Details
-
User Story
-
Resolution: Done
-
P2: Important
-
None
-
None
Description
We will have a situation where one git repository contains several modules. And we need to be able to build those modules separately; not just whole repository.
- One conan file / split module
- coin to build each split module separately (with conan)
- Each addon to be pushed to internal conan server
- splitted src package / module
Iikka:
There are two approaches how to build and package one .git repository and produce multiple Conan packages.
Note! The end users must be able to build these by them self as well so the solution can not be Coin specific.
- One conanfile_<module_name>.py per Qt module
- conanfile_qtstatemachine.py, conanfile_qtscxml.py
- To include only the relevant sources in the conan build & conan package the "exports_sources" requires wild cards etc.
- conanfile_qtstatemachine.py:
- exports_sources = "src/statemachine/*", "src/foobar" # dummy example
- conanfile_qtscxml.py:
- exports_sources = "src/qtscxml/*", "src/foobar" # dummy example
- possible problem with shared files (.cmake) ?*
- "export_sources()" function can be implemented in recipes for fine-grained control which files to include in the conan package
- conanfile_qtstatemachine.py:
- Coin/CI build agent (instructions .yaml) needs more intelligence to "conan install <abc.py>" recipes in correct order (conan dependencies within the .git module)
- One top level "monolithic" build of the .git repository i.e. different conanfiles try to reuse the same build of the project, not rebuilding the whole project
- https://github.com/conan-io/conan/issues/3106#issuecomment-415353823
- structure:
- conanfile.py # does the monolithic build of the .git module
- "qtscxmlmonobuild/6.2.0@qt/final" # produced conan package, not intended directly for end users
- conanfile_qtscxml.py
- "qtscxml/6.2.0@qt/final"
- build_requires = "qtscxmlmonobuild/6.2.0@qt/final"
- def package(self):
- pick only relevant files from the monolithic build into this conan package
- conanfile_qtstatemachinepy
- "qtstatemachine/6.2.0@qt/final"
- build_requires = "qtscxmlmonobuild/6.2.0@qt/final"
- def package(self):
- pick only relevant files from the monolithic build into this conan package
- conanfile.py # does the monolithic build of the .git module
- We must release all these three conan packages in order that end users are able to build this qtscxml by them self. But they still can depend only in e.g. "qtscxml/6.2.0@qt/final" package in their on conan recipes/files. The "artificial" "qtscxmlmonobuild/6.2.0@qt/final" package may cause confusion among users but probably just a matter of communication?
Attachments
Issue Links
- depends on
-
QTQAINFRA-4251 Study how to split conan packages
- Closed
- is required for
-
QTQAINFRA-4068 Conan support to CI
- Closed
- mentioned in
-
Page Loading...