Skip to content

Commit

Permalink
Update asv workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
camposandro committed Jul 28, 2023
1 parent bdb0c55 commit 75f3849
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/asv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,39 @@ name: Run benchmarks with airspeed velocity
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
ASV_CONFIG: benchmarks/asv.conf.json

jobs:
install-python:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']

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

run-asv:
needs: install-python
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install dependencies
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install asv
run: |
sudo apt-get update
python -m pip install --upgrade pip
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install asv
- name: Checkout project repository
uses: actions/checkout@v3
- name: Create ASV machine config file
run: asv machine --yes -v
- name: Run benchmarks with asv
run: asv run --config $ASV_CONFIG -v
- name: Publish results to GH-pages
run: asv gh-pages --config $ASV_CONFIG -v
- name: Run asv for PR and publish comment with comparison
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "Running for Pull Request"
- name: Run asv for main and publish results
if: ${{ github.event_name == 'push' }}
run: |
asv run --config $ASV_CONFIG -v
asv gh-pages --config $ASV_CONFIG -v

0 comments on commit 75f3849

Please sign in to comment.