-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from MrKevinWeiss/pr/rework/alot
BREAKING CHANGE: Big rework
- Loading branch information
Showing
119 changed files
with
12,346 additions
and
3,514 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# .coveragerc to control coverage.py | ||
[run] | ||
branch = True | ||
source = memory_map_manager/ | ||
|
||
[report] | ||
# A list of regular expressions. Any line that matches one of these regexes is excluded from being reported as missing | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if __name__ == .__main__.: | ||
|
||
# (integer): the number of digits after the decimal point to display for reported coverage percentages. | ||
precision = 1 | ||
|
||
|
||
[html] | ||
# (string, default "htmlcov"): where to write the HTML report files. | ||
directory = htmlcov |
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,3 @@ | ||
[flake8] | ||
exclude = .tox,dist,doc,build,*.egg | ||
max-complexity = 10 |
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,98 @@ | ||
name: CMake Build Matrix | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
CMAKE_VERSION: 3.23.0 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
apps: | ||
- examples/minimal | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download CMake | ||
shell: cmake -P {0} | ||
run: | | ||
set(cmake_version $ENV{CMAKE_VERSION}) | ||
message(STATUS "Using host CMake version: ${CMAKE_VERSION}") | ||
set(cmake_suffix "linux-x86_64.tar.gz") | ||
set(cmake_dir "cmake-${cmake_version}-linux-x86_64/bin") | ||
set(cmake_url "https://github.com/Kitware/CMake/releases/download/v${cmake_version}/cmake-${cmake_version}-${cmake_suffix}") | ||
file(DOWNLOAD "${cmake_url}" ./cmake.zip SHOW_PROGRESS) | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./cmake.zip) | ||
# Add to PATH environment variable | ||
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/${cmake_dir}" cmake_dir) | ||
set(path_separator ":") | ||
file(APPEND "$ENV{GITHUB_PATH}" "$ENV{GITHUB_WORKSPACE}${path_separator}${cmake_dir}") | ||
execute_process( | ||
COMMAND chmod +x ${cmake_dir}/cmake | ||
) | ||
- name: Configure | ||
shell: cmake -P {0} | ||
run: | | ||
set(ENV{CC} gcc) | ||
set(ENV{CXX} g++) | ||
set(path_separator ":") | ||
set(ENV{PATH} "$ENV{GITHUB_WORKSPACE}${path_separator}$ENV{PATH}") | ||
execute_process( | ||
COMMAND cmake | ||
-S . | ||
-B build | ||
WORKING_DIRECTORY ${{ matrix.apps }} | ||
RESULT_VARIABLE result | ||
) | ||
if (NOT result EQUAL 0) | ||
message(FATAL_ERROR "Bad exit status") | ||
endif() | ||
- name: Build | ||
shell: cmake -P {0} | ||
run: | | ||
execute_process( | ||
COMMAND cmake --build build | ||
WORKING_DIRECTORY ${{ matrix.apps }} | ||
RESULT_VARIABLE result | ||
OUTPUT_VARIABLE output | ||
ERROR_VARIABLE output | ||
ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE | ||
) | ||
if (NOT result EQUAL 0) | ||
string(REGEX MATCH "FAILED:.*$" error_message "${output}") | ||
string(REPLACE "\n" "%0A" error_message "${error_message}") | ||
message("::error::${error_message}") | ||
message(FATAL_ERROR "Build failed") | ||
endif() | ||
- name: Run tests | ||
shell: cmake -P {0} | ||
run: | | ||
include(ProcessorCount) | ||
ProcessorCount(N) | ||
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON") | ||
execute_process( | ||
COMMAND ctest -j ${N} | ||
WORKING_DIRECTORY ${{ matrix.apps }}/build | ||
RESULT_VARIABLE result | ||
OUTPUT_VARIABLE output | ||
ERROR_VARIABLE output | ||
ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE | ||
) | ||
if (NOT result EQUAL 0) | ||
string(REGEX MATCH "[0-9]+% tests.*[0-9.]+ sec.*$" test_results "${output}") | ||
string(REPLACE "\n" "%0A" test_results "${test_results}") | ||
message("::error::${test_results}") | ||
message(FATAL_ERROR "Running tests failed!") | ||
endif() |
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,40 @@ | ||
name: Run on Examples | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
configs: | ||
- examples/minimal/main.yaml | ||
- examples/complex/mp1.yaml | ||
- examples/complex/mp2.yaml | ||
- examples/complex/sa.yaml | ||
- examples/complex/sensor.yaml | ||
- examples/full/main.yaml | ||
- examples/minimal/main.yaml | ||
- examples/philip/main.yaml | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
- name: Generate example | ||
run: mmm-gen -p ${{ matrix.configs }} |
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
Oops, something went wrong.