From c4d040efc971d53dcd4acca55a5bd1f3bb54dffe Mon Sep 17 00:00:00 2001 From: Markus Hofbauer Date: Wed, 25 Nov 2020 16:29:26 +0100 Subject: [PATCH] add installation script --- .github/workflows/ci.yml | 2 ++ install_dependencies.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 install_dependencies.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76117f8..09bba37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,8 @@ jobs: ros-version: [melodic, noetic] steps: - uses: actions/checkout@v2 + - name: Setup + run: ./install_dependencies.sh - name: Init Workspace run: | mkdir -p $GITHUB_WORKSPACE/../catkin_ws/src diff --git a/install_dependencies.sh b/install_dependencies.sh new file mode 100755 index 0000000..e27a8df --- /dev/null +++ b/install_dependencies.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROS_VERSION=$(rosversion -d) +if [ "$ROS_VERSION" = "noetic" ]; then + PYTHON_SUFFIX=3 +else + PYTHON_SUFFIX="" +fi + +sudo apt-get update +sudo apt-get install --no-install-recommends -y \ + python$PYTHON_SUFFIX-osrf-pycommon \ + python$PYTHON_SUFFIX-catkin-tools