diff --git a/.github/workflows/ci-action-ros.yaml b/.github/workflows/ci-action-ros.yaml new file mode 100644 index 0000000..8d9a008 --- /dev/null +++ b/.github/workflows/ci-action-ros.yaml @@ -0,0 +1,48 @@ +name: Ouroboros-ROS-CI +run-name: Ouroboros-ROS-CI +on: + push: + branches: main + pull_request: + branches: + - main + - develop +jobs: + Ouroboros-ROS-CI: + runs-on: ubuntu-latest + container: ros:noetic-ros-base-focal + steps: + - name: Update git + run: sudo apt update && sudo apt install -y git + - name: Check out repository code + uses: actions/checkout@v4 + with: + path: src/ouroboros_repo + submodules: recursive + - name: Dependencies + run: | + sudo apt install -y libeigen3-dev pkg-config ros-noetic-cv-bridge python3-pip + sudo pip install --upgrade pip + sudo python3 -m pip install catkin_tools empy catkin_pkg + - name: Install Ouroboros + run: pwd && ls && cd src/ouroboros_repo && pwd && pip install . + + - name: Install ROS packages with rosdep + shell: bash + run: | + source /opt/ros/noetic/setup.bash + rosdep update + rosdep install --from-paths src --ignore-src -r -s # do a dry-run first + rosdep install --from-paths src --ignore-src -r -y + - name: catkin build + shell: bash + run: | + source /opt/ros/noetic/setup.bash + catkin build -s + - name: Run test script + shell: bash + run: | + source devel/setup.bash + cd src/ouroboros_repo + pytest extra/ouroboros_ros/tests + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.github/workflows/ci-action.yml b/.github/workflows/ci-action.yml index cd7b125..00c57e4 100644 --- a/.github/workflows/ci-action.yml +++ b/.github/workflows/ci-action.yml @@ -33,52 +33,3 @@ jobs: - name: Run test script run: cd ${{ github.workspace }}/ouroboros_repo && pytest --ignore=third_party --ignore=extra/ouroboros_ros - run: echo "🍏 This job's status is ${{ job.status }}." - - Ouroboros-ROS-CI: - runs-on: ubuntu-20.04 - steps: - - name: Check out repository code - uses: actions/checkout@v4 - with: - path: ouroboros_repo - 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 -y - curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - - sudo apt-get update -qq - sudo apt-get install -y ros-noetic-desktop-full - sudo apt-get install dpkg - sudo apt-get install -y python3-rosinstall python3-rosinstall-generator build-essential - sudo apt-get install -y python3-catkin-tools - sudo apt-get install -y python3-rosdep - sudo apt-get install -y python3-wstool - - name: Check if ROS installed - run: | - if [ -d "/opt/ros/noetic" ]; then - echo "ROS Noetic is installed!" - else - echo "ROS Noetic is NOT installed!" - fi - - name: Install ROS packages with rosdep - run: | - source /opt/ros/noetic/setup.bash - sudo rosdep init - rosdep update - mkdir -p ~/catkin_ws/src - mv ${{ github.workspace }}/ouroboros_repo ~/catkin_ws/src/ - cd ~/catkin_ws - rosdep install --from-paths src --ignore-src -r -s # do a dry-run first - rosdep install --from-paths src --ignore-src -r -y - - name: catkin build - run: | - source /opt/ros/noetic/setup.bash - cd ~/catkin_ws - catkin build -s - source devel/setup.bash - - name: Install Ouroboros - run: cd ~/catkin_ws/src/ouroboros_repo && python -m pip install --upgrade pip && pip install . - - name: Run test script - run: cd ~/catkin_ws/src/ouroboros_repo && source ~/catkin_ws/devel/setup.bash && pytest --ignore=third_party - - run: echo "🍏 This job's status is ${{ job.status }}."