@@ -3,12 +3,11 @@ name: Benchmark
33on :
44 push :
55 branches : [main]
6- pull_request : {} # Allow CodSpeed to trigger backtest performance analysis
6+ pull_request : {}
77 workflow_dispatch : {}
88
99permissions :
1010 contents : read
11- id-token : write
1211
1312concurrency :
1413 group : ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
@@ -20,13 +19,13 @@ defaults:
2019
2120jobs :
2221 benchmarks :
23- name : Linux - ${{ matrix.sys.name }} - ${{ matrix.sys.mode }}
22+ name : Linux - ${{ matrix.sys.name }}
2423 runs-on : namespace-profile-benchmark;container.privileged=true;container.host-pid-namespace=true
2524 strategy :
2625 matrix :
2726 sys :
28- - { name: "sse4.2", flags: "-march=x86-64-v2", mode: "walltime" }
29- - { name: "avx2", flags: "-march=x86-64-v3", mode: "walltime" }
27+ - { name: "sse4.2", flags: "-march=x86-64-v2" }
28+ - { name: "avx2", flags: "-march=x86-64-v3" }
3029 steps :
3130 - name : Checkout code
3231 uses : actions/checkout@v6
@@ -37,21 +36,25 @@ jobs:
3736 create-args : >-
3837 cmake
3938 ninja
39+ benchmark
4040 xsimd=14.3.0
4141 init-shell : bash
4242 cache-downloads : true
4343 - name : Build benchmarks
4444 run : |
45- # Codspeed deps need C11 (not 23)
4645 cmake -G Ninja -B build/ \
4746 -D CMAKE_BUILD_TYPE="RelWithDebInfo" \
4847 -D CMAKE_CXX_FLAGS="${{ matrix.sys.flags }}" \
49- -D BUILD_BENCHMARK=ON \
50- -D CMAKE_C_STANDARD=11 \
51- -D CODSPEED_MODE="${{ matrix.sys.mode }}"
48+ -D BUILD_BENCHMARK=ON
5249 cmake --build build --target benchmark_xsimd_algorithm --parallel 8
5350 - name : Run benchmarks
54- uses : CodSpeedHQ/action@v5
51+ run : |
52+ ./build/benchmark/benchmark_xsimd_algorithm \
53+ --benchmark_repetitions=3 \
54+ --benchmark_out=benchmark-${{ matrix.sys.name }}.json \
55+ --benchmark_out_format=json
56+ - name : Upload results
57+ uses : actions/upload-artifact@v4
5558 with :
56- mode : ${{ matrix.sys.mode }}
57- run : ./build/ benchmark/benchmark_xsimd_algorithm --benchmark_repetitions=3
59+ name : benchmark- ${{ github.event.pull_request.head.sha || github.sha }}-${{ matrix.sys.name }}
60+ path : benchmark-${{ matrix.sys.name }}.json
0 commit comments