forked from xtensor-stack/xsimd-algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (93 loc) · 3.62 KB
/
Copy pathbenchmark-pr-comment.yml
File metadata and controls
105 lines (93 loc) · 3.62 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
name: Benchmark-PR (comment)
on:
workflow_run:
workflows: ["Benchmark-PR (build)"]
types: [completed]
permissions:
contents: read
actions: read
pull-requests: write
jobs:
comment-linux:
name: 'linux ${{ matrix.sys.compiler }}-${{ matrix.sys.version }} ${{ matrix.sys.flags }}'
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sys:
- { compiler: 'gcc', version: '12', flags: 'force_no_instr_set' }
- { compiler: 'gcc', version: '14', flags: 'avx' }
- { compiler: 'gcc', version: '13', flags: 'avx512' }
- { compiler: 'gcc', version: '13', flags: 'avx512pf' }
- { compiler: 'gcc', version: '13', flags: 'avx512vbmi' }
- { compiler: 'gcc', version: '14', flags: 'avx512vbmi2' }
- { compiler: 'gcc', version: '13', flags: 'avx512vnni' }
- { compiler: 'clang', version: '17', flags: 'sse3' }
- { compiler: 'clang', version: '17', flags: 'avx' }
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- name: Fetch gh-pages for baseline comparison
run: git fetch origin gh-pages:gh-pages
- name: Download benchmark artifact
uses: actions/download-artifact@v4
with:
name: bench-linux-${{ matrix.sys.compiler }}-${{ matrix.sys.version }}-${{ matrix.sys.flags }}
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compare & comment
uses: benchmark-action/github-action-benchmark@v1
env:
GITHUB_SHA: ${{ github.event.workflow_run.head_sha }}
with:
tool: googlecpp
output-file-path: benchmark-result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
gh-pages-branch: gh-pages
benchmark-data-dir-path: dev/bench/linux-${{ matrix.sys.compiler }}-${{ matrix.sys.version }}-${{ matrix.sys.flags }}
comment-on-alert: true
alert-threshold: '150%'
fail-on-alert: false
comment-always: true
comment-macos:
name: 'macos-${{ matrix.os }}'
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [14, 15]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- name: Fetch gh-pages for baseline comparison
run: git fetch origin gh-pages:gh-pages
- name: Download benchmark artifact
uses: actions/download-artifact@v4
with:
name: bench-macos-${{ matrix.os }}
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compare & comment
uses: benchmark-action/github-action-benchmark@v1
env:
GITHUB_SHA: ${{ github.event.workflow_run.head_sha }}
with:
tool: googlecpp
output-file-path: benchmark-result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
gh-pages-branch: gh-pages
benchmark-data-dir-path: dev/bench/macos-${{ matrix.os }}
comment-on-alert: true
alert-threshold: '150%'
fail-on-alert: false
comment-always: true