-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Build and Test Workflows (#58)
* Added build and test workflow * Corrected IMAGE_NAME varibles in run_devel.sh script * Corrected pull_requests trigger name * Removed -it option from docker run & added docker attach step * Removed PERCEP_WS_PATH environment variable and used github.workspace instead * Corrected container name in docker run * Corrected volume mount path * Removed not required arguments from docker run * Removed docker attach & used docker exec for colcon build * Added | character in run for multi-line command * Added container_name environment variable * Added jobs for lint and test * Updated linting job, added matrix for linter * Added package name field to lint job * Removed pep8 and mypy linter from action workflows * Added copyright notice, corrected according to lint * Updated worflow to pass arguments for linter, made some corrections * Removed arguments from workflow * Updated flake8 test to use setup.cfg as the config * Updated workflow to pass config argument to flake8 lint * Fixed variable name typo * Corrected variable used for config path * Updated lin job to setup ros humble * Added ros distribution field for lint steps * Updated flake8 config from default ament_flake8 config * Added project wide flake8 config file, some more lint corrections
- Loading branch information
1 parent
efb16f7
commit 9eb121a
Showing
13 changed files
with
346 additions
and
205 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,6 @@ | ||
[flake8] | ||
extend-ignore = B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,Q000 | ||
import-order-style = google | ||
max-line-length = 125 | ||
show-source = true | ||
statistics = true |
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,65 @@ | ||
name: Build and Test Workflows | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ament_lint: | ||
name: Lint and Codecheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup ROS | ||
uses: ros-tooling/setup-ros@master | ||
- name: Ament Copyright Lint | ||
uses: ros-tooling/action-ros-lint@master | ||
with: | ||
distribution: humble | ||
linter: copyright | ||
package-name: "*" | ||
- name: Ament Flake8 Lint | ||
uses: ros-tooling/action-ros-lint@master | ||
with: | ||
distribution: humble | ||
linter: flake8 | ||
package-name: "*" | ||
arguments: '--config=${{ github.workspace }}/.flake8' | ||
- name: Ament PEP257 Lint | ||
uses: ros-tooling/action-ros-lint@master | ||
with: | ||
distribution: humble | ||
linter: pep257 | ||
package-name: "*" | ||
- name: Ament xmllint Lint | ||
uses: ros-tooling/action-ros-lint@master | ||
with: | ||
distribution: humble | ||
linter: xmllint | ||
package-name: "*" | ||
|
||
build_source: | ||
name: Build Docker Image and ROS 2 Packages | ||
runs-on: ubuntu-latest | ||
env: | ||
CONTAINER_NAME: perception_pipeline | ||
PERCEP_WS: /root/percep_ws | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v4 | ||
- name: Build Docker Image | ||
run: docker build . --file Dockerfile.ubuntu -t ${{ github.repository }}:latest | ||
- name: Run Docker Image | ||
run: | | ||
docker run -it -d --name $CONTAINER_NAME \ | ||
-v ${{ github.workspace }}:$PERCEP_WS/src \ | ||
${{ github.repository }}:latest | ||
- name: Build ROS 2 Packages in Container | ||
run: docker exec $CONTAINER_NAME bash -c \ | ||
"source /opt/ros/humble/setup.bash && cd $PERCEP_WS && colcon build" |
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
Oops, something went wrong.