-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.2 KB
/
benchmark.yml
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
name: Benchmark
on:
push:
branches: [main]
tags-ignore: ['*']
pull_request:
branches: [main]
# `workflow_dispatch` allows CodSpeed to trigger back-test
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# using the generated compilation database,
# we will use cpp-linter to scan libgit2 src/libgit2/**.c files.
- name: Checkout libgit2
uses: actions/checkout@v4
with:
repository: libgit2/libgit2
ref: v1.8.1
path: cpp-linter/benches/libgit2
- name: Generate compilation database
working-directory: libgit2
run: |
mkdir build && cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install hyperfine
run: cargo binstall -y cargo-codspeed
- name: Build the benchmark target(s)
run: cargo codspeed build
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}