简体   繁体   English

避免/减少Travis-CI构建的多次安装

[英]Avoiding/reducing multiple installations for Travis-CI builds

For our Travis-CI builds of the Jailhouse hypervisor , we have a rather costly environment setup which consists of a partial distribution update to pull in a recent make version (>=3.82, the default one is still only 3.81 - Ubuntu...), a cross toolchain for ARM and a 100 MB package of prebuilt Linux kernel sources that we need to compile an out-of-tree module. 对于我们的Jailhouse虚拟机管理程序的 Travis-CI构建,我们有一个相当昂贵的环境设置,其中包括部分发行版更新以引入最新的make版本(> = 3.82,默认版本仍仅为3.81-Ubuntu ...) ,适用于ARM的跨工具链和一个100 MB的预编译Linux内核源代码包,我们需要这些代码来编译树外模块。

To reduce the build time and the number of kernel downloads, we currently build all configuration variants sequentially in a single run (make; make clean; make...). 为了减少构建时间和减少内核下载次数,我们目前在一次运行中依次构建所有配置变体(make; make clean; make ...)。 That was fine for checking for build breakages, but with the addition of a Coverity scan, which depends on the build outputs, it no longer works. 这对于检查构建破损是很好的选择,但是通过添加Coverity扫描(取决于构建输出),它不再起作用。 Switching to a build matrix seems the obvious solution, at the price of multiple installations because Travis-CI seems to be unable to reuse them during such builds. 切换到构建矩阵似乎是显而易见的解决方案,但要付出多次安装的代价,因为Travis-CI似乎无法在这样的构建过程中重复使用它们。 While we currently only have 3 configuration variants, this will increase in the future (eg every ARM board added will increase it by one), thus the approach does not really scale. 尽管我们目前只有3种配置变体,但将来会增加(例如,添加的每个ARM板都将其增加一个),因此该方法并不能真正实现扩展。

Do we have any alternatives? 我们还有其他选择吗? I already looked at caching, available via the docker-based build, but lacking sudo support there prevents this approach. 我已经看过缓存,可以通过基于docker的构建来使用缓存,但是那里缺少sudo支持会阻止这种方法。 Other ideas? 还有其他想法吗?

You should change your build to do this 您应该更改构建以执行此操作

cov-build --idir <target1> make; make clean
...

Use different intermediate directories for each build. 每个构建使用不同的中间目录。 Then go back later and run 然后回去跑步

cov-analyze --idir <target1>
cov-commit-defects --idir <target1> --stream <target1>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM