1
+ name : Build QRB ROS packages on Ubuntu
2
+ on :
3
+ push :
4
+ pull_request :
5
+ workflow_dispatch :
6
+ schedule :
7
+ # Every weekday 8:00 UTC+8
8
+ - cron : ' 0 0 * * 1-5'
9
+
10
+ jobs :
11
+ ros-build :
12
+ runs-on : [ubuntu-24.04-arm]
13
+ container : ros:jazzy
14
+ env :
15
+ ROS_WS : ${{ github.workspace }}/ros2_ws/
16
+ ROS_SRC : ${{ github.workspace }}/ros2_ws/src
17
+ steps :
18
+ - name : Update and install extra packages
19
+ run : |
20
+ # Add QCOM PPA
21
+ sudo apt-get update
22
+ sudo apt-get install -y software-properties-common
23
+ sudo add-apt-repository -y ppa:ubuntu-qcom-iot/qcom-ppa
24
+ sudo add-apt-repository -y ppa:ubuntu-qcom-iot/qirp
25
+ sudo apt update -y && sudo apt upgrade -y
26
+ sudo apt install -y tree python3-vcstool wget
27
+
28
+ - name : Checkout source code
29
+ uses : actions/checkout@v4
30
+ with :
31
+ fetch-depth : 0
32
+ path : ${{ env.ROS_SRC }}/${{ github.event.repository.name }}
33
+ ref : ${{ github.event_name == 'schedule' && 'develop' || github.event_name == 'workflow_dispatch' && 'develop' || null }}
34
+
35
+ - name : Download Source
36
+ run : |
37
+ vcs import --input ${ROS_SRC}/${{ github.event.repository.name }}/jazzy/repo.yaml ${ROS_SRC}
38
+
39
+ - name : Check ROS dependency
40
+ continue-on-error : true
41
+ shell : bash
42
+ run : |
43
+ wget https://raw.githubusercontent.com/qualcomm-qrb-ros/qrb_ros_distro/refs/heads/main/qrb-ros-dep/qcom-distribution.yaml -O ${ROS_SRC}/qcom-distribution.yaml
44
+ if [ -f /etc/ros/rosdep/sources.list.d/20-default.list ];then
45
+ echo "yaml file://${ROS_SRC}/qcom-distribution.yaml" | sudo tee -a /etc/ros/rosdep/sources.list.d/20-default.list
46
+ fi
47
+
48
+ source /opt/ros/jazzy/setup.sh
49
+ # NOT WORK:'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo
50
+ sudo rosdep update
51
+
52
+ cd ${ROS_SRC}
53
+ if ! sudo rosdep install -y --rosdistro jazzy --from-paths "${ROS_SRC}" --ignore-src; then
54
+ for prj_dir in */; do
55
+ echo "Install dependencies for ${prj_dir}..."
56
+ sudo rosdep install -y --rosdistro jazzy --from-paths ${prj_dir} --ignore-src || ignored=( ${ignored[@]} ${prj_dir} )
57
+ done
58
+
59
+ echo "::error:: Failed to resolve the following package dependencies:"
60
+ for pkg in "${ignored[@]}";do
61
+ echo "::error:: ${pkg}"
62
+ done
63
+ fi
64
+
65
+ - name : Build ROS packages
66
+ shell : bash
67
+ run : |
68
+ cd ${ROS_WS}
69
+ source /opt/ros/jazzy/setup.sh
70
+ colcon build --continue-on-error
71
+
72
+ - name : Stage build artifacts for publishing
73
+ continue-on-error : true
74
+ run : |
75
+ build_dir=./uploads
76
+ mkdir -p $build_dir
77
+
78
+ tar -cvf "${build_dir}/${{ github.event.repository.name }}-ubuntu-artifacts.tar" --transform "s|^${ROS_WS}/||" -C "${ROS_WS}" install build log
79
+
80
+ - name : Upload private artifacts
81
+ continue-on-error : true
82
+ uses : qualcomm-linux/upload-private-artifact-action@v1
83
+ with :
84
+ path : ./uploads
85
+ fileserver_url : " https://quic-qrt-ros-fileserver-1029608027416.us-central1.run.app"
0 commit comments