cache dependencies
@@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
build:
- name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
+ name: "py${{ matrix.python-version }} on ${{ runner.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -18,6 +18,24 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
+
+ # Cache dependencies
+ - uses: actions/cache@v1
+ if: startsWith(runner.os, 'Linux')
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+ - uses: actions/cache@v1
+ if: startsWith(runner.os, 'Windows')
+ with:
+ path: ~\AppData\Local\pip\Cache
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+
+ # Setup
- name: Install dependencies
run: |
python -m pip install -U pip setuptools numpy pybind11
