-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 1.87 KB
/
codspeed.yml
File metadata and controls
78 lines (64 loc) · 1.87 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
69
70
71
72
73
74
75
76
77
78
name: CodSpeed
on:
push:
branches:
- "main" # or "master"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
env:
CODSPEED_LOG: debug
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: extractions/setup-just@v2
- name: Cache opencv
uses: actions/cache@v3
with:
path: build-opencv
key: ${{ runner.os }}-build-opencv
# https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html
- name: Build opencv
run: |
sudo apt update && sudo apt install -y cmake g++ wget unzip
# Download and unpack sources
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
unzip opencv.zip
# Create build directory
mkdir -p build-opencv && cd build-opencv
# Configure
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo ../opencv-4.x
# Build and install
ninja -j$(nproc)
sudo ninja install
- name: Build the benchmark target(s)
run: |
just build-instrumentation
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: just run
benchmarks-walltime:
name: Run walltime benchmarks
runs-on: codspeed-macro
env:
CODSPEED_LOG: debug
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: extractions/setup-just@v2
- run: sudo apt-get update && sudo apt install -y libopencv-dev
- name: Build the benchmark target(s)
run: |
just build-walltime
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: just run