Skip to content

Commit

Permalink
[CMAKE][CI] BUILD_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyiwu committed Jul 29, 2024
1 parent afb700c commit 54279d2
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BUILD_TYPE: Debug

jobs:
build:
Expand All @@ -22,6 +22,8 @@ jobs:
macos-12,
macos-13,
macos-14,
#windows-2019,
#windows-2022,
]
cpp_version: [11, 14]

Expand All @@ -31,17 +33,12 @@ jobs:
submodules: recursive

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}}

run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

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

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --verbose

0 comments on commit 54279d2

Please sign in to comment.