Skip to content

Commit 05eacc1

Browse files
committed
benchmark with codspeed
1 parent 999088d commit 05eacc1

File tree

12 files changed

+352
-216
lines changed

12 files changed

+352
-216
lines changed

.github/workflows/benchmark.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Benchmark
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags-ignore: ['*']
7+
pull_request:
8+
branches: [main]
9+
# `workflow_dispatch` allows CodSpeed to trigger back-test
10+
# performance analysis in order to generate initial data.
11+
workflow_dispatch:
12+
13+
jobs:
14+
benchmark:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
# using the generated compilation database,
19+
# we will use cpp-linter to scan libgit2 src/libgit2/**.c files.
20+
- name: Checkout libgit2
21+
uses: actions/checkout@v4
22+
with:
23+
repository: libgit2/libgit2
24+
ref: v1.8.1
25+
path: cpp-linter/benches/libgit2
26+
- name: Generate compilation database
27+
working-directory: cpp-linter/benches/libgit2
28+
run: |
29+
mkdir build && cd build
30+
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
31+
- name: Install cargo-binstall
32+
uses: cargo-bins/cargo-binstall@main
33+
- name: Install hyperfine
34+
run: cargo binstall -y cargo-codspeed
35+
- name: Build the benchmark target(s)
36+
run: cargo codspeed build
37+
- name: Run benchmarks
38+
uses: CodSpeedHQ/action@v3
39+
with:
40+
run: cargo codspeed run
41+
token: ${{ secrets.CODSPEED_TOKEN }}

.github/workflows/perf-test.yml

-146
This file was deleted.

.github/workflows/perf_annotate.py

-68
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -346,3 +346,4 @@ docs/site
346346
cpp-linter-py/docs/cli_args.rst
347347
lcov.info
348348
coverage.json
349+
cpp-linter/benches/libgit2/

0 commit comments

Comments
 (0)