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

时间:2023-01-18 12:37:59

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...). 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. 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. While we currently only have 3 configuration variants, this will increase in the future (e.g. every ARM board added will increase it by one), thus the approach does not really scale.

为了减少构建时间和内核下载次数,我们目前在一次运行中按顺序构建所有配置变量(make; make clean; make ...)。这对于检查构建破坏是好的,但是通过添加Coverity扫描(取决于构建输出),它不再起作用。切换到构建矩阵似乎是一个明显的解决方案,以多个安装为代价,因为Travis-CI似乎无法在此类构建期间重用它们。虽然我们目前只有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. Other ideas?

我们有其他选择吗?我已经看过缓存,可以通过基于docker的构建获得,但缺少sudo支持可以防止这种方法。其他想法?

1 个解决方案

#1


0  

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>

#1


0  

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>