Skip to content

Commit

Permalink
Remove cached Python env
Browse files Browse the repository at this point in the history
  • Loading branch information
camposandro committed Sep 30, 2024
1 parent 682e4f9 commit a49b193
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/asv-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,25 @@ env:
ARTIFACTS_DIR: ${{ github.workspace }}/artifacts

jobs:
setup-python:
runs-on: ubuntu-latest
steps:
- name: Cache Python ${{ env.PYTHON_VERSION }}
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: python-${{ env.PYTHON_VERSION }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
asv-pr:
runs-on: ubuntu-latest
needs: setup-python
defaults:
run:
working-directory: ${{ env.WORKING_DIR }}
steps:
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Checkout PR branch of the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Display Workflow Run Information
run: |
echo "Workflow Run ID: ${{ github.run_id }}"
- name: Cache Python ${{ env.PYTHON_VERSION }}
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: python-${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
sudo apt-get update
python -m pip install --upgrade pip
pip install asv==0.6.1 virtualenv tabulate lf-asv-formatter
run: pip install asv==0.6.1 virtualenv tabulate lf-asv-formatter
- name: Make artifacts directory
run: mkdir -p ${{ env.ARTIFACTS_DIR }}
- name: Save pull request number
Expand All @@ -74,7 +57,8 @@ jobs:
git fetch upstream
asv continuous upstream/main HEAD --verbose || true
asv compare upstream/main HEAD --sort ratio --verbose | tee output
python -m lf_asv_formatter --asv_version "$(echo asv --version)"
print ">> asv version is $(asv --version)"
python -m lf_asv_formatter --asv_version "$(asv --version)"
printf "\n\nClick [here]($STEP_URL) to view all benchmarks." >> output
mv output ${{ env.ARTIFACTS_DIR }}
env:
Expand Down

0 comments on commit a49b193

Please sign in to comment.