-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (56 loc) · 2.08 KB
/
asv_benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: ASV Benchmarks
on:
push:
branches: [ "dev"]
pull_request:
branches: [ "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