Skip to content

PropLib 2.0 refactor, cross-platform support #12

PropLib 2.0 refactor, cross-platform support

PropLib 2.0 refactor, cross-platform support #12

Workflow file for this run

# This action compiles the library and runs all unit tests using an OS and CMake matrix
# Doxygen documentation is also built. Build fails on missing documentation.
name: Unit Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
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:
# Windows-2019 is used as a dedicated 32-bit build/test platform
os: [ubuntu-latest, macos-latest, windows-latest, windows-2019]
# 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 init extern/doxygen-awesome-css
git submodule update
- name: Install CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmakeVersion }}
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
with:
version: "1.11.0"
- name: "CMake: Build and Test (32-bit)"
if: matrix.os == 'windows-2019'
uses: lukka/run-cmake@v10
with:
configurePreset: release32
buildPreset: release32
testPreset: release32
- name: "CMake: Build and Test (64-bit)"
if: matrix.os != 'windows-2019'
uses: lukka/run-cmake@v10
with:
configurePreset: release64
buildPreset: release64
testPreset: release64