即使在`before_cache`

时间:2018-05-03 04:27:39

标签: caching travis-ci

Here是我能找到的一个示例构建。

我不确定出了什么问题,但即使我在.travis.yml中有这个部分,它仍然会说change detected

cache:
  directories:
    - $HOME/virtualenv/python3.6.*
    - $HOME/.cache/pip
before_cache:
  - rm -f $HOME/.cache/pip/log/debug.log
  - rm -rf $HOME/.cache/pip/http

日志的一部分如下:

$ rm -f $HOME/.cache/pip/log/debug.log
$ rm -rf $HOME/.cache/pip/http
store build cache
change detected (content changed, file is created, or file is deleted):
/home/travis/.cache/pip/http/0/2/8/3/8/0283814c221ac4bc25c88210daf1373d5ea1599443793f980776f2bd
/home/travis/.cache/pip/http/0/a/8/f/a/0a8faabd212d81beff3ad0e11f3e4746188c0ad05c9190218de2e48a
/home/travis/.cache/pip/http/1/a/6/6/8/1a668413371d25a5c96b0d9ce943feb382e5084277c6becd46243276
/home/travis/.cache/pip/http/3/a/f/3/a/3af3addf06e983a6c02f46e7bea70c221d3ff95bf1418fa6da354e14
/home/travis/.cache/pip/http/3/d/0/7/9/3d0790aa6d8aba43447ad4d8fdc684c544812f2cc57ad084f4b1b2db
/home/travis/.cache/pip/http/4/3/5/8/9/435895f5c58d1fbe5d6efd64c4a3afa3e8b280691afe2988aaf12f5c
/home/travis/.cache/pip/http/7/b/f/8/d/7bf8d0ac304d190542382e13233a33a5644477a3738766e4e84c6fe1
/home/travis/.cache/pip/http/8/1/0/3/1/8103159fcae9ef47b8f04cd57495057ea1d442635ec8972390866e7e
/home/travis/.cache/pip/http/8/a/4/e/c/8a4eccf4e850fd6cf5ebe8398d0140632e274527091f7587e668be40
/home/travis/.cache/pip/http/9/8/b/2/1/98b21875dce7a2d53963fef4d2f05edab9e8237a174b4b9a157cb45f
/home/travis/.cache/pip/http/a/c/1/0/1/ac
...
changes detected, packing new archive
.
uploading archive

任何解决方案?

1 个答案:

答案 0 :(得分:0)

在我添加的.travis.yml

cache: directories: - $HOME/.cache/wheels