Add virtualenv dependency #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run benchmarks with airspeed velocity (asv) | |
# and publish the results to a dashboard on GH Pages. | |
name: Run benchmarks with airspeed velocity | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
ASV_CONFIG: benchmarks/asv.conf.json | |
jobs: | |
run-asv: | |
runs-on: ubuntu-latest | |
steps: | |
- 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 asv | |
pip install virtualenv | |
- name: Checkout project repository | |
uses: actions/checkout@v3 | |
- name: Create ASV machine config file | |
run: asv machine --config $ASV_CONFIG --yes -v | |
- name: Run benchmarks with asv | |
run: asv run --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 | |