Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable cache on the CI #2083

Merged
merged 20 commits into from
Jan 28, 2022
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
Fix windows CI too
  • Loading branch information
ZanSara committed Jan 28, 2022
commit 084d85549b5af258c5f5907b01fe69459f43751d
70 changes: 32 additions & 38 deletions .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,33 @@ jobs:
pip install mypy==0.910 types-Markdown types-requests types-PyYAML pydantic
mypy haystack

# build-cache:
# needs: type-check
# runs-on: windows-latest
build-cache:
needs: type-check
runs-on: windows-latest

# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# with:
# python-version: 3.7
# - name: Cache
# id: cache-python-env
# uses: actions/cache@v2
# with:
# path: ${{ env.pythonLocation }}
# key: windows-${{ hashFiles('**/*.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}
# - name: Install Pytorch on windows
# run: |
# pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
# - name: Install dependencies
# if: steps.cache-python-env.outputs.cache-hit != 'true'
# run: |
# python -m pip install --upgrade pip
# pip install --upgrade --upgrade-strategy eager -e .[test]
# pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.0+cpu.html
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Cache
id: cache-python-env
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: windows-${{ hashFiles('**/*.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}

- name: Install Pytorch on windows
run: |
pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html

- name: Install dependencies
if: steps.cache-python-env.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager .[test]
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.0+cpu.html

prepare-build:
needs: build-cache
Expand All @@ -70,11 +73,12 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
# - name: Cache
# uses: actions/cache@v2
# with:
# path: ${{ env.pythonLocation }}
# key: windows-${{ hashFiles('**/*.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}

- name: Cache
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: windows-${{ hashFiles('**/*.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}

# Windows runner can't run Linux containers. Refer https://github.com/actions/virtual-environments/issues/1143
- name: Set up Windows test env
Expand All @@ -87,16 +91,6 @@ jobs:
refreshenv
Get-Service elasticsearch-service-x64 | Start-Service

- name: Install Pytorch on windows
run: |
pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager -e .[test]
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.0+cpu.html

# We have to remove files if not test going to run from it
# As on windows we are going to disable quite a few tests these, hence these files will throw error refer https://github.com/pytest-dev/pytest/issues/812
# Removing test_ray, test_utils, test_preprocessor, test_knowledge_graph and test_connector
Expand Down