-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
92 lines (92 loc) · 2.66 KB
/
check.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Check
on:
push:
pull_request:
schedule:
- cron: '36 1 * * SUN' # M H d m w (Sundays at 01:36)
jobs:
check:
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
name: ${{ matrix.TOXENV }}
strategy:
matrix:
TOXENV:
- check
- perf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install -U tox
- run: tox
env:
TOXENV: ${{ matrix.TOXENV }}
asvfull:
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || github.event_name == 'schedule'
name: Benchmark (Full)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN || github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install
run: |
pip install -U wheel packaging
pip install -U virtualenv asv
git checkout master && git checkout -
asv machine --machine github-actions --yes
- name: Restore previous results
uses: actions/cache@v4
with:
path: .asv
key: asv-${{ runner.os }}
restore-keys: |
asv-
- name: Benchmark
run: |
asv run -j 8 --interleave-processes --skip-existing v3.2.0..HEAD
- name: Build pages
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
testasv:
if: github.ref != 'refs/heads/master' && ! startsWith(github.ref, 'refs/tags')
name: Benchmark (Branch)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install
run: |
pip install -U wheel packaging
pip install -U virtualenv asv
git checkout master && git checkout -
asv machine --machine github-actions --yes
- name: Restore previous results
uses: actions/cache@v4
with:
path: .asv
key: asv-${{ runner.os }}
restore-keys: |
asv-
- name: Benchmark
run: |
asv continuous --interleave-processes --only-changed -f 1.25 master HEAD
CHANGES=$(asv compare --only-changed -f 1.25 master HEAD)
echo "$CHANGES" >> "$GITHUB_STEP_SUMMARY"
test -z "$CHANGES" || exit 1