Skip to content

Commit c971bf3

Browse files
CopilotMMathisLabC-Achard
authored
Fix pip cache ordering: move checkout first, use setup-python built-in cache (#71)
* Initial plan * Fix checkout order and use setup-python built-in pip cache Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com> Agent-Logs-Url: https://github.com/DeepLabCut/DeepLabCut-live-GUI/sessions/21ab9ebe-25bd-4963-b3c9-01ecbf60de45 * Upgrade actions/checkout and setup-python to v6 Update .github/workflows/python-package.yml to use actions/checkout@v6 and actions/setup-python@v6. Keeps the workflow up-to-date with no functional changes to Python version or caching. * Cache only pyproject.toml in CI Update GitHub Actions workflow to use pyproject.toml as the sole cache-dependency-path for pip, removing requirements.txt, setup.cfg, and setup.py to avoid unnecessary cache invalidation. Add a clarifying comment and clean up trailing whitespace in the workflow file. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com> Co-authored-by: Cyril Achard <cyril.achard@epfl.ch>
1 parent 309ce83 commit c971bf3

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,18 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v6
25+
2326
- name: Setup Python
2427
id: setup-python
25-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v6
2629
with:
2730
python-version: '3.x'
28-
29-
- name: Cache dependencies
30-
id: pip-cache
31-
uses: actions/cache@v4
32-
with:
33-
path: ~/.cache/pip
34-
key: ${{ runner.os }}-pip-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml', 'requirements.txt', 'setup.cfg', 'setup.py') }}
35-
restore-keys: |
36-
${{ runner.os }}-pip-${{ steps.setup-python.outputs.python-version }}-
37-
${{ runner.os }}-pip-
31+
cache: 'pip'
32+
# we only use pyproject.toml for dependencies
33+
cache-dependency-path: |
34+
pyproject.toml
3835
3936
- name: Install Qt/OpenGL runtime deps (Ubuntu)
4037
run: |
@@ -45,7 +42,7 @@ jobs:
4542
libopengl0 \
4643
libxkbcommon-x11-0 \
4744
libxcb-cursor0
48-
45+
4946
- name: Install dependencies
5047
run: |
5148
pip install --upgrade pip
@@ -54,9 +51,6 @@ jobs:
5451
pip install build
5552
pip install twine
5653
57-
- name: Checkout code
58-
uses: actions/checkout@v4
59-
6054
- name: Build and publish to PyPI
6155
if: ${{ github.event_name == 'push' }}
6256
env:

0 commit comments

Comments
 (0)