-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update readme and CI jobs for iron (#197)
(cherry picked from commit 2bd5804)
- Loading branch information
1 parent
97afc20
commit 230d10d
Showing
4 changed files
with
112 additions
and
19 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
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,84 @@ | ||
name: gz_ros2_control CI - Iron | ||
|
||
on: | ||
pull_request: | ||
branches: [ iron ] | ||
push: | ||
branches: [ iron ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- docker-image: "ubuntu:22.04" | ||
gz-version: "fortress" | ||
ros-distro: "iron" | ||
- docker-image: "ubuntu:22.04" | ||
gz-version: "garden" | ||
ros-distro: "iron" | ||
env: | ||
DOCKER_IMAGE: ${{ matrix.docker-image }} | ||
GZ_VERSION: ${{ matrix.gz-version }} | ||
ROS_DISTRO: ${{ matrix.ros-distro }} | ||
container: | ||
image: ${{ matrix.docker-image }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup colcon workspace | ||
id: configure | ||
shell: bash | ||
run: | | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt update -qq | ||
apt install -qq -y lsb-release wget curl gnupg2 git | ||
cd .. | ||
mkdir -p /home/ros2_ws/src | ||
if [ "$ROS_DISTRO" == "rolling" ]; then | ||
git clone https://github.com/gazebosim/ros_gz/ | ||
fi | ||
cp -r gz_ros2_control /home/ros2_ws/src/ | ||
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null | ||
if [ "$GZ_VERSION" == "garden" ]; then | ||
export GZ_DEPS="libgz-sim7-dev libgz-plugin2-dev gz-sim7-cli" | ||
fi | ||
apt-get update && apt-get upgrade -q -y | ||
apt-get update && apt-get install -qq -y \ | ||
dirmngr \ | ||
python3-colcon-ros \ | ||
python3-colcon-common-extensions \ | ||
python3-rosdep \ | ||
build-essential \ | ||
${GZ_DEPS} | ||
if [ "$GZ_VERSION" == "garden" ]; then | ||
export ROSDEP_ARGS="--skip-keys ros_gz_sim --skip-keys gz-plugin2 --skip-keys gz-sim7 --skip-keys gz-transport12 --skip-keys gz-math7 --skip-keys gz-msgs9" | ||
fi | ||
cd /home/ros2_ws/src/ | ||
if [ "$ROS_DISTRO" == "rolling" ]; then | ||
git clone https://github.com/gazebosim/ros_gz/ | ||
fi | ||
if [ "$ROS_DISTRO" == "iron" ]; then | ||
git clone https://github.com/gazebosim/ros_gz/ -b iron | ||
fi | ||
rosdep init | ||
rosdep update | ||
rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO} --ignore-src ${ROSDEP_ARGS} | ||
- name: Build project | ||
id: build | ||
run: | | ||
cd /home/ros2_ws/ | ||
. /opt/ros/${ROS_DISTRO}/local_setup.sh | ||
colcon build --packages-up-to gz_ros2_control_demos gz_ros2_control_tests | ||
- name: Run tests | ||
id: test | ||
run: | | ||
cd /home/ros2_ws/ | ||
. /opt/ros/${ROS_DISTRO}/local_setup.sh | ||
colcon test --event-handlers console_direct+ --packages-select gz_ros2_control gz_ros2_control_demos gz_ros2_control_tests | ||
colcon test-result |
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