Skip to content

Commit

Permalink
[ci][fix] Use correct presets to launch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZotov committed Oct 27, 2024
1 parent 0a17210 commit 7ba6f11
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
matrix:
os: [macos-14, ubuntu-22.04, ubuntu-24.04]
build_type:
- { preset: "release", name: "Release" }
- { preset: "debug", name: "Debug" }
- { name: "Release", configure_preset: "release-with-tests", build_preset: "release" }
- { name: "Debug", configure_preset: "debug-with-tests", build_preset: "debug" }
config:
- { cc: "gcc", cxx: "g++" }

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: cmake --preset ${{ matrix.build_type.preset }} && cmake --build --preset ${{ matrix.build_type.preset }}
run: cmake --preset ${{ matrix.build_type.configure_preset }} && cmake --build --preset ${{ matrix.build_type.build_preset }}

- name: Run tests
id: run_tests
Expand Down
10 changes: 10 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "./cmake/conan_provider.cmake"
}
},
{
"name": "debug-with-tests",
"displayName": "Debug config with tests",
"description": "Debug config with tests",
"inherits": "debug",
"cacheVariables": {
"SC_BUILD_TESTS": true,
"SC_BUILD_BENCH": true
}
},
{
"name": "release",
"displayName": "Release config",
Expand Down

0 comments on commit 7ba6f11

Please sign in to comment.