Skip to content

Commit 8dbf763

Browse files
committed
feat: add new projects and enable ubuntu build workflow
Signed-off-by: Jiaxing Shi <[email protected]>
1 parent 9bba28c commit 8dbf763

File tree

3 files changed

+151
-9
lines changed

3 files changed

+151
-9
lines changed

.github/workflows/distro_build.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ jobs:
6666
with:
6767
fetch-depth: 0
6868
path: ${{ github.workspace }}/${{ github.event.repository.name }}
69-
ref: ${{ github.event_name == 'schedule' && 'develop' || github.head_ref || github.ref_name }}
69+
ref: ${{ github.event_name == 'schedule' && 'develop' || github.event_name == 'workflow_dispatch' && 'develop' || null }}
7070

7171
- name: Sync and build
72+
id: sync_and_build
73+
continue-on-error: true
7274
run: |
7375
ls ${{ github.workspace }}
7476
export PATH=/home/ubuntu/.local/bin:$PATH
@@ -116,6 +118,10 @@ jobs:
116118
-DCMAKE_PREFIX_PATH="$(pwd)/install/share" \
117119
-DBUILD_TESTING=OFF
118120
121+
if [ $? -ne 0 ]; then
122+
echo "::error::Build Failed!"
123+
fi
124+
119125
- name: Stage build artifacts for publishing
120126
continue-on-error: true
121127
run: |
@@ -130,3 +136,10 @@ jobs:
130136
with:
131137
path: ./uploads
132138
fileserver_url: "https://quic-qrt-ros-fileserver-1029608027416.us-central1.run.app"
139+
140+
- name: Set failed status
141+
run: |
142+
if [[ "${{ steps.sync_and_build.outcome }}" == "failure" ]];then
143+
echo "::error::Critical task (Step: Sync and build) failed! Forcing Job failure."
144+
exit 1
145+
fi
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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"

jazzy/repo.yaml

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,73 @@
11
repositories:
2+
dmabuf_transport:
3+
type: git
4+
url: https://github.com/qualcomm-qrb-ros/dmabuf_transport.git
5+
version: main
26
lib_mem_dmabuf:
37
type: git
4-
url: https://github.com/qualcomm-qrb-ros/lib_mem_dmabuf
8+
url: https://github.com/qualcomm-qrb-ros/lib_mem_dmabuf.git
9+
version: main
10+
libqrc:
11+
type: git
12+
url: https://github.com/qualcomm-qrb-ros/libqrc.git
13+
version: main
14+
qrb_ros_amr_service:
15+
type: git
16+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_amr_service.git
17+
version: main
18+
# qrb_ros_audio_service:
19+
# type: git
20+
# url: https://github.com/qualcomm-qrb-ros/qrb_ros_audio_service.git
21+
# version: main
22+
qrb_ros_battery:
23+
type: git
24+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_battery.git
25+
version: main
26+
# qrb_ros_benchmark:
27+
# type: git
28+
# url: https://github.com/qualcomm-qrb-ros/qrb_ros_benchmark.git
29+
# version: main
30+
qrb_ros_color_space_convert:
31+
type: git
32+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_color_space_convert.git
533
version: main
6-
qrb_ros_docker:
34+
qrb_ros_follow_path_service:
735
type: git
8-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_docker
36+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_follow_path_service.git
937
version: main
1038
qrb_ros_imu:
1139
type: git
12-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_imu
40+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_imu.git
1341
version: main
1442
qrb_ros_interfaces:
1543
type: git
16-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_interfaces
44+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_interfaces.git
1745
version: main
1846
qrb_ros_nn_inference:
1947
type: git
20-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_nn_inference
48+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_nn_inference.git
49+
version: main
50+
qrb_ros_robot_base:
51+
type: git
52+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_robot_base.git
53+
version: main
54+
qrb_ros_samples:
55+
type: git
56+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_samples.git
2157
version: main
2258
qrb_ros_system_monitor:
2359
type: git
24-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_system_monitor
60+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_system_monitor.git
61+
version: main
62+
qrb_ros_tensor_process:
63+
type: git
64+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_tensor_process.git
2565
version: main
2666
qrb_ros_transport:
2767
type: git
28-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_transport
68+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_transport.git
69+
version: main
70+
qrb_ros_video:
71+
type: git
72+
url: https://github.com/qualcomm-qrb-ros/qrb_ros_video.git
2973
version: main

0 commit comments

Comments
 (0)