Skip to content

Commit

Permalink
Add ros2 build step
Browse files Browse the repository at this point in the history
  • Loading branch information
SaikrishnaBairamoni authored Mar 1, 2024
1 parent dc57cd1 commit 1af038d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/Ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [opened, synchronize, reopened]
push:
branches: [develop, master, feature/add_gha]
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -32,7 +33,7 @@ jobs:
- name: Checkout Dependencies
run: |
./src/${{ github.event.repository.name }}/docker/checkout.bash -r /opt/carma
- name: Build
- name: Build ROS1
run: |
source "$INIT_ENV"
cd /opt/carma/src/${{ github.event.repository.name }}
Expand All @@ -41,14 +42,41 @@ jobs:
PACKAGES=$(find . -maxdepth 2 -type f -name package.xml | sed 's/\.\///' | cut -d/ -f1)
sed -i '/colcon build/ s/$/ --packages-up-to $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash
make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov
- name: Run C++ Tests
- name: Run ROS1 C++ Tests
continue-on-error: true
run: |
source "$INIT_ENV"
cd /opt/carma/src/${{ github.event.repository.name }}
export ROS_PARALLEL_JOBS='-j4 -l4'
sed -i '/colcon test/ s/$/ --packages-above $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash
make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov
- name: Build ROS2
continue-on-error: true
run: |
source "$INIT_ENV"
source "$ROS_2_ENV"
cd /opt/carma/src/${{ github.event.repository.name }}
export ROS_PARALLEL_JOBS='-j4 -l4'
export AUTOWARE_COMPILE_WITH_CUDA=1
PACKAGES=$(find . -maxdepth 2 -type f -name package.xml | sed 's/\.\///' | cut -d/ -f1)
sed -i '/colcon build/ s/$/ --packages-up-to $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash
make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov
- name: Run ROS2 C++ Tests
continue-on-error: true
run: |
source "$INIT_ENV"
source "$ROS_2_ENV"
cd /opt/carma/src/${{ github.event.repository.name }}
export ROS_PARALLEL_JOBS='-j4 -l4'
sed -i '/colcon test/ s/$/ --packages-above $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash
make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov
- name: Combine ROS1 and ROS2 compile_commands.json files
# Combine the ROS1 and ROS2 compile_commands.json files for sonarscan
run: |
mv /opt/carma/build/compile_commands.json /opt/carma/compile_commands.ros2.json
jq -s add /opt/carma/compile_commands.ros1.json /opt/carma/compile_commands.ros2.json > /opt/carma/build/compile_commands.json
- name: Upload Coverage Reports
uses: actions/upload-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ while [[ $# -gt 0 ]]; do
esac
done

cd ${dir}/src
cd ${dir}/src/autoware.ai

if [[ "$BRANCH" = "develop" ]]; then
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch $BRANCH
Expand Down

0 comments on commit 1af038d

Please sign in to comment.