This basic action simplifies integration of CMake into a workflow.
- uses: Jaybro/action-cmake@v1
with:
# Path to the root directory of the CMake project to build.
# Default: ${{ github.workspace }}. This default is also used by @actions/checkout@v2.
cmake-source-dir: ''
# Path to the directory which CMake will use as the root of the build directory.
# Default: ${{ github.workspace }}/build
cmake-build-dir: ''
# Path to the directory which CMake will use as the root of the install directory.
# Overrides the installation prefix, CMAKE_INSTALL_PREFIX.
# Default: ${{ github.workspace }}/install
cmake-install-dir: ''
# CMake build type. E.g.: Release.
# Default: Release
cmake-build-type: ''
# CMake configure flags that can be set as -D<key>=<value>, etc.
# Default: ''
cmake-configure-flags: ''
# Installs the build when set to true.
# Default: false
cmake-install: false
# Tests the build using CTest when set to true.
# Default: false
cmake-ctest: false
The following example shows how to build and test a repository that was cloned using actions/checkout@v2:
- name: Checkout
uses: actions/checkout@v2
- name: CMake build and test
uses: Jaybro/action-cmake@v1
with:
cmake-ctest: true