Skip to content

Commit bb04ff8

Browse files
committed
feat: benchmark workflow
1 parent 1b9dd38 commit bb04ff8

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

.github/workflows/benchmarks.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
10+
env:
11+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
12+
BUILD_TYPE: Release
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-24.04-arm
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Configure CMake
22+
# Choose CMakeLists.text from a specific source directory with -S.
23+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
24+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
25+
run: cmake -S submissions/submission_25_05_01 -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
26+
27+
- name: Build
28+
# Build your program with the given configuration
29+
run: cmake --build build --config ${{env.BUILD_TYPE}}
30+
31+
- name: Benchmark
32+
working-directory: build
33+
run: ./benchmarks --benchmark_counters_tabular=true --benchmark_repetitions=10
34+
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
# Choose CMakeLists.text from a specific source directory with -S.
2323
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
2424
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
25-
run: cmake -S ${{github.workspace}}/submissions/submisson_25_05_01 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
25+
run: cmake -S submissions/submisson_25_05_01 -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
2626

2727
- name: Build
2828
# Build your program with the given configuration
29-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
29+
run: cmake --build build --config ${{env.BUILD_TYPE}}
3030

3131
- name: Test
32-
working-directory: ${{github.workspace}}/build
32+
working-directory: build
3333
# Execute tests defined by the CMake configuration.
3434
run: ctest -C ${{env.BUILD_TYPE}}
3535

0 commit comments

Comments
 (0)