-
Notifications
You must be signed in to change notification settings - Fork 3
120 lines (95 loc) · 3.14 KB
/
ci.yml
File metadata and controls
120 lines (95 loc) · 3.14 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache build
uses: actions/cache@v3
with:
path: core/build-tests
key: ${{ runner.os }}-build-tests-${{ hashFiles('**/CMakeLists.txt', '**/examples/google_benchmark/**') }}
- name: Create build directory
run: mkdir -p core/build-tests
- name: Build tests
run: |
cd core/build-tests
cmake .. -DENABLE_TESTS=ON
make -j
- name: Run tests
run: |
cd core/build-tests
GTEST_OUTPUT=json:test-results/ ctest
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test_results
path: ${{runner.workspace}}/core/build-tests/test/test-results/**/*.json
instrumentation:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache build
uses: actions/cache@v3
with:
path: examples/google_benchmark/build-instrumentation
key: ${{ runner.os }}-build-instrumentation-${{ hashFiles('**/CMakeLists.txt', '**/examples/google_benchmark/**') }}
- name: Create build directory
run: mkdir -p examples/google_benchmark/build-instrumentation
- name: Build instrumentation benchmark example
run: |
cd examples/google_benchmark/build-instrumentation
cmake -DCODSPEED_MODE=instrumentation ..
make -j
- name: Run the benchmarks
uses: CodSpeedHQ/action@main
with:
run: examples/google_benchmark/build-instrumentation/benchmark_example
token: ${{ secrets.CODSPEED_TOKEN }}
walltime:
runs-on: codspeed-macro
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache build
uses: actions/cache@v3
with:
path: examples/google_benchmark/build-walltime
key: ${{ runner.os }}-build-walltime-${{ hashFiles('**/CMakeLists.txt', '**/examples/google_benchmark/**') }}
- name: Create build directory
run: mkdir -p examples/google_benchmark/build-walltime
- name: Build walltime benchmark example
run: |
cd examples/google_benchmark/build-walltime
cmake -DCODSPEED_MODE=walltime ..
make -j
- name: Run the benchmarks
uses: CodSpeedHQ/action@main
with:
run: examples/google_benchmark/build-walltime/benchmark_example
token: ${{ secrets.CODSPEED_TOKEN }}
build-no-codspeed:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache build
uses: actions/cache@v3
with:
path: examples/google_benchmark/build-no-codspeed
key: ${{ runner.os }}-build-no-codspeed-${{ hashFiles('**/CMakeLists.txt', '**/examples/google_benchmark/**') }}
- name: Create build directory
run: mkdir -p examples/google_benchmark/build-no-codspeed
- name: Build benchmark example without codspeed
run: |
cd examples/google_benchmark/build-no-codspeed
cmake ..
make -j