This action builds cmake projects. It lets to do:
- Update submodules
- Add cmake args
- Build project like release or debug
- Build and run unit tests
- Create package
name: C/C++ CI
on: [push]
jobs:
ubuntu-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Build project
uses: nicledomaS/cmake_build_action@v1.3
with:
submodule_update: ON
run_tests: ON
unit_test_build: -Dtest=ON
Turn on submodule update.
Default: OFF
List of additional cmake args (use like splitter ;
).
Examle: -D<ARG1>=value;-D<ARG1>=value
Turn on unit tests.
Default: OFF
Cmake arg for build unit tests (if have).
Example: -DTEST=ON
Turn on create package.
Default: OFF
Set name for package generator.
Default: TGZ
Configure upload artifacts. Files will save to folder build
after build project.
Example:
- uses: actions/upload-artifact@v2
with:
path: build/*.tar.gz
name: artifact_${{ matrix.os }}_${{ matrix.configs }}.tar.gz
For multi-configuration tools, choose configuration Release or Debug.
Default: Release