Ci GitHub caching (#6382)

* Cache Github Actions CI

* Remove useless file
This commit is contained in:
Lysandre Debut
2020-08-10 10:39:31 -04:00
committed by GitHub
parent b99098abc7
commit 79588e6fdb
4 changed files with 26 additions and 20 deletions

View File

@@ -1,19 +0,0 @@
name: GitHub-hosted runner
on: push
jobs:
check_code_quality:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
# - name: Install dependencies
# run: |
# pip install .[tf,torch,quality]

View File

@@ -18,6 +18,14 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Loading cache
uses: actions/cache@v2
id: cache
with:
path: ~/.cache/pip
key: v0-torch_hub-${{ hashFiles('setup.py') }}
- name: Install dependencies
run: |
pip install --upgrade pip

View File

@@ -25,6 +25,14 @@ jobs:
- name: Current dir
run: pwd
- run: nvidia-smi
- name: Loading cache.
uses: actions/cache@v2
id: cache
with:
path: .env
key: v0-tests_tf_torch_gpu-${{ hashFiles('setup.py') }}
- name: Create new python env (on self-hosted runners we have to handle isolation ourselves)
run: |
python -m venv .env

View File

@@ -13,6 +13,14 @@ jobs:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Loading cache.
uses: actions/cache@v2
id: cache
with:
path: .env
key: v0-slow_tests_tf_torch_gpu-${{ hashFiles('setup.py') }}
- name: Python version
run: |
which python
@@ -22,6 +30,7 @@ jobs:
run: pwd
- run: nvidia-smi
- name: Create new python env (on self-hosted runners we have to handle isolation ourselves)
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m venv .env
source .env/bin/activate
@@ -32,7 +41,7 @@ jobs:
run: |
source .env/bin/activate
pip install --upgrade pip
pip install torch!=1.6.0 --no-cache-dir
pip install torch!=1.6.0
pip install .[sklearn,testing]
- name: Are GPUs recognized by our DL frameworks