-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run ROS2 build in CI and fix any errors (#32)
* Add ROS2 build test * DO NOT MERGE always run Signed-off-by: Ryan Friedman <[email protected]> * Switch to rosdep and vcs Signed-off-by: Ryan Friedman <[email protected]> * Run on 22.04 and public runners Signed-off-by: Ryan Friedman <[email protected]> * Remove auth since running on public Signed-off-by: Ryan Friedman <[email protected]> * debug failing clone Signed-off-by: Ryan Friedman <[email protected]> * Run from src directory Signed-off-by: Ryan Friedman <[email protected]> * Remove unused ROS 1 packages Signed-off-by: Ryan Friedman <[email protected]> * Remove debug on clone Signed-off-by: Ryan Friedman <[email protected]> * Fix cmake policy with my fork Signed-off-by: Ryan Friedman <[email protected]> * Remove tinyxml dep Signed-off-by: Ryan Friedman <[email protected]> * Add workaround for Ubuntu geographiclib packaging bug Signed-off-by: Ryan Friedman <[email protected]> * Undo workflow timing Signed-off-by: Ryan Friedman <[email protected]> * Fix yamllint errors Signed-off-by: Ryan Friedman <[email protected]> * Remove all custom cmake scripts * Rely on upstream to work properly Signed-off-by: Ryan Friedman <[email protected]> * Switch back to upstream mav_comm ros2 branch Signed-off-by: Ryan Friedman <[email protected]> --------- Signed-off-by: Ryan Friedman <[email protected]> Co-authored-by: Jaeyoung-Lim <[email protected]>
- Loading branch information
1 parent
3e364f5
commit a43c745
Showing
7 changed files
with
40 additions
and
92 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 |
---|---|---|
@@ -1,56 +1,46 @@ | ||
--- | ||
name: Build Test | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'ros2' | ||
pull_request: | ||
branches: | ||
- '*' | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, linux] | ||
runs-on: [ubuntu-22.04] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
# - {rosdistro: 'melodic', container: 'px4io/px4-dev-ros-melodic:2021-12-11'} | ||
- {rosdistro: 'noetic', container: 'px4io/px4-dev-ros-noetic:2021-12-11'} | ||
- {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'} | ||
container: ${{ matrix.config.container }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install Dependencies | ||
working-directory: | ||
run: | | ||
apt update | ||
apt install -y python3-wstool libgdal-dev ros-${{matrix.config.rosdistro}}-tf2-geometry-msgs | ||
shell: bash | ||
- name: Build Test | ||
working-directory: | ||
run: | | ||
mkdir -p $HOME/catkin_ws/src; | ||
cd $HOME/catkin_ws | ||
catkin init | ||
catkin config --extend "/opt/ros/${{matrix.config.rosdistro}}" | ||
catkin config --merge-devel | ||
cd $HOME/catkin_ws/src | ||
ln -s $GITHUB_WORKSPACE | ||
cd $HOME/catkin_ws | ||
wstool init src src/terrain-navigation/dependencies.rosinstall | ||
wstool update -t src -j4 | ||
rosdep update | ||
rosdep install --from-paths src --ignore-src -y --rosdistro ${{matrix.config.rosdistro}} | ||
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=False | ||
catkin build -j$(nproc) -l$(nproc) terrain_navigation_ros | ||
- name: unit_tests | ||
working-directory: | ||
run: | | ||
cd $HOME/catkin_ws/src | ||
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=True | ||
catkin build terrain_planner --no-deps -i --catkin-make-args tests | ||
source $HOME/catkin_ws/devel/setup.bash | ||
status=0 && for f in $HOME/catkin_ws/devel/lib/*/*-test; do $f || exit 1; done | ||
shell: bash | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: src/ethz-asl/terrain-navigation | ||
- name: Check out source dependencies with vcs | ||
run: | | ||
vcs import --recursive --debug --shallow --skip-existing < ethz-asl/terrain-navigation/terrain-navigation.repos | ||
shell: bash | ||
working-directory: src | ||
- name: Install binary dependencies with rosdep | ||
run: | | ||
apt update | ||
rosdep update | ||
source /opt/ros/humble/setup.bash | ||
rosdep install --from-paths src --ignore-src -y --rosdistro ${{matrix.config.rosdistro}} | ||
shell: bash | ||
- name: Build with colcon | ||
run: | | ||
source /opt/ros/humble/setup.bash | ||
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to terrain_navigation_ros | ||
shell: bash | ||
- name: Run tests | ||
run: | | ||
source /opt/ros/humble/setup.bash | ||
colcon test --paths src/ethz-asl/terrain-navigation --event-handlers=console_cohesion+ | ||
colcon test-result --all --verbose | ||
shell: bash |
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
27 changes: 0 additions & 27 deletions
27
terrain_navigation_ros/cmake/CheckGeographicLibDatasets.cmake
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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