-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from umdlife/feat/build-debians
CI Debian build
- Loading branch information
Showing
5 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Debians | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build_debians: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: psdk_ros2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: dji-sdk/Payload-SDK | ||
ref: 3.5 | ||
path: Payload-SDK | ||
- name: ROS 2 Build Debian Package | ||
id: build | ||
run: | | ||
mv psdk_ros2/debian/create_debians.sh . | ||
sudo ./create_debians.sh | ||
ls . | ||
- uses: d1ceward/draft-assets-release-action@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
${{ steps.build.outputs.INTERFACES_DEB }} | ||
${{ steps.build.outputs.WRAPPER_DEB }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yaml file:///rosdep.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
locale # check for UTF-8 | ||
|
||
apt update && apt install locales | ||
locale-gen en_US en_US.UTF-8 | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | ||
export LANG=en_US.UTF-8 | ||
|
||
apt install software-properties-common | ||
add-apt-repository universe | ||
|
||
apt update && apt install curl -y | ||
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | ||
|
||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
|
||
|
||
apt update | ||
apt install -y --no-install-recommends python3-pip python3-bloom python3-catkin-pkg dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev libusb-1.0-0-dev | ||
ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib | ||
pip3 install rosdep | ||
rosdep init | ||
mv psdk_ros2/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d | ||
mv psdk_ros2/debian/rosdep.yaml / | ||
|
||
# store the current dir | ||
CUR_DIR=$(pwd) | ||
|
||
# Update ROS deps | ||
rosdep update | ||
|
||
rosdep keys --from-paths . --ignore-src --rosdistro humble | \ | ||
xargs rosdep resolve --rosdistro humble | \ | ||
awk '/#apt/{getline; print}' > ./rosdep_requirements.txt | ||
apt install -y --no-install-recommends $(cat ./rosdep_requirements.txt) | ||
|
||
PACKAGE_LIST=( | ||
psdk_ros2/psdk_interfaces \ | ||
psdk_ros2/psdk_wrapper | ||
) | ||
|
||
for PACKAGE in ${PACKAGE_LIST[@]}; do | ||
echo "" | ||
echo "Creating debian for $PACKAGE..." | ||
|
||
# We have to go to the ROS package parent directory | ||
cd $PACKAGE; | ||
bloom-generate rosdebian --ros-distro humble | ||
debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" | ||
|
||
cd .. | ||
DEB_FILE=$(find *.deb); | ||
if ! [[ $? -eq 0 ]]; then | ||
exit 1 | ||
fi | ||
dpkg -i $DEB_FILE | ||
cp $DEB_FILE $CUR_DIR | ||
rm *.deb *.ddeb | ||
cd $CUR_DIR | ||
|
||
done | ||
|
||
echo "INTERFACES_DEB=$(find *interfaces*.deb)" >> $GITHUB_OUTPUT | ||
echo "WRAPPER_DEB=$(find *wrapper*.deb)" >> $GITHUB_OUTPUT | ||
|
||
echo "Complete!" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
psdk_wrapper: | ||
ubuntu: [ros-humble-psdk-wrapper] | ||
psdk_interfaces: | ||
ubuntu: [ros-humble-psdk-interfaces] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
exhale | ||
sphinx==4.5.0 | ||
breathe==4.32.0 | ||
exhale==0.3.6 | ||
myst_parser | ||
breathe | ||
sphinx_rtd_theme | ||
sphinx_rtd_theme | ||
sphinxcontrib-applehelp<=1.0.7 | ||
sphinxcontrib-devhelp<=1.0.5 | ||
sphinxcontrib-jsmath<=1.0.1 | ||
sphinxcontrib_htmlhelp<=2.0.4 | ||
sphinxcontrib-serializinghtml<=1.1.9 | ||
sphinxcontrib-qthelp<=1.0.6 |