|
2 | 2 |
|
3 | 3 | Recipes for MeVisLab Thirdparty packages |
4 | 4 |
|
5 | | -The `recipes` directory contains all recipes. |
| 5 | +The `recipes` directory contains all recipes. The overall build order is currently defined in the `build_configuratuion.yml`. |
6 | 6 |
|
7 | 7 | ## Local package development |
8 | 8 |
|
@@ -35,9 +35,66 @@ Now conan should be installed: |
35 | 35 | conan --version |
36 | 36 | ``` |
37 | 37 |
|
| 38 | +### Install MeVisLab Build Tool |
| 39 | + |
| 40 | +`mbt`, the MeVisLab Build Tool, is a small wrapper for Conan and the Conan Package Tools. |
| 41 | +It mainly ensures that Conan is properly configured and initialized before invoking conan itself. |
| 42 | + |
| 43 | +``` |
| 44 | +python -m pip install -U git+http://gitlab.mevis.lokal/mevislab/mbt.git |
| 45 | +``` |
| 46 | + |
38 | 47 | ## Build a package |
39 | 48 |
|
| 49 | +### Using mbt, conan-package-tools or conan |
| 50 | + |
| 51 | +All wrappers (`mbt`, `conan-package-tools`) are just convenience. |
| 52 | +They make certain things easier, while making advanced things very difficult. |
| 53 | +That seems to be the nature of wrappers. Therefore it is always possible to |
| 54 | +work without these tools. |
| 55 | + |
| 56 | +So a recipe can be built directly with `mbt`: |
| 57 | + |
| 58 | +``` |
| 59 | +cd recipes/<recipe_name> |
| 60 | +mbt build |
| 61 | +``` |
| 62 | + |
| 63 | +_Note_: If you are building under Windows, have several Visual Studio versions installed and want to use _not_ the |
| 64 | +newest one, you have to set an environment variable with the desired version to communicate this to `mbt`: |
| 65 | +``` |
| 66 | +SET CONAN_VISUAL_VERSIONS=16 |
| 67 | +``` |
| 68 | + |
| 69 | +Or using `conan-package-tools`: |
| 70 | +``` |
| 71 | +cd recipes/<recipe_name> |
| 72 | +./build.py |
| 73 | +``` |
| 74 | + |
| 75 | +Or using `conan`: |
40 | 76 | ``` |
41 | 77 | cd recipes/<recipe_name> |
42 | 78 | conan create . |
43 | 79 | ``` |
| 80 | + |
| 81 | +## Jenkins Integration |
| 82 | + |
| 83 | +### Pipeline Description |
| 84 | +There are mainly two Jenkinsfiles that control the build of all thirdparty library and tools: Jenkinsfile and JenkinsfileLibrary. The first parses the `build_configuration.yml` and triggers the build of one tier after the other, starting with tier0. For further details see the chapter Build Configuration |
| 85 | + |
| 86 | +The conan package system is written in a way that it checks if the package itself or one of its dependencies has been changed since the last successful build. If nothing has changed then the build and archiving step is been skipped. |
| 87 | +Since even this check takes a certain amount of time, an additional optimization has been implemented. All changed files are collected since the last successful build of the complete thirdparty/branch build. And only those directly affected projects and the tiers below are triggered to be rebuild. This shortens the build time enormously. If one of the files `Jenkinsfile`, `JenkinsfileLibrary`, or `build_configuration.yml` is part of any changeset, then this optimisation is skipped and all tiers with all projects are build. |
| 88 | + |
| 89 | +### Build Configuration |
| 90 | +The build configuration is organised in the `build_configuration.yml` file. All libraries and tools that are needed to build MeVisLab are organised in this file. Since it very tedios and cumpersome to descripe smallest possible dependecy graph, the dependencies are broken down in different tiers. The content of the different tier is organised according to the dependencies of the individual libraries and tools. So if a e.g. a library A depends on an other library B, then B must be referenced in an one of the upper tiers. |
| 91 | + |
| 92 | +The build of each library and tool for all specified platform and build types must finish in a defined time. There is a default, that is been used for all packages. In case that a certain package needs much more time, e.g. qt5, then there is the possibility to define a timeout exception. |
| 93 | + |
| 94 | +These are the parameters that are defined in the file: |
| 95 | + |
| 96 | +| Parameter | Description | |
| 97 | +| --------- | ------------| |
| 98 | +| timeout_default: | Default time in minutes for all not other specified packages. | |
| 99 | +| timeout_exception: | A map of all packages with their individual timeouts. | |
| 100 | +| tiers: | It must contain an ordered list of all tiers, starting with tier0 | |
0 commit comments