-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (57 loc) · 2.08 KB
/
Copy pathbenchmarks.yml
File metadata and controls
70 lines (57 loc) · 2.08 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
name: Benchmarking
on:
push:
branches: [ "main" ]
paths:
- 'include/**'
- 'benchmark/**'
- 'ci/benchmarking/**'
- '.github/workflows/benchmarks.yml'
pull_request:
branches: [ "main" ]
paths:
- 'include/**'
- 'benchmark/**'
- 'ci/benchmarking/**'
- '.github/workflows/benchmarks.yml'
jobs:
Measure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
run: sudo apt-get -qq install libbenchmark-dev libgmp3-dev libcrypto++-dev libcrypto++-doc libcrypto++-utils
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "ci=${{ github.workspace }}/ci/benchmarking" >> "$GITHUB_OUTPUT"
echo "benchmark=${{ github.workspace }}/benchmark" >> "$GITHUB_OUTPUT"
echo "build=${{ github.workspace }}/benchmark/cmake-build-release" >> "$GITHUB_OUTPUT"
- name: Load CMake configuration
run: >
cmake -B ${{ steps.strings.outputs.build }}
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_C_COMPILER=gcc
-DCMAKE_BUILD_TYPE=Release
-S ${{ steps.strings.outputs.benchmark }}
- name: Build executable
run: cmake --build ${{ steps.strings.outputs.build }} --target Benchmarking -j8
- name: Run benchmark analysis
working-directory: ${{ steps.strings.outputs.build }}
run: ./Benchmarking --benchmark_out=benchmarks.json --benchmark_out_format=json
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Write job summary
run: |
echo "## Benchmark Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
python ${{ steps.strings.outputs.ci }}/make_summary.py \
${{ steps.strings.outputs.build }}/benchmarks.json >> $GITHUB_STEP_SUMMARY
- name: Upload benchmark results
uses: actions/upload-artifact@v7
with:
name: benchmark-results
path: ${{ steps.strings.outputs.build }}/benchmarks.json