chore: added dependabot
[KDIS.git] / .github / workflows / cmake.yml
blob6902a606ed247721c5b1c1657fe7994e14b752e7
1 name: Build and Test\r
2 \r
3 on:\r
4   push:\r
5     branches: [ master ]\r
6   pull_request:\r
7     branches: [ master ]\r
8 \r
9 env:\r
10   # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)\r
11   BUILD_TYPE: Release\r
13 jobs:\r
14   build:\r
15     # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.\r
16     # You can convert this to a matrix build if you need cross-platform coverage.\r
17     # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix\r
18     runs-on: ${{ matrix.os }}\r
20     strategy:\r
21       matrix:\r
22         os: [ubuntu-latest, windows-latest]\r
24     steps:\r
25     - uses: actions/checkout@v2\r
27     - name: Configure CMake\r
28       # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.\r
29       # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type\r
30       run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON\r
32     - name: Build\r
33       # Build your program with the given configuration\r
34       run: cmake --build ./build --config ${{env.BUILD_TYPE}}\r
35          \r
36     - name: Test\r
37       working-directory: ./build\r
38       # Execute tests defined by the CMake configuration.  \r
39       # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail\r
40       run: |\r
41         cd Tests\r
42         ctest -C ${{env.BUILD_TYPE}} -V\r