-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tracking' into aqil_launch
- Loading branch information
Showing
20 changed files
with
603 additions
and
417 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,39 @@ | ||
{ | ||
"name": "Jetson Runtime Container", | ||
"remoteUser": "root", | ||
"image": "agrobotappliedai/jetsoncontainers-runtime:v1", | ||
"customizations":{ | ||
"settings": { | ||
"terminal.integrated.shell.linux": "bash" | ||
} | ||
}, | ||
"workspaceFolder": "/home/user/workspace", | ||
"workspaceMount": "source=.,target=/home/user/workspace,type=bind,consistency=cached", | ||
"mounts": [], | ||
"runArgs": [ | ||
"--net=host", | ||
"-it", | ||
"--gpus=all", | ||
"-e NVIDIA_DRIVER_CAPABILITIES=all", | ||
"--ipc=host", | ||
"--ulimit=memlock=-1", | ||
"--ulimit=stack=67108864" | ||
], | ||
"postStartCommand": "bash -c 'source /opt/ros/humble/setup.bash'" | ||
} | ||
|
||
// { | ||
// "containerEnv": { | ||
// "DISPLAY": "unix:0", | ||
// "ROS_LOCALHOST_ONLY": "1", | ||
// "ROS_DOMAIN_ID": "42" | ||
// }, | ||
// "runArgs": [ | ||
// "-e", "DISPLAY=${env:DISPLAY}" | ||
// ], | ||
// "mounts": [ | ||
// "source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached", | ||
// "source=/dev/dri,target=/dev/dri,type=bind,consistency=cached" | ||
// ], | ||
// "postCreateCommand": "sudo rosdep update && sudo rosdep install --from-paths src --ignore-src -y && sudo chown -R $(whoami) /home/ws/" | ||
// } |
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 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,37 @@ | ||
name: Integration Pipeline | ||
run-name: Integration pipeline triggered by ${{ github.actor }} | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
delivery: | ||
required: false | ||
type: boolean | ||
default: true | ||
deployment: | ||
required: false | ||
type: boolean | ||
default: true | ||
|
||
workflow_dispatch: | ||
inputs: | ||
delivery: | ||
description: 'Would you like to update the official image?' | ||
required: false | ||
default: true | ||
type: boolean | ||
deployment: | ||
description: 'Would you like to run unit and benchmarking tests?' | ||
required: false | ||
default: true | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
# build here | ||
test: | ||
# test here | ||
# needs [build] | ||
|
||
# should just build the ros package on the container and maybe peform unit tests | ||
# copy of the merge pipeline? |
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,66 +1,73 @@ | ||
# Lints the code of a branch | ||
name: Linting pipeline | ||
|
||
on: | ||
workflow_call: | ||
# push: | ||
# branches-ignore: | ||
# - main | ||
|
||
jobs: | ||
lint-python: | ||
runs-on: self-hosted | ||
id: python | ||
steps: | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Format Python Code with Black | ||
run: | | ||
black . | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -m "Apply Black formatting" || echo "No changes to commit" | ||
git push origin HEAD | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
# for main branch should verify the ros package gets built sucessfully, unit tests run | ||
# for this, if the normal cpp format dont work with I() then use the ament_lint from ros | ||
|
||
lint-cpp: | ||
runs-on: self-hosted | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
id: cpp | ||
steps: | ||
- name: C++ lint | ||
uses: cpp-linter/cpp-linter-action@v2 | ||
with: | ||
style: "file" | ||
tidy-checks: "" | ||
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
lint-python: | ||
runs-on: self-hosted | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
id: python | ||
steps: | ||
- name: Lint with pylint | ||
run: | | ||
pylint --disable=C0301 --disable=C0326 *.py | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Check for linting errors | ||
id: lint-check | ||
run: | | ||
if [ -f lint-results.txt ]; then | ||
echo "Linting issues found" | ||
cat lint-results.txt | ||
exit 1 | ||
else | ||
echo "No linting issues found" | ||
fi | ||
update-pr: | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
if [[ $(git status --porcelain) ]]; then | ||
# path agnostic ros2 colcon build | ||
- name: Run Colcon build | ||
|
||
|
||
- name: Locate and Run Clang-Tidy | ||
run: | | ||
COMPILE_COMMANDS_PATH=$(find build/ -name compile_commands.json | head -n 1) | ||
if [ -z "$COMPILE_COMMANDS_PATH" ]; then | ||
echo "Error: compile_commands.json not found!" | ||
exit 1 | ||
fi | ||
echo "Using compile_commands.json located at: $COMPILE_COMMANDS_PATH" | ||
find src/ -name "*.cpp" | xargs clang-tidy --fix --fix-errors -p $(dirname $COMPILE_COMMANDS_PATH) | ||
# Format C++ files with clang-format | ||
- name: Auto-fix C++ Formatting Issues | ||
run: | | ||
find . -name '*.cpp' -o -name '*.hpp' | xargs clang-format -i | ||
- name: Commit and Push Changes | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -m "Auto-fix lint issues" | ||
git push origin HEAD:${{ github.head_ref }} | ||
else | ||
echo "No lint fixes applied, nothing to commit." | ||
fi | ||
git commit -m "Auto-format code with clang-tidy/clang-format" || echo "No changes to commit" | ||
git push origin HEAD | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# bug checks | ||
# compilation | ||
|
@@ -70,4 +77,10 @@ jobs: | |
# Ament_xmllint | ||
# Black | ||
# Clang-tidy | ||
# Isort | ||
# Isort | ||
|
||
# flake8 --fix or autopep8 --in-place --aggressive --aggressive | ||
# git config --global user.email "[email protected]" | ||
# how to run inside container, need to make linting/formatting container w/ git, python, etc. | ||
# git config --global user.name "github-actions" | ||
# git config --global user.email "[email protected]" |
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
File renamed without changes.
Oops, something went wrong.