Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-4239

CI should be able to build split modules with conan

    XMLWordPrintable

Details

    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.

      1. One conan file / split module
      2. coin to build each split module separately (with conan)
      3. Each addon to be pushed to internal conan server
      4. 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.

      1. One conanfile_<module_name>.py per Qt module
        1. conanfile_qtstatemachine.py, conanfile_qtscxml.py
        2. To include only the relevant sources in the conan build & conan package the "exports_sources" requires wild cards etc.
          1. conanfile_qtstatemachine.py:
            1. exports_sources = "src/statemachine/*", "src/foobar"  # dummy example
          2. conanfile_qtscxml.py:
            1. exports_sources = "src/qtscxml/*", "src/foobar"  # dummy example
          3. possible problem with shared files (.cmake) ?*
            1. "export_sources()" function can be implemented in recipes for fine-grained control which files to include in the conan package
        3. Coin/CI build agent (instructions .yaml) needs more intelligence to "conan install <abc.py>" recipes in correct order (conan dependencies within the .git module)
      2. 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
        1. https://github.com/conan-io/conan/issues/3106#issuecomment-415353823
        2. structure:
          1. conanfile.py  # does the monolithic build of the .git module
            1. "qtscxmlmonobuild/6.2.0@qt/final"  # produced conan package, not intended directly for end users
          2. conanfile_qtscxml.py
            1. "qtscxml/6.2.0@qt/final" 
            2. build_requires = "qtscxmlmonobuild/6.2.0@qt/final"
            3. def package(self):
              1. pick only relevant files from the monolithic build into this conan package
          3. conanfile_qtstatemachinepy
            1. "qtstatemachine/6.2.0@qt/final" 
            2. build_requires = "qtscxmlmonobuild/6.2.0@qt/final"
            3. def package(self):
              1. pick only relevant files from the monolithic build into this conan package
        3. 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              tosaario Toni Saario
              janihe Jani Heikkinen
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes