|
| 1 | +name: Benchmark-PR (comment) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_run: |
| 5 | + workflows: ["Benchmark-PR (build)"] |
| 6 | + types: [completed] |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + actions: read |
| 11 | + pull-requests: write |
| 12 | + |
| 13 | +jobs: |
| 14 | + comment-linux: |
| 15 | + if: > |
| 16 | + github.event.workflow_run.event == 'pull_request' && |
| 17 | + github.event.workflow_run.conclusion == 'success' |
| 18 | + name: 'linux ${{ matrix.sys.compiler }}-${{ matrix.sys.version }} ${{ matrix.sys.flags }}' |
| 19 | + runs-on: ubuntu-latest |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + sys: |
| 24 | + - { compiler: 'gcc', version: '12', flags: 'force_no_instr_set' } |
| 25 | + - { compiler: 'gcc', version: '14', flags: 'avx' } |
| 26 | + - { compiler: 'gcc', version: '13', flags: 'avx512' } |
| 27 | + - { compiler: 'gcc', version: '13', flags: 'avx512pf' } |
| 28 | + - { compiler: 'gcc', version: '13', flags: 'avx512vbmi' } |
| 29 | + - { compiler: 'gcc', version: '14', flags: 'avx512vbmi2' } |
| 30 | + - { compiler: 'gcc', version: '13', flags: 'avx512vnni' } |
| 31 | + - { compiler: 'clang', version: '17', flags: 'sse3' } |
| 32 | + - { compiler: 'clang', version: '17', flags: 'avx' } |
| 33 | + |
| 34 | + steps: |
| 35 | + - name: Download benchmark artifact |
| 36 | + uses: actions/download-artifact@v4 |
| 37 | + with: |
| 38 | + name: bench-linux-${{ matrix.sys.compiler }}-${{ matrix.sys.version }}-${{ matrix.sys.flags }}-${{ github.event.workflow_run.head_sha }} |
| 39 | + run-id: ${{ github.event.workflow_run.id }} |
| 40 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + |
| 42 | + - name: Compare benchmark results |
| 43 | + uses: benchmark-action/github-action-benchmark@v1 |
| 44 | + with: |
| 45 | + tool: googlecpp |
| 46 | + output-file-path: benchmark-result.json |
| 47 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + auto-push: false |
| 49 | + gh-pages-branch: gh-pages |
| 50 | + benchmark-data-dir-path: dev/bench/linux-${{ matrix.sys.compiler }}-${{ matrix.sys.version }}-${{ matrix.sys.flags }} |
| 51 | + comment-on-alert: true |
| 52 | + alert-threshold: '150%' |
| 53 | + fail-on-alert: false |
| 54 | + comment-always: true |
| 55 | + |
| 56 | + comment-macos: |
| 57 | + if: > |
| 58 | + github.event.workflow_run.event == 'pull_request' && |
| 59 | + github.event.workflow_run.conclusion == 'success' |
| 60 | + name: 'macos-${{ matrix.os }}' |
| 61 | + runs-on: ubuntu-latest |
| 62 | + strategy: |
| 63 | + fail-fast: false |
| 64 | + matrix: |
| 65 | + os: [14, 15] |
| 66 | + |
| 67 | + steps: |
| 68 | + - name: Download benchmark artifact |
| 69 | + uses: actions/download-artifact@v4 |
| 70 | + with: |
| 71 | + name: bench-macos-${{ matrix.os }}-${{ github.event.workflow_run.head_sha }} |
| 72 | + run-id: ${{ github.event.workflow_run.id }} |
| 73 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + |
| 75 | + - name: Compare benchmark results |
| 76 | + uses: benchmark-action/github-action-benchmark@v1 |
| 77 | + with: |
| 78 | + tool: googlecpp |
| 79 | + output-file-path: benchmark-result.json |
| 80 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 81 | + auto-push: false |
| 82 | + gh-pages-branch: gh-pages |
| 83 | + benchmark-data-dir-path: dev/bench/macos-${{ matrix.os }} |
| 84 | + comment-on-alert: true |
| 85 | + alert-threshold: '150%' |
| 86 | + fail-on-alert: false |
| 87 | + comment-always: true |
0 commit comments