Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coin: Build qdoc as part of repo instructions for CI doc building
Backstory. The current approach for building documentation in the CI is that we build a static qdoc in a Jenkins job, manually provision it in qt5.git, and then build qt documentation using that somewhat old qdoc version. Updating the provisioned qdoc is a very slow process, because changes first need to be merged into qttools, then a Jenkins job needs to be manually run, then provisioning needs to be updated, and sometimes it also depends on a full qt5.git submodule update or has to wait for other unrelated changes to qt5.git. The new approach. This change adds CI instructions to build a static qdoc (and other relevant tools necessary for documentation generation) using the latest qttools/dev/HEAD sha1 in a specific host platform's qtbase build instructions, and then uses those tools for documentation generation and doc warning checks in each repo's TestDocs CI test phase. To enable these new instructions, the host platform and the doc checking platform need to be tagged with the 'DocsGenerationV2' feature. The built tools are cached in a separate archive using a new Coin feature, which is then extracted during each repo's TestDocs phase. Pros and cons. The benefit of this new approach is that we will always use a mostly up-to-date qdoc from qttools/dev/HEAD when generating documentation, making the documentation team's life easier. Specifically, once the doc tools are built in qtbase with the latest qttools/dev/HEAD sha1 that was available during that integration, the resulting built tools are then used for doc checks in dependent repos. A newer qttools/dev/HEAD sha1 will only be used for a particular repo once the qtbase dependencies.yaml sha1 is updated, or when doing qt5.git changes that cause a rebuild of qtbase. Note that while new tools are built due to dependency updates, the used qttools sha1 is not recorded in any way in any of the dependencies.yaml files. qtbase doc checks will always use the latest qttools/dev/HEAD sha1 at the integration time, because the tools will always be built from scratch. The downside of the new approach is that, by default, the doc generation will not use a pinned version of qdoc anymore, but rather follow the flow described above. This has a chance of introducing failures which are unrelated to integrating changes. This should happen rarely because the doc team usually tries to fix doc warnings before changing qdoc's code. If temporary pinning of qttools or qt5.git is required when testing the docs of a specific repo, it can be achieved as follows: - set the QT_CI_BUILD_REPO_DOC_TOOLS env var to "1" in the repo coin/module_config.yaml file build instructions, to ensure the doc tools are built in that repo, rather than reuse the ones built in qtbase - set the QT_CI_DOC_TOOLS_PIN_GIT_REF env var to the desired qttools sha1 or other git ref, in the same build instructions phase - optionally set the QT_CI_DOC_TOOLS_TOP_LEVEL_PIN_GIT_REF env var to the desired qt5.git sha1 or other git ref, in the same build instructions phase, if a different version of qt5.git is required - optionally set the QT_CI_DOC_TOOLS_USE_CI_TOP_LEVEL_BRANCH env var to ON, in case if the module branch that the CI job computes should be used as the qt5.git branch - set the QT_CI_FETCH_REPO_DOC_TOOLS env var to "1" in the repo test instructions, to ensure the just built doc tools are fetched instead of the qtbase-built ones Test running this new approach will allow us to collect some feedback on how often breakages happen, and how much easier it makes the documentation team's work, or how much harder it makes the life of regular integrations. The abundant amount of optional pinning options should be enough to avoid any permanent integration dead locks. Pick-to: 6.8 Task-number: QTBUG-128730 Change-Id: I8606cb3076036a4a0ec652d0fa74d270e8f5dfdf Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Paul Wicking <[email protected]>
- Loading branch information