Skip to content

Commit

Permalink
test cache pip
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidham3 committed Dec 18, 2024
1 parent 203abb9 commit 4390626
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install build-essential and make
run: |
sudo apt-get update
sudo apt-get install -y build-essential ca-certificates curl libffi-dev libgdbm-dev libncurses5-dev libnss3-dev libreadline-dev libssl-dev make time wget zlib1g-dev
- name: Install PyTorch
run: |
python -m pip install --upgrade pip
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu --no-cache-dir
- name: Install dependencies from pyproject.toml
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install PyTorch and dependencies from pyproject.toml
run: |
python -m pip install --upgrade pip
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install .[dev,docs]
- name: Cache datasets
id: cache-datasets
uses: actions/cache@v3
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/python-package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install build-essential and make
run: |
sudo apt-get update
sudo apt-get install -y build-essential ca-certificates curl libffi-dev libgdbm-dev libncurses5-dev libnss3-dev libreadline-dev libssl-dev make time wget zlib1g-dev
- name: Install PyTorch
run: |
python -m pip install --upgrade pip
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu --no-cache-dir
- name: Install dependencies from pyproject.toml
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install PyTorch and dependencies from pyproject.toml
run: |
python -m pip install --upgrade pip
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install .[dev,docs]
- name: Cache datasets
Expand All @@ -46,7 +44,7 @@ jobs:
with:
path: ~/.cache/trajdl
key: trajdl-cache-datasets

- name: Test with pytest
run: |
autoflake -j 0 --remove-all-unused-imports --in-place --recursive --ignore-init-module-imports .
Expand Down

0 comments on commit 4390626

Please sign in to comment.