File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,31 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu.
345345 ${{ runner.os }}-pip-
346346` ` `
347347
348+ # ## Multiple OS's in a workflow with a matrix
349+
350+ ` ` ` yaml
351+ jobs:
352+ build:
353+ runs-on: ${{ matrix.os }}
354+ strategy:
355+ matrix:
356+ os: [ubuntu-latest, macos-latest, windows-latest]
357+ include:
358+ - os: ubuntu-latest
359+ path: ~/.cache/pip
360+ - os: macos-latest
361+ path: ~/Library/Caches/pip
362+ - os: windows-latest
363+ path: ~\A ppData\L ocal\p ip\C ache
364+ steps:
365+ - uses: actions/cache@v2
366+ with:
367+ path: ${{ matrix.path }}
368+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
369+ restore-keys: |
370+ ${{ runner.os }}-pip-
371+ ` ` `
372+
348373# ## Using pip to get cache location
349374
350375> Note: This requires pip 20.1+
You can’t perform that action at this time.
0 commit comments