Skip to content

Travis persists ccache but does not use ccache #9556

Closed

Description

@aarchiba

Description

In principle, ccache could dramatically speed up compilation of C code for very little extra effort - provided that its cache survived between runs. The Travis builds do persist the build, but do not actually use ccache in any compilation (so the persisted cache is empty).

Expected behavior

ccache is used to accelerate compilation.

Actual behavior

ccache is not used to accelerate compilation.

Steps to Reproduce

Examine the Travis logs for a run. It will have a fold-away button marked ccache on the right side, but when unfolded the button reveals nothing was done.

System Details

This happens on all Travis builds (and all CircleCI too but I don't know if they support caching).

Suggested fix

Either just take the cache stanza out ot .travis.yml or enable ccache by setting the C compiler environment vairables to ccache gcc or ccache clang or the like.

The Travis cache is per-job, and there is one for master and another for each pull request; if a PR is missing its cache, it will pull the corresponding one from master.

Activity

  1. pllim commented on Nov 7, 2019

    @pllim
    Member

    BTW, this is obsolete if we go ahead with #8445 .

  2. saimn commented on Nov 12, 2019

    @saimn
    Contributor

    Travis is supposed to automatically add ccache to the $PATH, and this was working so it would be good to find why it stopped doing so.
    Are you sure that it doesn't work ? https://travis-ci.org/astropy/astropy/jobs/610640501#L2161 for instance shows that it stores the cache. And https://travis-ci.org/astropy/astropy/caches shows that the cache is used (and we use it only for ccache).
    One thing that may be misleading is that the cache is not shared across branches, I think.

  3. aarchiba commented on Nov 12, 2019

    @aarchiba
    ContributorAuthor

    I may be wrong. I don't have permission to see the caches, and the Travis logs I've seen appear to show empty ccaches, but maybe I've been looking at the wrong ones. (Travis caches are inherited from master by PRs, and not shared between jobs.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions