-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (58 loc) · 1.87 KB
/
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
66
name: Benchmark
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
schedule:
- cron: "36 1 * * SUN" # M H d m w (Sundays at 01:36)
jobs:
asvfull:
name: Benchmark
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
- name: install
run: |
pip install -U wheel asv
git checkout main && git checkout -
asv machine --machine github-actions --yes
# IF PR ===========================
- name: Benchmark (PR)
if: github.event_name == 'pull_request'
run: |
export CONDA_EXE=$(which mamba)
asv continuous main HEAD --interleave-processes --show-stderr --split --factor 1.15
# IF not PR =======================
- name: Restore previous results
if: github.event_name != 'pull_request'
uses: actions/cache@v4
with:
path: .asv
key: asv-${{ runner.os }}
restore-keys: |
asv-
- name: Benchmark (Full)
if: github.event_name != 'pull_request'
run: |
export CONDA_EXE=$(which mamba)
asv run -j 4 --show-stderr --interleave-processes --skip-existing v0.1.0..HEAD
- name: Build pages
if: github.event_name != 'pull_request'
run: |
git config --global user.email "$GIT_AUTHOR_EMAIL"
git config --global user.name "$GIT_AUTHOR_NAME"
asv gh-pages --no-push
git push -f origin gh-pages:gh-pages
env:
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com