Page MenuHomePhabricator

[SECP256K1] Fix the kitware PPA timeouts issues on Travis
ClosedPublic

Authored by Fabien on Mar 4 2020, 13:17.

Details

Summary

This is a follow-up for D5408. After several builds, I got one timeout
from the kitware PPA that caused a build failure.

This diff is installing cmake from the prebuilt binaries. It uses the
first supported stable version directly downloaded from cmake.org.

Hopefully this will make the cmake installation more robust on Travis.
It makes no difference in the build duration.

Test Plan

Diff Detail

Repository
rABC Bitcoin ABC
Branch
secp256k1_fix_kitware_prebuilt
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9727
Build 17341: Default Diff Build & Tests
Build 17340: arc lint + arc unit

Event Timeline

You need to use travis's cache directory functionality. See https://github.com/SDC-Developers/SDC/blob/master/.travis.yml#L19 or an exemple. This is ensure that you only download cmake once in a while.

I looked into this but I think it is falling in the case where it is not recommended:

From https://docs.travis-ci.com/user/caching/#things-not-to-cache:

Large files that are quick to install but slow to download do not benefit from caching, as they take as long to download from the cache as from the original source

Looking at how the cache works:

  • Without cache, we are downloading an archive from cmake.org and extracting it to the filesystem.
  • With the cache, we are downloading an archive from Travis servers and extracting it to the filesystem.

So I don't expect any gain from caching here.

For info the total DL + installation time is < 2s on average.

deadalnix requested changes to this revision.Mar 5 2020, 16:51

The gain you'll have are reliability gains. If kitware is down,t he build still passes. If travis is down, then the build won't pass regardless of kitware.

This revision now requires changes to proceed.Mar 5 2020, 16:51
Fabien planned changes to this revision.Mar 5 2020, 17:10

Good point, I'll set the cache.

This revision is now accepted and ready to land.Mar 5 2020, 23:36

For reference, an example build where the cache is being used: https://travis-ci.org/Fabcien/secp256k1/builds/659036916.