add template param in docs #14
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
name: Unit Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
Ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Gets CMake | |
uses: lukka/get-cmake@latest | |
- name: Build IMUNano33 | |
run: | | |
mkdir build && cd build | |
cmake .. -DIMUNANO33_BUILD_TESTING=ON | |
- name: Run Unit Tests | |
run: | | |
cd build && make | |
ctest | |
MacOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build IMUNano33 | |
run: | | |
mkdir build && cd build | |
cmake .. -DIMUNANO33_BUILD_TESTING=ON | |
- name: Run Unit Tests | |
run: | | |
cd build && make | |
ctest | |
Windows: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build IMUNano33 | |
run: | | |
mkdir build && cd build | |
cmake .. -DIMUNANO33_BUILD_TESTING=ON -G "Visual Studio 17 2022" -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX /EHsc" | |
- name: Run Unit Tests | |
run: | | |
cmake --build build --config Release --parallel 10 | |
cd build | |
ctest | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Gets CMake | |
uses: lukka/get-cmake@latest | |
- name: Install clang-tidy | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang-tidy | |
- name: Build IMUNano33 | |
run: | | |
mkdir build && cd build | |
# build example so cmake has cpp targets to build otherwise it will complain | |
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DIMUNANO33_BUILD_SCRIPT=ON -DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wpedantic" | |
make | |
- name: Run Linter | |
run: | | |
clang-tidy -p build/ script/tidy.cpp | |