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
Show file tree
Hide file tree
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
Almost disable cache
  • Loading branch information
ZanSara committed Jan 28, 2022
commit 62e28e899810acc82566e4025240fdd3fbb8dd44
20 changes: 9 additions & 11 deletions .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.7
# - run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
# - name: Cache
# id: cache-python-env
# uses: actions/cache@v2
# with:
# path: ${{ env.pythonLocation }}
# key: linux-${{ env.pythonLocation }}-${{ env.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}
- run: echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $env:GITHUB_ENV
- name: Cache
id: cache-python-env
uses: actions/cache@v2
with:
key: linux-${{ env.date }}
- name: Install dependencies
# if: steps.cache-python-env.outputs.cache-hit != 'true'
if: steps.cache-python-env.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager -e .[test]
Expand Down Expand Up @@ -65,12 +64,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
- run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- run: echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $env:GITHUB_ENV
- name: Cache
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: linux-${{ env.pythonLocation }}-${{ env.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}
key: linux-${{ env.date }}
- name: Run Elasticsearch
run: docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms128m -Xmx128m" elasticsearch:7.9.2

Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.7
- run: echo "date=$(date +'%Y-%m-%d')" >> $env:GITHUB_ENV
# - name: Cache
# id: cache-python-env
# uses: actions/cache@v2
# with:
# path: ${{ env.pythonLocation }}
# key: windows-${{ env.pythonLocation }}-${{ env.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}
- run: echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $env:GITHUB_ENV
- name: Cache
id: cache-python-env
uses: actions/cache@v2
with:
key: windows-${{ env.date }}
- 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'
if: steps.cache-python-env.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager -e .[test]
Expand Down Expand Up @@ -71,12 +70,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
- run: echo "date=$(date +'%Y-%m-%d')" >> $env:GITHUB_ENV
- run: echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $env:GITHUB_ENV
- name: Cache
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: windows-${{ env.pythonLocation }}-${{ env.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}
key: windows-${{ env.date }}

# Windows runner can't run Linux containers. Refer https://github.com/actions/virtual-environments/issues/1143
- name: Set up Windows test env
Expand Down