This directory shows how to use github-action-benchmark
with criterion package.
You can see a quick criterion tutorial here.
NB: As for now, this GitHub action only supports benchmarks made with criterion package outputted as a .csv file.
If the file with the benchmarks is also a "benchmark" according to your .cabal file, then
- name: Run benchmark
run: cabal bench --benchmark-options="--csv <FILENAME>"should do the trick. If it is an "executable" (as it is in the example), then run it with
- name: Run benchmark
run: cabal run -- --csv <FILENAME>"Store the benchmark results with step using the action.
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cabal'
output-file-path: <FILENAME>Please read 'How to use' section for common usage.