Update README.md #3
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: Noetic Ubuntu 20.04 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
env: | |
ROS_CI_DESKTOP: "`lsb_release -cs`" | |
ROS_DISTRO: # Add distro i.e. noetic | |
PACKAGE_NAME: # Add package name | |
PACKAGE_DIR: # Add where the requirements folder level will be, usally the same PACKAGE_NAME | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install ROS | |
run: | | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt install curl | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - | |
sudo apt-get update -qq | |
sudo apt-get install dpkg | |
sudo apt-get install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential | |
sudo apt-get install -y ros-$ROS_DISTRO-catkin | |
sudo apt-get install -y ros-noetic-ros-base | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
- name: Install ROS packages | |
run: | | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
sudo rosdep init | |
rosdep update | |
mkdir -p ~/catkin_ws/src/ | |
ln -s $GITHUB_WORKSPACE ~/catkin_ws/src/$PACKAGE_NAME | |
cd ~/catkin_ws | |
rosdep install --from-paths src --ignore-src -r -s #dry run | |
rosdep install --from-paths src --ignore-src -ry #dry run | |
- name: Python Dependencies | |
run: | | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
cd ~/catkin_ws/src/$PACKAGE_DIR | |
pip install -r requirements.txt | |
# - name: Clone Dependencies | |
# # Clones private repo of organization, make sure you follow the steps listed here: https://stackoverflow.com/questions/57612428/cloning-private-github-repository-within-organisation-in-actions/70283191#70283191 | |
# run: | | |
# eval `ssh-agent -s` | |
# ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' | |
# mkdir -p ~/catkin_ws/src/ | |
# cd ~/catkin_ws/src/ | |
# git clone [email protected]:AUVSL/openai_ros.git | |
# ls ~/catkin_ws/src/ | |
- name: catkin_make | |
run: | | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
cd ~/catkin_ws | |
catkin_make | |
source devel/setup.bash | |
- name: Compile Debian | |
run: | | |
sudo apt-get install -y python3-bloom | |
sudo apt-get install -y fakeroot | |
sudo apt-get install -y dh-make | |
cd ~/catkin_ws/src/$PACKAGE_DIR | |
bloom-generate rosdebian --ros-distro $ROS_DISTRO | |
fakeroot debian/rules binary | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release | |
path: ~/catkin_ws/**/*.deb | |
retention-days: 5 |