Skip to content

Commit

Permalink
Use new 'pip cache dir' to combine macOS/Ubuntu cache config
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jun 30, 2020
1 parent 829e1f1 commit 410095e
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,25 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Ubuntu cache
uses: actions/cache@v2
if: startsWith(matrix.os, 'ubuntu')
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
path: ~/.cache/pip
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
python-version: ${{ matrix.python-version }}

- name: macOS cache
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
if: startsWith(matrix.os, 'macOS')
with:
path: ~/Library/Caches/pip
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Build system information
run: python .github/workflows/system-info.py

Expand Down

0 comments on commit 410095e

Please sign in to comment.