-
-
Notifications
You must be signed in to change notification settings - Fork 9
123 lines (115 loc) · 3.89 KB
/
Copy pathbenchmarks.yml
File metadata and controls
123 lines (115 loc) · 3.89 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: benchmarks
on: workflow_dispatch
permissions:
contents: write
pull-requests: write
jobs:
benchmark-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
- uses: pyo3/maturin-action@v1
with:
command: build
args: --release --interpreter python3.13
target: x64
manylinux: auto
container: off
- run: |
export _whl=$(ls target/wheels/rloop-*.whl)
pip install $_whl numpy uvloop
- name: benchmark
working-directory: ./benchmarks
run: |
python benchmarks.py raw raw_pipelined stream proto
- name: upload results
uses: actions/upload-artifact@v7
with:
name: results-base
path: benchmarks/results/*
benchmark-pyver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: |
3.10
3.11
3.12
3.13
- uses: pyo3/maturin-action@v1
with:
command: build
args: --release --interpreter python3.10 python3.11 python3.12 python3.13
target: x64
manylinux: auto
container: off
- name: setup venvs
run: |
python3.10 -m venv .venv310
python3.11 -m venv .venv311
python3.12 -m venv .venv312
python3.13 -m venv .venv313
.venv310/bin/pip install $(ls target/wheels/rloop-*-cp310-*.whl) numpy uvloop
.venv311/bin/pip install $(ls target/wheels/rloop-*-cp311-*.whl) numpy uvloop
.venv312/bin/pip install $(ls target/wheels/rloop-*-cp312-*.whl) numpy uvloop
.venv313/bin/pip install $(ls target/wheels/rloop-*-cp313-*.whl) numpy uvloop
- name: benchmark
working-directory: ./benchmarks
run: |
BENCHMARK_EXC_PREFIX=${{ github.workspace }}/.venv310/bin ${{ github.workspace }}/.venv310/bin/python benchmarks.py raw
mv results/data.json results/py310.json
BENCHMARK_EXC_PREFIX=${{ github.workspace }}/.venv311/bin ${{ github.workspace }}/.venv311/bin/python benchmarks.py raw
mv results/data.json results/py311.json
BENCHMARK_EXC_PREFIX=${{ github.workspace }}/.venv312/bin ${{ github.workspace }}/.venv312/bin/python benchmarks.py raw
mv results/data.json results/py312.json
BENCHMARK_EXC_PREFIX=${{ github.workspace }}/.venv313/bin ${{ github.workspace }}/.venv313/bin/python benchmarks.py raw
mv results/data.json results/py313.json
- name: upload results
uses: actions/upload-artifact@v7
with:
name: results-pyver
path: benchmarks/results/*
results:
runs-on: ubuntu-latest
needs: [benchmark-base, benchmark-pyver]
steps:
- uses: actions/checkout@v7
- uses: gi0baro/setup-noir@v1
- uses: actions/download-artifact@v8
with:
name: results-base
path: benchmarks/results
- run: |
mv benchmarks/results/data.json benchmarks/results/base.json
- uses: actions/download-artifact@v8
with:
name: results-pyver
path: benchmarks/results
- name: render
working-directory: ./benchmarks
run: |
noir -c data:results/base.json -v 'benv=GHA Linux x86_64' templates/main.md > README.md
noir \
-c data310:results/py310.json \
-c data311:results/py311.json \
-c data312:results/py312.json \
-c data313:results/py313.json \
-v pyvb=310 -v 'benv=GHA Linux x86_64' \
templates/pyver.md > pyver.md
- name: open PR
uses: peter-evans/create-pull-request@v8
with:
branch: benchmarks-update
branch-suffix: timestamp
title: Update benchmark results
body: SSIA
commit-message: |
Update benchmark results
add-paths: |
benchmarks/README.md
benchmarks/pyver.md