Added lttng install #8
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: Build ROS2 Packages for Raspberry Pi 3 natively on ARM | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow on push events to the main branch. | |
jobs: | |
build: | |
runs-on: buildjet-4vcpu-ubuntu-2204-arm #run on ARM with Ubuntu 22 | |
steps: | |
- name: Setup Workspace | |
run: | | |
mkdir -p ros_ws/src # Create a workspace and src directory | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
path: ros_ws/src # Checkout the repository into the src directory | |
- name: Set up ROS environment | |
run: | | |
sudo apt update | |
sudo apt install -y curl gnupg lsb-release | |
sudo curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | |
echo "deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | |
sudo apt update | |
sudo apt install -y python3-colcon-common-extensions python3-rosdep python3-vcstool | |
- name: Initialize rosdep | |
run: | | |
sudo rosdep init | |
rosdep update | |
- name: Install dependencies | |
run: | | |
rosdep install --from-paths ros_ws/src --ignore-src -r -y --rosdistro humble | |
# Replace 'humble' with your ROS 2 distro if different. | |
- name: Install VCS | |
run: | | |
sudo apt install python3-vcstool | |
- name: Install CARET dependencies | |
run: | | |
sudo apt-get install -y lttng-tools liblttng-ust-dev python3-lttng python3-babeltrace babeltrace | |
- name: Download CARET | |
run: | | |
git clone https://github.com/tier4/caret.git ros2_caret_ws | |
- name: Execute setup_caret | |
run: | | |
cd ros2_caret_ws | |
mkdir src | |
vcs import src < caret.repos | |
yes | ./setup_caret.sh --no-interactive | |
- name: Build CARET | |
run: | | |
cd ros2_caret_ws | |
source /opt/ros/humble/setup.bash | |
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release | |
- name: Check CARET | |
run: | | |
ls -a ros2_caret_ws/ | |
ls -a ros2_caret_ws/install/ | |
source /opt/ros/humble/setup.bash | |
source ros2_caret_ws/install/local_setup.bash | |
ros2 run tracetools status # return Tracing enabled | |
- name: Build the ROS2 workspace with CARET | |
run: | | |
cd ros_ws | |
source /opt/ros/humble/setup.bash | |
source ros2_caret_ws/install/local_setup.bash | |
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF | |
ros2 caret check_caret_rclcpp . | |
- name: Archive artifacts | |
run: | | |
tar -czvf arti.tar.gz ros_ws ros2_caret_ws | |
- name: Archive the build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ros2-workspace-artifact | |
path: arti.tar.gz |