0

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.

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.

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?

Claudio
  • 10,614
  • 4
  • 31
  • 71

1 Answers1

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>
Mark Robinson
  • 3,135
  • 1
  • 22
  • 37
  • Hmm, this is different from what the standard travisci_build_coverity_scan.sh does right now. What do those commands replace in that script, the single cov-build step? Where are those interfaces documented? How stable are they? I'm concerned this could break quickly when Coverity changes their procedure, at least for Travis-CI. Nevertheless, thanks for the pointer! – Jan Kiszka Feb 05 '15 at 09:07
  • True, but you're doing something very different. Your build is building and cleaning multiple times, so you want to capture each build. Cov-build is what captures the build, cov-analyze runs the analysis, cov-commit-defects puts the defects in CIM. – Mark Robinson Feb 05 '15 at 17:42
  • Getting closer: We want streams in order to manage configuration variants (like different target architectures or boards) - but we will probably not get them as [OSS project](https://communities.coverity.com/message/6109). Checking with Coverity... PS: When using the free cloud-based scan, you don't have local analysis (cov-analyze, cov-commit-defects). – Jan Kiszka Feb 05 '15 at 18:07
  • Ah yes, Professional Services are probably the best people to talk about your needs. You might also want to check out CodeSpotter. – Mark Robinson Feb 06 '15 at 18:16