ROS2 Humble #177
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
name: ROS2 Humble | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 10 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint package | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
config: | |
- { python: "3.10" } | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.config.python }} | |
- name: Lint sources | |
uses: pre-commit/[email protected] | |
webots_spot: | |
name: Webots Spot with Nav2 and Moveit2 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install ROS2 Humble | |
run: > | |
sudo apt update | |
sudo apt install -y software-properties-common | |
sudo add-apt-repository universe | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | |
| sudo apt-key add - | |
sudo sh -c 'echo "deb [arch=amd64,arm64] | |
http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > | |
/etc/apt/sources.list.d/ros2-latest.list' | |
sudo apt update | |
sudo apt install -y ros-humble-ros-base | |
python3-colcon-common-extensions ros-dev-tools | |
- name: Install Webots 2023b | |
run: | | |
sudo apt update | |
sudo apt install -y wget dialog apt-utils psmisc lsb-release git | |
sudo wget https://github.com/cyberbotics/webots/releases/download/R2023b/webots_2023b_amd64.deb -O /tmp/webots.deb | |
sudo apt install -y /tmp/webots.deb xvfb | |
- name: Create Workspace | |
run: | | |
mkdir -p ~/ros2_ws/src | |
cp -r $GITHUB_WORKSPACE/. ~/ros2_ws/src/webots_ros2_spot | |
- name: Install Webots Spot Dependencies | |
run: | | |
cd ~/ros2_ws | |
source /opt/ros/humble/setup.bash | |
sudo rosdep init | |
rosdep update | |
sudo apt install -y libunwind-dev # Nav2 dependency | |
rosdep install --from-paths ./ --ignore-src -y | |
vcs import --recursive src --skip-existing --input src/webots_ros2_spot/webots_ros2_spot.repos | |
chmod +x src/webots_ros2/webots_ros2_driver/webots_ros2_driver/ros2_supervisor.py | |
- name: Build Packages | |
run: | | |
cd ~/ros2_ws | |
source /opt/ros/humble/setup.bash | |
colcon build --symlink-install | |
source install/setup.bash | |
- name: Test | |
run: | | |
export WEBOTS_RELEASE_VERSION=2023b-rev1 | |
export WEBOTS_OFFSCREEN=1 | |
export CI=1 | |
export DEBIAN_FRONTEND=noninteractive | |
cd ~/ros2_ws | |
source install/setup.bash | |
colcon test --ctest-args tests --packages-select webots_spot --event-handlers console_direct+ --return-code-on-test-failure |