forked from microsoft/torchgeo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: cache pip installs (microsoft#1057)
* CI: cache pip installs * Update to new min deps filename * Use cache action instead * Cache releases too
- Loading branch information
1 parent
76e9442
commit 590a412
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.cfg') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install .[tests] | ||
pip list | ||
|
@@ -33,7 +40,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.cfg') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install .[datasets,tests] | ||
pip list | ||
|
@@ -49,7 +63,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.cfg') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install .[datasets,docs,tests] | ||
pip list | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/style.txt') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/style.txt | ||
pip list | ||
|
@@ -35,7 +42,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/style.txt') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/style.txt | ||
pip list | ||
|
@@ -51,7 +65,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/style.txt') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/style.txt | ||
pip list | ||
|
@@ -67,7 +88,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/style.txt') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/style.txt | ||
pip list | ||
|
@@ -83,7 +111,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/style.txt') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/style.txt | ||
pip list | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,14 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/required.txt') }}-${{ hashFiles('requirements/datasets.txt') }}-${{ hashFiles('requirements/tests.txt') }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/required.txt -r requirements/datasets.txt -r requirements/tests.txt | ||
pip list | ||
|
@@ -41,6 +48,12 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/required.txt') }}-${{ hashFiles('requirements/datasets.txt') }}-${{ hashFiles('requirements/tests.txt') }} | ||
- name: Setup headless display for pyvista | ||
uses: pyvista/setup-headless-display-action@v1 | ||
- name: Install apt dependencies (Linux) | ||
|
@@ -58,6 +71,7 @@ jobs: | |
pacman -S --noconfirm --needed unrar | ||
if: ${{ runner.os == 'Windows' }} | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/required.txt -r requirements/datasets.txt -r requirements/tests.txt | ||
pip list | ||
|
@@ -86,11 +100,18 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: '3.8' | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/min-reqs.old') }}-${{ hashFiles('requirements/mins-cons.old') }} | ||
- name: Install apt dependencies (Linux) | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install unrar | ||
- name: Install pip dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements/min-reqs.old -c requirements/min-cons.old | ||
pip list | ||
|