Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: Add caching to match Travis.
  • Loading branch information
QuLogic committed Nov 27, 2020
commit c0ef9726ef929ea5e00052aecb1c50334a871e93
41 changes: 40 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
Linux)
sudo apt-get update -yy
sudo apt-get install -yy \
ccache \
cm-super \
dvipng \
ffmpeg \
Expand Down Expand Up @@ -88,10 +89,47 @@ jobs:
ttf-wqy-zenhei
;;
macOS)
true
brew update
brew install ccache
;;
esac

- name: Cache pip
uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-pip-
- name: Cache pip
uses: actions/cache@v2
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-pip-
- name: Cache ccache
uses: actions/cache@v2
with:
path: |
~/.ccache
key: ${{ runner.os }}-py${{ matrix.python-version }}-ccache-${{ hashFiles('src/*') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-ccache-
- name: Cache Matplotlib
uses: actions/cache@v2
with:
path: |
~/.cache/matplotlib
!~/.cache/matplotlib/tex.cache
!~/.cache/matplotlib/test_cache
key: ${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
${{ runner.os }}-py${{ matrix.python-version }}-mpl-

- name: Install Python dependencies
run: |
# Upgrade pip and setuptools and wheel to get as clean an install as
Expand Down Expand Up @@ -147,6 +185,7 @@ jobs:

- name: Install Matplotlib
run: |
ccache -s
git describe

# Set flag in a delayed manner to avoid issues with installing other
Expand Down