From 8940a57938e91819acf1f4d107a3b0c416956f6b Mon Sep 17 00:00:00 2001 From: Mohammad Durrani Date: Tue, 23 Dec 2025 17:17:29 -0500 Subject: [PATCH] added dependencies script and requirements.txt --- .github/workflows/main.yml | 24 +++++++++++++++++------- dependencies.sh | 11 +++++++++++ requirements.txt | 5 +++++ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100755 dependencies.sh create mode 100644 requirements.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 270a6ff..ddbfcdd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,27 +2,37 @@ name: ROS2 Build on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: + jobs: build: runs-on: ubuntu-22.04 container: image: ros:humble-ros-base - + steps: - name: Checkout repository - uses: actions/checkout@v4 - - name: Install dependencies + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install Python dependencies + run: python3 -m pip install -r requirements.txt + + - name: Install system dependencies run: | apt-get update - apt-get install -y python3-colcon-common-extensions + bash dependencies.sh rosdep update rosdep install --from-paths . --ignore-src -r -y shell: bash - + - name: Build workspace run: | source /opt/ros/humble/setup.bash diff --git a/dependencies.sh b/dependencies.sh new file mode 100755 index 0000000..a341778 --- /dev/null +++ b/dependencies.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -euo pipefail + +pkgs=( + python3-colcon-common-extensions +) + +for pkg in "${pkgs[@]}"; do + apt-get install -y "$pkg" +done \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2d920ce --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +pygame +catkin_pkg +empy==3.3.4 +lark +numpy \ No newline at end of file