From c1f7f827d8d8ecbcb0d680e6079513310137b149 Mon Sep 17 00:00:00 2001 From: Mohd Alqama Shaikh <97826285+aPR0T0@users.noreply.github.com> Date: Fri, 12 Apr 2024 23:30:54 +0530 Subject: [PATCH 1/7] [ CI/CD ] : Create main.yml --- .github/workflows/main.yml | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..120d0aa --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,67 @@ +name: Test Build of MARIO +on: [push, pull_request, workflow_dispatch] + +jobs: + ros2-devel-ci: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + ros_distribution: + - humble + include: + # Humble + - docker_image: ubuntu:jammy + ros_distribution: humble + ros_version: 2 + test_apps: [1_chatter_listener, 2_simulation_dh, 3_simulation_rviz, 4_simulation_gazebo] + container: + image: ${{ matrix.docker_image }} + steps: + # - name: Setup directories + # run: mkdir -p ros_ws/src + # - name: checkout + # uses: actions/checkout@v3 + # with: + # path: ros_ws/src + - name: Setup ROS environment + uses: ros-tooling/setup-ros@0.3.3 + with: + required-ros-distributions: ${{ matrix.ros_distribution }} + - name: Build and Test + uses: ros-tooling/action-ros-ci@0.2.5 + with: + package-name: ${{ matrix.test_apps }} + target-ros2-distro: ${{ matrix.ros_distribution }} + run: | + cd ${{ matrix.test-apps }} + source /opt/ros/humble/setup.bash + colcon build + + build-test: + name: Test Build of MARIO + runs-on: ubuntu-latest + container: + image: espressif/idf:release-v5.1 + strategy: + matrix: + test-apps: [1_servo_set_zero, 2_servo_sweep, 3_microros_rviz, 4_microros_gazebo, 5_servo_test_webserver] + steps: + - name: Force Install GIT latest + run: | + apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common \ + && apt-get update \ + && add-apt-repository -y ppa:git-core/ppa \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y git + - name: Setup Github Actions + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 1 + - name: Test ${{ matrix.test-apps }} + run: | + . $IDF_PATH/export.sh + cd firmware/${{ matrix.test-apps }} + idf.py build From 9bca26127354a0eda541565a65399eb415b74f6f Mon Sep 17 00:00:00 2001 From: Mohd Alqama Shaikh <97826285+aPR0T0@users.noreply.github.com> Date: Fri, 12 Apr 2024 23:39:07 +0530 Subject: [PATCH 2/7] [ Update main.yml ] : Solving empy erro --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 120d0aa..aa7de37 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,6 +34,7 @@ jobs: package-name: ${{ matrix.test_apps }} target-ros2-distro: ${{ matrix.ros_distribution }} run: | + pip3 uninstall em && pip3 install empy cd ${{ matrix.test-apps }} source /opt/ros/humble/setup.bash colcon build From 1b824255aea114a28fc304b5ee04d64c408606f9 Mon Sep 17 00:00:00 2001 From: Mohd Alqama Shaikh <97826285+aPR0T0@users.noreply.github.com> Date: Fri, 12 Apr 2024 23:43:31 +0530 Subject: [PATCH 3/7] [ Update main.yml ] : Now uses ros for microros-esp-idf-components --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa7de37..a3a0a1e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,8 +61,13 @@ jobs: with: submodules: recursive fetch-depth: 1 + - name: Setup ROS environment + uses: ros-tooling/setup-ros@0.3.3 + with: + required-ros-distributions: ${{ matrix.ros_distribution }} - name: Test ${{ matrix.test-apps }} run: | + source /opt/ros/humble/setup.bash . $IDF_PATH/export.sh cd firmware/${{ matrix.test-apps }} idf.py build From f426c336d03f108bad848ad276069187df9aefea Mon Sep 17 00:00:00 2001 From: Mohd Alqama Shaikh <97826285+aPR0T0@users.noreply.github.com> Date: Fri, 12 Apr 2024 23:52:05 +0530 Subject: [PATCH 4/7] [ CI/CD ] : Test Cases for both microros and ros2 with resolution of em error --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a3a0a1e..283531e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: package-name: ${{ matrix.test_apps }} target-ros2-distro: ${{ matrix.ros_distribution }} run: | - pip3 uninstall em && pip3 install empy + pip uninstall em && pip3 uninstall em cd ${{ matrix.test-apps }} source /opt/ros/humble/setup.bash colcon build @@ -67,7 +67,6 @@ jobs: required-ros-distributions: ${{ matrix.ros_distribution }} - name: Test ${{ matrix.test-apps }} run: | - source /opt/ros/humble/setup.bash . $IDF_PATH/export.sh cd firmware/${{ matrix.test-apps }} idf.py build From 25dff6b9b2705280ab2e2a5a616c9ff49714600a Mon Sep 17 00:00:00 2001 From: Mohd Alqama Shaikh <97826285+aPR0T0@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:48:35 -0400 Subject: [PATCH 5/7] Update main.yml Checking if everything is installed --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 283531e..47a03c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,6 +34,7 @@ jobs: package-name: ${{ matrix.test_apps }} target-ros2-distro: ${{ matrix.ros_distribution }} run: | + ./installations.sh pip uninstall em && pip3 uninstall em cd ${{ matrix.test-apps }} source /opt/ros/humble/setup.bash @@ -68,5 +69,6 @@ jobs: - name: Test ${{ matrix.test-apps }} run: | . $IDF_PATH/export.sh + ./installations.sh cd firmware/${{ matrix.test-apps }} idf.py build From bbffbd1cefc81c587fc226124b5e15d10dc668da Mon Sep 17 00:00:00 2001 From: Mohd Alqama Shaikh <97826285+aPR0T0@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:57:15 -0400 Subject: [PATCH 6/7] Update main.yml : Adds some pip dependencies --- .github/workflows/main.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 47a03c6..26117f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,14 +28,21 @@ jobs: uses: ros-tooling/setup-ros@0.3.3 with: required-ros-distributions: ${{ matrix.ros_distribution }} + - name: Setup Github Actions + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 2 - name: Build and Test uses: ros-tooling/action-ros-ci@0.2.5 with: package-name: ${{ matrix.test_apps }} target-ros2-distro: ${{ matrix.ros_distribution }} run: | - ./installations.sh pip uninstall em && pip3 uninstall em + apt install python3-colcon-common-extensions + pip3 install catkin_pkg lark-parser colcon-common-extensions + rosdep install --from-paths src --ignore-src -y cd ${{ matrix.test-apps }} source /opt/ros/humble/setup.bash colcon build @@ -69,6 +76,7 @@ jobs: - name: Test ${{ matrix.test-apps }} run: | . $IDF_PATH/export.sh - ./installations.sh + pip3 install catkin_pkg lark-parser colcon-common-extensions + rosdep install --from-paths src --ignore-src -y cd firmware/${{ matrix.test-apps }} idf.py build From 6ed9ddc1d2ba469f899cd95f714e900bc6be4d13 Mon Sep 17 00:00:00 2001 From: Mohd Alqama Shaikh <97826285+aPR0T0@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:04:22 -0400 Subject: [PATCH 7/7] Update main.yml : Changes em to empy --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26117f0..d7080fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: package-name: ${{ matrix.test_apps }} target-ros2-distro: ${{ matrix.ros_distribution }} run: | - pip uninstall em && pip3 uninstall em + pip uninstall empy && pip3 uninstall empy apt install python3-colcon-common-extensions pip3 install catkin_pkg lark-parser colcon-common-extensions rosdep install --from-paths src --ignore-src -y