From d311068dfb01c670688aa62f1220c1cb0877b4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Voituret?= Date: Fri, 8 Nov 2019 19:45:38 -0500 Subject: [PATCH] fix: model caching --- .circleci/config.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fbad562..b6d4fad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,8 @@ jobs: - python-3.6-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} - python-3.6-cache-{{ .Branch }}- - python-3.6-cache- + - restore_cache: + key: models-{{ checksum "spleeter/model/__init__.py" }} - run: name: install ffmpeg command: apt-get update && apt-get install -y ffmpeg @@ -23,12 +25,14 @@ jobs: - save_cache: key: python-3.6-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} paths: - - "pretrained_models" - - "/usr/local/bin" - - "/usr/local/lib/python3.6/site-packages" + - "/usr" - run: name: pytest command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning + - save_cache: + key: models-{{ checksum "spleeter/model/__init__.py" }} + paths: + - "pretrained_models" # ======================================================================================= # Python 3.7 testing. # ======================================================================================= @@ -43,21 +47,25 @@ jobs: - python-3.7-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} - python-3.7-cache-{{ .Branch }}- - python-3.7-cache- + - restore_cache: + key: models-{{ checksum "spleeter/model/__init__.py" }} - run: name: install ffmpeg command: apt-get update && apt-get install -y ffmpeg - run: name: install python dependencies command: pip install -r requirements.txt && pip install pytest + - save_cache: + key: python-3.7-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} + paths: + - "/usr" - run: name: pytest command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning - save_cache: - key: python-3.7-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} + key: models-{{ checksum "spleeter/model/__init__.py" }} paths: - "pretrained_models" - - "/usr/local/bin" - - "/usr/local/lib/python3.7/site-packages" # ======================================================================================= # Source distribution packaging. # =======================================================================================