Skip to content

Commit 7e537b6

Browse files
committed
fix: build and run benchmarks in release mode
1 parent 6377dd1 commit 7e537b6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
tests:
1111
runs-on: ubuntu-latest
12-
steps:
12+
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v3
1515

@@ -29,7 +29,7 @@ jobs:
2929
make -j
3030
3131
- name: Run tests
32-
run: |
32+
run: |
3333
cd core/build-tests
3434
GTEST_OUTPUT=json:test-results/ ctest
3535
@@ -67,7 +67,7 @@ jobs:
6767
- name: Build benchmark example
6868
run: |
6969
cd examples/google_benchmark_cmake/build
70-
cmake -DCODSPEED_MODE=${{ matrix.codspeed-mode }} ..
70+
cmake -DCODSPEED_MODE=${{ matrix.codspeed-mode }} -DCMAKE_BUILD_TYPE=Release ..
7171
make -j
7272
7373
- name: Run the benchmarks
@@ -103,13 +103,13 @@ jobs:
103103

104104
- name: Build and run benchmarks
105105
run: |
106-
bazel build //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }}
107-
106+
bazel build //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }} --compilation_mode=opt
107+
108108
- name: Run the benchmarks
109109
uses: CodSpeedHQ/action@main
110110
if: matrix.codspeed-mode != 'off'
111111
with:
112-
run: bazel run //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }}
112+
run: bazel run //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }} --compilation_mode=opt
113113
token: ${{ secrets.CODSPEED_TOKEN }}
114114

115115
windows-cmake-build:
@@ -137,7 +137,7 @@ jobs:
137137
- name: Build benchmark example
138138
run: |
139139
cd examples\google_benchmark_cmake\build
140-
cmake -DCODSPEED_MODE=${{ matrix.codspeed-mode }} ..
140+
cmake -DCODSPEED_MODE=${{ matrix.codspeed-mode }} -DCMAKE_BUILD_TYPE=Release ..
141141
cmake --build . --config Release
142142
shell: pwsh
143143

0 commit comments

Comments
 (0)