Debian Codegraph @

.github/workflows/cmake.yml

raw
1 name: CMake
2
3 on:
4 push:
5 branches: [ master ]
6 pull_request:
7 branches: [ master ]
8
9 env:
10 # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11 BUILD_TYPE: Release
12
13 jobs:
14 build:
15 strategy:
16 matrix:
17 os: [ubuntu-latest, macos-latest]
18
19 runs-on: ${{ matrix.os }}
20
21 steps:
22 - uses: actions/checkout@v6
23
24 - name: Configure CMake
25 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
26 # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
27 run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
28
29 - name: Build
30 # Build your program with the given configuration
31 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
32
33 - name: Test
34 working-directory: ${{github.workspace}}/build
35 # Execute tests defined by the CMake configuration.
36 # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
37 run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure