-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tweak some tests * added planners that inherit the FSM to update the encoders and take actions based on the state. * replace gtest with Catch2 because GTEST makes it hard to see stack traces of exceptions thrown at low layers * Simplify Axis, Start building planner test for ZOnly * Create cmake-multi-platform.yml
- Loading branch information
1 parent
a10b9bd
commit e3dbf0a
Showing
70 changed files
with
1,044 additions
and
525 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
* text=auto eol=lf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | ||
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | ||
name: CMake on multiple platforms | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | ||
fail-fast: false | ||
|
||
# Set up a matrix to run the following 3 configurations: | ||
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator> | ||
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator> | ||
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator> | ||
# | ||
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. | ||
matrix: | ||
os: [ubuntu-latest] | ||
build_type: [Release] | ||
c_compiler: [gcc, clang, cl] | ||
include: | ||
# - os: windows-latest | ||
# c_compiler: cl | ||
# cpp_compiler: cl | ||
- os: ubuntu-latest | ||
c_compiler: gcc | ||
cpp_compiler: g++ | ||
- os: ubuntu-latest | ||
c_compiler: clang | ||
cpp_compiler: clang++ | ||
exclude: | ||
- os: windows-latest | ||
c_compiler: gcc | ||
- os: windows-latest | ||
c_compiler: clang | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set reusable strings | ||
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | ||
id: strings | ||
shell: bash | ||
run: | | ||
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | ||
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: > | ||
cmake -B ${{ steps.strings.outputs.build-output-dir }} | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | ||
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} | ||
|
||
- name: Test | ||
working-directory: ${{ steps.strings.outputs.build-output-dir }} | ||
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest --build-config ${{ matrix.build_type }} |
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 file was deleted.
Oops, something went wrong.
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 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 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 file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
if(${EXPOSE_COVERAGE_TARGET}) | ||
# specific flags to build the covered project. Enable source based Coverage | ||
# see: | ||
# https://releases.llvm.org/11.0.0/tools/clang/docs/SourceBasedCodeCoverage.html | ||
# target_compile_options(elsf::elsf PRIVATE | ||
# -fprofile-instr-generate -fcoverage-mapping) | ||
# target_link_options(elsf::elsf PRIVATE | ||
# -fprofile-instr-generate -fcoverage-mapping) | ||
|
||
# Useful variables used later, specific to llvm tools path and output | ||
# directory | ||
get_filename_component(llvmBinPath ${CMAKE_CXX_COMPILER} DIRECTORY) | ||
set(llvmProfData ${llvmBinPath}/llvm-profdata) | ||
set(llvmCov ${llvmBinPath}/llvm-cov) | ||
|
||
# An internal custom command used as dependency of exposed targets to | ||
# generate coverage data | ||
add_custom_command(OUTPUT default.profdata | ||
DEPENDS .elsf_testsuites.executed | ||
COMMAND ${llvmProfData} | ||
ARGS merge | ||
-sparse | ||
$<TARGET_NAME_IF_EXISTS:elsf_tests>.profraw | ||
-o default.profdata) | ||
|
||
# An internal command used as dependency for exposed targets. Ensures that | ||
# test suites have been executed with latest modifications and latest | ||
# coverage data. | ||
add_custom_command(OUTPUT .elsf_testsuites.executed | ||
DEPENDS | ||
elsf::elsf elsf_tests | ||
COMMAND ${CMAKE_COMMAND} | ||
ARGS -E copy $<TARGET_FILE:elsf::elsf> $<TARGET_FILE_DIR:elsf_tests> | ||
COMMAND $<TARGET_FILE:elsf_tests> | ||
COMMAND ${CMAKE_COMMAND} | ||
ARGS -E rename default.profraw $<TARGET_NAME_IF_EXISTS:elsf_tests>.profraw | ||
COMMAND ${CMAKE_COMMAND} | ||
ARGS -E touch .elsf_testsuites.executed | ||
VERBATIM | ||
USES_TERMINAL) | ||
|
||
# A target to generate detailed coverage information in json format. To get | ||
# a grab on ow it is structured, see: | ||
# https://stackoverflow.com/questions/56013927/how-to-read-llvm-cov-json-format | ||
# https://llvm.org/doxygen/structllvm_1_1coverage_1_1CoverageSegment.html | ||
# https://llvm.org/doxygen/structllvm_1_1coverage_1_1CounterMappingRegion.html | ||
# https://github.com/llvm/llvm-project/blob/aa4e6a609acdd00e06b54f525054bd5cf3624f0f/llvm/tools/llvm-cov/CoverageExporterJson.cpp#L15 | ||
add_custom_target(coverage | ||
DEPENDS coverage.json) | ||
|
||
# An internal command used to generate detailed coverage information in a | ||
# file | ||
add_custom_command(OUTPUT coverage.json | ||
DEPENDS default.profdata | ||
COMMAND ${llvmCov} | ||
ARGS export --format=text | ||
--object=$<TARGET_FILE:elsf_tests> | ||
--instr-profile=default.profdata | ||
> coverage.json | ||
VERBATIM | ||
USES_TERMINAL) | ||
endif() |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.