Cross platform command line driver + PropLib template adherence #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This action compiles the library and driver and runs all unit tests using an OS and CMake matrix | |
name: Unit Tests | |
on: | |
push: | |
branches: ["main", "dev"] | |
pull_request: | |
branches: ["main", "dev"] | |
workflow_dispatch: | |
# Define the matrix for different operating systems | |
jobs: | |
build-and-test: | |
name: ${{ matrix.os }} / CMake ${{ matrix.cmakeVersion }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
# CMake >= 3.21 is required to use "--preset <presetName>" and discover generators | |
cmakeVersion: ["3.21", latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Clone required submodules | |
run: | | |
git submodule init extern/googletest | |
git submodule update | |
- name: Install CMake | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: ${{ matrix.cmakeVersion }} | |
- name: "CMake: Build and Test" | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: release | |
configurePresetAdditionalArgs: "['-DBUILD_DOCS=OFF']" | |
buildPreset: release | |
testPreset: release |