cpplabs
1name: CMake2
3on:4push:5branches: [ "main" ]6pull_request:7branches: [ "main" ]8
9env:10# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)11BUILD_TYPE: Release12
13jobs:14build:15# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.16# You can convert this to a matrix build if you need cross-platform coverage.17# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix18runs-on: ubuntu-latest19
20steps:21- uses: actions/checkout@v322
23- name: Configure CMake24# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.25# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type26run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}27
28- name: Build29# Build your program with the given configuration30run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}31
32- name: Test33working-directory: ${{github.workspace}}/build34# Execute tests defined by the CMake configuration.35# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail36run: ctest -C ${{env.BUILD_TYPE}}37
38