ci: simplify cashing (#16599)
This commit is contained in:
parent
de005321a5
commit
e4997a27ff
|
@ -71,8 +71,9 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.requires }}-${{ hashFiles('requirements/app/base.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.requires }}-
|
||||
key: pip-${{ matrix.pkg-name }}-${{ matrix.requires }}-${{ hashFiles('requirements/app/base.txt') }}
|
||||
restore-keys: pip-${{ matrix.pkg-name }}-
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Install Lightning package & dependencies
|
||||
env:
|
||||
|
|
|
@ -69,8 +69,9 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.requires }}-${{ hashFiles('requirements/app/base.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.requires }}-
|
||||
key: pip-${{ matrix.pkg-name }}-${{ matrix.requires }}-${{ hashFiles('requirements/app/base.txt') }}
|
||||
restore-keys: pip-${{ matrix.pkg-name }}-
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Switch PyTorch URL
|
||||
run: python -c "print('TORCH_URL=https://download.pytorch.org/whl/' + str('test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html'))" >> $GITHUB_ENV
|
||||
|
|
|
@ -93,9 +93,9 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements/fabric/*.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-
|
||||
key: pip-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements/fabric/*.txt') }}
|
||||
restore-keys: pip-${{ matrix.pkg-name }}-${{ matrix.release }}-
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Switch PyTorch URL
|
||||
run: python -c "print('TORCH_URL=https://download.pytorch.org/whl/' + str('test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html'))" >> $GITHUB_ENV
|
||||
|
|
|
@ -106,9 +106,9 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements/pytorch/*.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-
|
||||
key: pip-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements/pytorch/*.txt') }}
|
||||
restore-keys: pip-${{ matrix.pkg-name }}-${{ matrix.release }}-
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Env. variables
|
||||
run: |
|
||||
|
|
|
@ -40,9 +40,9 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/pytorch/base.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
key: pip-${{ hashFiles('requirements/pytorch/base.txt') }}
|
||||
restore-keys: pip-
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
|
|
@ -60,9 +60,8 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-docs-test-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-docs-test-${{ matrix.pkg-name }}-
|
||||
key: docs-test-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }}
|
||||
restore-keys: docs-test-${{ matrix.pkg-name }}-
|
||||
|
||||
- name: Install LAI package
|
||||
# This is needed as App docs is heavily using/referring to lightning package
|
||||
|
@ -125,9 +124,8 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-docs-make-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-docs-make-${{ matrix.pkg-name }}-
|
||||
key: docs-make-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }}
|
||||
restore-keys: docs-make-${{ matrix.pkg-name }}-
|
||||
|
||||
- name: Install package & dependencies
|
||||
env:
|
||||
|
|
|
@ -39,9 +39,8 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-deploy-docs-pip-${{ hashFiles('requirements/app/*.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-deploy-docs-pip-
|
||||
key: deploy-docs-pip-${{ hashFiles('requirements/app/*.txt') }}
|
||||
restore-keys: deploy-docs-pip-
|
||||
|
||||
- name: Install package & dependencies
|
||||
env:
|
||||
|
|
Loading…
Reference in New Issue