Skip to content

Commit

Permalink
disable pip cache due to slow upload and download (#28)
Browse files Browse the repository at this point in the history
pip install: 37s
pip cache upload: 11m 37s
pip cache download: 3m 53s
  • Loading branch information
xyb committed Oct 15, 2021
1 parent f72539f commit e2ba423
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Pip
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ matrix.pip-path }}
key: ${{ matrix.os }}-python${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
# - name: Cache Pip
# id: pip-cache
# uses: actions/cache@v2
# with:
# path: ${{ matrix.pip-path }}
# key: ${{ matrix.os }}-python${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}

- name: Install Package Dependencies
if: steps.pip-cache.outputs.cache-hit != 'true'
# if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
Expand Down Expand Up @@ -154,15 +154,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Pip
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ matrix.pip-path }}
key: ${{ matrix.os }}-python${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
# - name: Cache Pip
# id: pip-cache
# uses: actions/cache@v2
# with:
# path: ${{ matrix.pip-path }}
# key: ${{ matrix.os }}-python${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}

- name: Install Package Dependencies
if: steps.pip-cache.outputs.cache-hit != 'true'
#if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: release wheel
on:
workflow_dispatch:
branches: [main]

jobs:
build-juicefs-libjfs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-latest]

steps:
- name: Checkout Github Repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -56,7 +56,6 @@ jobs:
run: |
make build_libjfs_dll
- name: Upload linux jfs binary
if: matrix.os == 'ubuntu-18.04'
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -115,14 +114,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache Pip
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ matrix.pip-path }}
key: ${{ matrix.os }}-python${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
# - name: Cache Pip
# id: pip-cache
# uses: actions/cache@v2
# with:
# path: ${{ matrix.pip-path }}
# key: ${{ matrix.os }}-python${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
- name: Install Package Dependencies
if: steps.pip-cache.outputs.cache-hit != 'true'
# if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
Expand Down Expand Up @@ -159,14 +158,14 @@ jobs:
path: |
./dist/*
retention-days: 1

publish_release:
needs: build_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]

steps:
- name: Checkout Github Repository
uses: actions/checkout@v2
Expand All @@ -193,4 +192,4 @@ jobs:
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.JUICEFS_PYPI_TOKEN }}
password: ${{ secrets.JUICEFS_PYPI_TOKEN }}

0 comments on commit e2ba423

Please sign in to comment.