Skip to content

intial asv benchmarks #31

intial asv benchmarks

intial asv benchmarks #31

Workflow file for this run

name: ASV Benchmarks
on:
push:
branches: [ "dev"]
pull_request:
branches: [ "master", "dev" ]
permissions:
contents: write
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Run asv
uses: actions/checkout@v3
- run: |
git config --global user.email "[email protected]"
git config --global user.name "github action"
git config pull.rebase false
# merge in gh-pages to get old results before generating new
git fetch
git merge origin/gh-pages --strategy-option ours --allow-unrelated-histories
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
pip install .
- run: pip install asv
- run: asv machine --machine github_actions --yes # give this machine a name so that all results are linked to the same, hostname changes if not
- run: asv run --verbose --machine github_actions # make sure to use the machine name so that it does not use hostname
- run: asv publish --verbose
- name: Save benchmarks results
run: |
#git checkout --orphan benchmarks
#git fetch
# merge in gh-pages to get old results before generating new
#git merge origin/gh-pages --strategy-option ours --allow-unrelated-histories
mkdir -p docs/asv
cp -R .asv/html/* docs/asv/
git add -f .asv/results/*
git add -f docs/asv/*
git commit -am 'Benchmark results'
git checkout gh-pages
# merge asv branch into gh-pages, keep asv changes
git merge --strategy-option theirs dev --allow-unrelated-histories
#git pull -s recursive -X ours origin gh-pages
- name: Push results
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
force: true
branch: gh-pages