-
-
Notifications
You must be signed in to change notification settings - Fork 574
90 lines (75 loc) · 2.46 KB
/
benchmarks.yml
File metadata and controls
90 lines (75 loc) · 2.46 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
name: Benchmarks
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
jobs:
benchmark-pr:
name: Run benchmarks
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.3"
- uses: ramsey/composer-install@v3
- name: Run PHPBench
run: |
php -d zend.assertions=-1 vendor/bin/phpbench run \
--progress=none \
--dump-file=benchmark.xml
- name: Convert results
run: php benchmarks/convert-results.php benchmark.xml > benchmark-results.json
- uses: benchmark-action/github-action-benchmark@v1
with:
tool: customSmallerIsBetter
output-file-path: benchmark-results.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
gh-pages-branch: benchmark-results
benchmark-data-dir-path: dev/bench
alert-threshold: '150%'
# TODO: switch to true once baseline variance is understood
fail-on-alert: false
comment-on-alert: true
comment-always: false
benchmark-history:
name: Track benchmark history
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.3"
- uses: ramsey/composer-install@v3
- name: Run PHPBench
run: |
php -d zend.assertions=-1 vendor/bin/phpbench run \
--progress=none \
--dump-file=benchmark.xml
- name: Convert results
run: php benchmarks/convert-results.php benchmark.xml > benchmark-results.json
- uses: benchmark-action/github-action-benchmark@v1
with:
tool: customSmallerIsBetter
output-file-path: benchmark-results.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: ${{ github.ref == 'refs/heads/master' }}
gh-pages-branch: benchmark-results
benchmark-data-dir-path: dev/bench
alert-threshold: '150%'
# TODO: switch to true once baseline variance is understood
fail-on-alert: false
comment-on-alert: false
comment-always: false