Skip to content

Commit a907c22

Browse files
committed
ci: fix issues on develop
1. Download distribution.yaml from main 2. Upload artifacts event build failed and set failed status at the end. Signed-off-by: Jiaxing Shi <[email protected]>
1 parent 2d659b9 commit a907c22

File tree

3 files changed

+45
-24
lines changed

3 files changed

+45
-24
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.event_name == 'workflow_dispatch' && '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

.github/workflows/distro_build_ubuntu.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,54 @@ jobs:
2020
# Add QCOM PPA
2121
sudo apt-get update
2222
sudo apt-get install -y software-properties-common
23-
sudo add-apt-repository ppa:ubuntu-qcom-iot/qcom-noble-ppa
24-
sudo add-apt-repository ppa:ubuntu-qcom-iot/qirp
23+
sudo add-apt-repository -y ppa:ubuntu-qcom-iot/qcom-ppa
24+
sudo add-apt-repository -y ppa:ubuntu-qcom-iot/qirp
2525
sudo apt update -y && sudo apt upgrade -y
26-
sudo apt install -y tree python3-vcstool
26+
sudo apt install -y tree python3-vcstool wget
2727
2828
- name: Checkout source code
2929
uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
3232
path: ${{ env.ROS_SRC }}/${{ github.event.repository.name }}
33-
ref: ${{ github.event_name == 'schedule' && 'develop' || github.event_name == 'workflow_dispatch' && 'develop' || github.head_ref || github.ref_name }}
33+
ref: ${{ github.event_name == 'schedule' && 'develop' || github.event_name == 'workflow_dispatch' && 'develop' || null }}
3434

3535
- name: Download Source
3636
run: |
3737
vcs import --input ${ROS_SRC}/${{ github.event.repository.name }}/jazzy/repo.yaml ${ROS_SRC}
3838
3939
- name: Check ROS dependency
40+
continue-on-error: true
4041
shell: bash
4142
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
4244
if [ -f /etc/ros/rosdep/sources.list.d/20-default.list ];then
43-
echo "yaml file://${ROS_SRC}/${{ github.event.repository.name }}/qrb-ros-dep/qcom-distribution.yaml" | sudo tee -a /etc/ros/rosdep/sources.list.d/20-default.list
45+
echo "yaml file://${ROS_SRC}/qcom-distribution.yaml" | sudo tee -a /etc/ros/rosdep/sources.list.d/20-default.list
4446
fi
47+
4548
source /opt/ros/jazzy/setup.sh
49+
# NOT WORK:'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo
4650
sudo rosdep update
47-
sudo rosdep install -y --rosdistro jazzy --from-paths ${ROS_SRC} --ignore-src
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
4864
4965
- name: Build ROS packages
5066
shell: bash
5167
run: |
5268
cd ${ROS_WS}
5369
source /opt/ros/jazzy/setup.sh
54-
colcon build
70+
colcon build --continue-on-error
5571
5672
- name: Stage build artifacts for publishing
5773
continue-on-error: true

jazzy/repo.yaml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ repositories:
1515
type: git
1616
url: https://github.com/qualcomm-qrb-ros/qrb_ros_amr_service.git
1717
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
18+
# qrb_ros_audio_service:
19+
# type: git
20+
# url: https://github.com/qualcomm-qrb-ros/qrb_ros_audio_service.git
21+
# version: main
2222
qrb_ros_battery:
2323
type: git
2424
url: https://github.com/qualcomm-qrb-ros/qrb_ros_battery.git
2525
version: main
26-
qrb_ros_benchmark:
27-
type: git
28-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_benchmark.git
29-
version: main
26+
# qrb_ros_benchmark:
27+
# type: git
28+
# url: https://github.com/qualcomm-qrb-ros/qrb_ros_benchmark.git
29+
# version: main
3030
qrb_ros_camera:
3131
type: git
3232
url: https://github.com/qualcomm-qrb-ros/qrb_ros_camera.git
@@ -39,10 +39,6 @@ repositories:
3939
type: git
4040
url: https://github.com/qualcomm-qrb-ros/qrb_ros_follow_path_service.git
4141
version: main
42-
qrb_ros_image_resize:
43-
type: git
44-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_image_resize.git
45-
version: main
4642
qrb_ros_imu:
4743
type: git
4844
url: https://github.com/qualcomm-qrb-ros/qrb_ros_imu.git
@@ -63,10 +59,6 @@ repositories:
6359
type: git
6460
url: https://github.com/qualcomm-qrb-ros/qrb_ros_samples.git
6561
version: main
66-
qrb_ros_sensor_service:
67-
type: git
68-
url: https://github.com/qualcomm-qrb-ros/qrb_ros_sensor_service.git
69-
version: main
7062
qrb_ros_system_monitor:
7163
type: git
7264
url: https://github.com/qualcomm-qrb-ros/qrb_ros_system_monitor.git

0 commit comments

Comments
 (0)