kill #5
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: ROS 2 Build | |
on: | |
push: | |
branches: | |
- main | |
- workflow | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up ROS 2 Humble | |
run: | | |
sudo apt update | |
sudo apt install -y curl gnupg2 lsb-release | |
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - | |
echo "deb [arch=amd64] http://packages.ros.org/ros2/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/ros2.list | |
sudo apt update | |
sudo apt install -y ros-humble-desktop | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y python3-colcon-common-extensions python3-pip | |
python3 -m pip install -U setuptools | |
- name: Build ROS 2 workspace | |
run: | | |
source /opt/ros/humble/setup.bash | |
mkdir -p ~/ros2_ws/src | |
cp -r . ~/ros2_ws/src | |
cd ~/ros2_ws | |
colcon build |