Skip to content

Commit

Permalink
Merge updates from upstream (v4.6.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpohsien committed May 13, 2024
2 parents 6310827 + 287eb59 commit f18e2ce
Show file tree
Hide file tree
Showing 214 changed files with 11,454 additions and 6,638 deletions.
44 changes: 21 additions & 23 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
BasedOnStyle: Google
BasedOnStyle: Google
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
AlignEscapedNewlinesLeft: false
Expand All @@ -8,15 +8,13 @@ AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakConstructorInitializers: BeforeComma
BinPackParameters: true
ColumnLimit: 90
ColumnLimit: 90
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: false
PointerBindsToType: true
Expand All @@ -31,19 +29,20 @@ PenaltyBreakString: 1
PenaltyBreakFirstLessLess: 1000
PenaltyExcessCharacter: 1000
PenaltyReturnTypeOnItsOwnLine: 90
SpacesBeforeTrailingComments: 3
Cpp11BracedListStyle: true
Standard: Auto
IndentWidth: 2
TabWidth: 2
UseTab: Never
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: false
Standard: Auto
IndentWidth: 2
TabWidth: 2
UseTab: Never
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false
SpacesInAngles: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
ContinuationIndentWidth: 4
SortIncludes: false
SpaceAfterCStyleCast: false
Expand All @@ -54,17 +53,16 @@ BreakBeforeBraces: Custom

# Control of individual brace wrapping cases
BraceWrapping: {
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum : 'true'
AfterFunction : 'true'
AfterNamespace : 'true'
AfterStruct : 'true'
AfterUnion : 'true'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
AfterClass: 'true',
AfterControlStatement: 'true',
AfterEnum : 'true',
AfterFunction : 'true',
AfterNamespace : 'true',
AfterStruct : 'true',
AfterUnion : 'true',
BeforeCatch : 'true',
BeforeElse : 'true',
IndentBraces : 'false',
SplitEmptyFunction: 'false'
}
...

19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Bug report
about: Help me help you...
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

If you are experiencing a crash, provide a backtrace (GDB or similar).

*How to Reproduce**

Please provide a specific description of how to reproduce the issue or source code that can be compiled and executed. Please attach a file/project that is easy to compile, don't copy and paste code snippets!

Even better, create a Pull Request with a failing unit test.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
You must run clang-format, otherwise your change may not pass the tests on CI
We recommend using pre-commit.
To use:
pre-commit run -a
Or:
pre-commit install # (runs every time you commit in git)
See https://github.com/pre-commit/pre-commit
-->
9 changes: 4 additions & 5 deletions .github/workflows/cmake_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0

- name: Create default profile
run: conan profile new default --detect

Expand All @@ -50,11 +50,10 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{env.BUILD_TYPE}}

- name: run test (Linux)
working-directory: ${{github.workspace}}/build
run: ./tests/behaviortree_cpp_test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

13 changes: 5 additions & 8 deletions .github/workflows/cmake_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ jobs:
os: [windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0


- name: Create default profile
run: conan profile new default --detect
run: conan profile detect

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand All @@ -47,8 +45,7 @@ jobs:
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config ${{env.BUILD_TYPE}}

- name: run test (Windows)
working-directory: ${{github.workspace}}/build
run: $env:PATH+=";${{env.BUILD_TYPE}}"; tests/${{env.BUILD_TYPE}}/behaviortree_cpp_test.exe

50 changes: 7 additions & 43 deletions .github/workflows/pixi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,21 @@ name: Pixi (conda)

on: [push, pull_request]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
# Note if this value is changed, has to be manually updated in the `windows-latest` tests_command
BUILD_TYPE: Release

jobs:
pixi_conda_build:
strategy:
matrix:
include:
- os: windows-latest
build_depend: vs2022_win-64=19.*
tests_command: "'PATH=\\\"$PATH;build/Release\\\" build/tests/Release/behaviortree_cpp_test.exe'"
- os: ubuntu-latest
build_depend: "gxx=12.2.*"
tests_command: "./build/tests/behaviortree_cpp_test"
os:
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
# Pixi is the tool used to create/manage conda environment
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.7.0
locked: false
frozen: false
run-install: false
manifest-path: build-env/pixi.yaml
- name: Make pixi workspace
run: |
pixi init build-env
- name: Install dependencies
working-directory: ${{github.workspace}}/build-env
run: |
pixi add cmake zeromq=4.3.4 gtest=1.12.* gmock=1.12.* sqlite=3.40.* ${{ matrix.build-depend }}
pixi install
- name: Create Build Directory
working-directory: ${{github.workspace}}/build-env
run: mkdir build
- uses: actions/checkout@v3
- uses: prefix-dev/[email protected]
with:
path: build-env/BehaviorTree.CPP
pixi-version: v0.16.1
- name: Build
working-directory: ${{github.workspace}}/build-env
run: |
pixi task add build "cd build; cmake ../BehaviorTree.CPP -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}; cmake --build . --parallel --config ${{env.BUILD_TYPE}}"
pixi run build
run: pixi run build
- name: Run tests
working-directory: ${{github.workspace}}/build-env
run: |
pixi task add tests ${{ matrix.tests_command }}
pixi run tests

run: pixi run test
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [master]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
17 changes: 17 additions & 0 deletions .github/workflows/ros2-rolling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: ros2-rolling

on: [push, pull_request]

jobs:
industrial_ci:
strategy:
matrix:
env:
- {ROS_DISTRO: rolling, ROS_REPO: main}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
with:
package-name: plotjuggler
6 changes: 3 additions & 3 deletions .github/workflows/ros2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
matrix:
env:
- {ROS_DISTRO: humble, ROS_REPO: main}
- {ROS_DISTRO: rolling, ROS_REPO: main}
- {ROS_DISTRO: iron, ROS_REPO: main}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
with:
package-name: behaviortree_cpp
package-name: plotjuggler
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ CMakeSettings.json

# OSX junk
.DS_Store

# pixi environments
.pixi

CMakeUserPresets.json
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit

exclude: ^3rdparty/|3rdparty|^include/behaviortree_cpp/contrib/
repos:

# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude_types: [svg]
- id: mixed-line-ending
- id: trailing-whitespace
exclude_types: [svg]
- id: fix-byte-order-marker

# CPP hooks
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
args: ['-fallback-style=none', '-i']
Loading

0 comments on commit f18e2ce

Please sign in to comment.