build: Caching for macOS on Travis #17638

issue hebasto opened this issue on November 30, 2019
  1. hebasto commented at 8:36 AM on November 30, 2019: member

    It seems the following directories

    https://github.com/bitcoin/bitcoin/blob/abb30de63f368c9875c3f2a4cfe91b1daf9412da/.travis.yml#L38-L40

    are never cached on Travis macOS builds due to tar fail:

    changes detected, packing new archive
    tar: Failed to set default locale
    

    E.g., https://travis-ci.org/bitcoin/bitcoin/jobs/618772348

  2. fanquake added the label Tests on Nov 30, 2019
  3. MarcoFalke commented at 8:23 PM on December 3, 2019: member

    Cleared the cache and this still happens. Please remove those two lines if they do nothing.

  4. MarcoFalke added the label good first issue on Dec 3, 2019
  5. rikur commented at 12:11 AM on December 4, 2019: none

    I wish there was a way to reproduce this locally.

    I think caching is working fine, but as packages are updated in homebrew brew cleanup removes the old cached package downloads to prevent the cache size from bloating up. In other words changes detected, packing new archive should not show up in very macOS build, but shouldn't be rare either.

    Maybe @Sjors can confirm?

  6. Sjors commented at 9:04 AM on December 4, 2019: member

    I would prefer fixing the cache over dropping it. macOS Travis is incredibly buggy though.

    Sounds like we should check if the tar part actually fails, or just throws a spurious error: Failed to set default locale

    Try changing the locale to en_US.UTF-8 (in 00_setup_mac_env_host.sh) and/or explictly setting LC_MESSAGES.

    Inspiration:

  7. laanwj commented at 9:36 AM on December 4, 2019: member

    Are you sure "tar: Failed to set default locale" is a fatal error and not just a warning? Some tools (e.g. Perl) will print screenfuls of locale errors and still continue to do what they do.

    Sounds like we should check if the tar part actually fails, or just throws a spurious error: Failed to set default locale

    Exactly…

  8. hebasto commented at 9:41 AM on December 4, 2019: member

    ... we should check if the tar part actually fails...

    The mentioned cache files are not uploaded, unlike xcode cache.

  9. MarcoFalke commented at 2:55 PM on December 4, 2019: member

    I think we shouldn't just blindly cache anything without reason. Are you sure caching this speeds up the build?

  10. Sjors commented at 3:30 PM on December 4, 2019: member

    We don't know until we fix it, but brew install seems to take about 80 seconds: https://travis-ci.org/bitcoin/bitcoin/jobs/618772348#L93

  11. MarcoFalke commented at 3:35 PM on December 4, 2019: member

    Huh, there it says that the packages were already downloaded (i.e. cached)? https://travis-ci.org/bitcoin/bitcoin/jobs/618772348#L138

  12. Sjors commented at 3:37 PM on December 4, 2019: member

    That suggests the error is spurious, i.e. the cache is working. #17638 (comment)

  13. hebasto commented at 3:43 PM on December 4, 2019: member

    Huh, there it says that the packages were already downloaded (i.e. cached)?

    Could this be verified by clearing the cache?

  14. Sjors commented at 3:46 PM on December 4, 2019: member

    @MarcoFalke do you have the logs to the first run after your cache clear? #17638 (comment)

  15. MarcoFalke removed the label good first issue on Dec 4, 2019
  16. MarcoFalke commented at 5:27 PM on December 4, 2019: member

    Ok, so it is only a warning that can be ignored or maybe fixed with something like #17638 (comment)

  17. hebasto closed this on Dec 4, 2019

  18. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 21:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me