Fixed moist of the Commit and Status command edge cases #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow is for a CMake project running on multiple platforms. | |
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| # Customize the CMake build type here (e.g., Debug, Release, RelWithDebInfo) | |
| BUILD_TYPE: Release | |
| jobs: | |
| build: | |
| # The CMake configure and build commands are platform-agnostic and should work equally | |
| # well on Windows, macOS, and Ubuntu. | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. | |
| fail-fast: false | |
| # Set up a matrix to run on different platforms | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| c_compiler: gcc | |
| cpp_compiler: g++ | |
| - os: windows-latest | |
| c_compiler: cl | |
| cpp_compiler: cl | |
| - os: macos-latest | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure CMake | |
| # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required | |
| # for single-configuration generators. | |
| run: > | |
| cmake -B ${{ github.workspace }}/build | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| # Build your program with the given configuration | |
| 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 -C ${{ env.BUILD_TYPE }} |