Skip to content

Update asv-benchmark.yml #25

Update asv-benchmark.yml

Update asv-benchmark.yml #25

Workflow file for this run

name: ASV Benchmark
on:
push:
branches:
- main # Run benchmarks on every commit to the main branch
workflow_dispatch:
jobs:
benchmark:
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9' # or the version you want to test
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install asv # Install ASV
pip install -e ".[test]" # Your project dependencies, if needed
- name: Fetch gh-pages branch
run: |
git fetch origin performance
git checkout performance || git checkout performance
- name: Run ASV benchmarks
run: |
asv machine --yes
asv run
- name: Set git email and name
run: |
git config --global user.email "[email protected]"
git config --global user.name "ankatiyar"
- name: Publish benchmark results
run: |
git add .asv
git commit -m "Update benchmark results"
git push origin performance
- name: Checkout publish
run: asv publish
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: .asv/html
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2