ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I've got something mostly working here: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/catkin_build.yml (see also https://github.com/lucasw/frei0r_image/actions )

name: ROS CI

on: [push]

jobs:    
  build:
    runs-on: ubuntu-18.04
    env:
      ROS_CI_DESKTOP: "`lsb_release -cs`"  # e.g. [trusty|xenial|...]
      CI_SOURCE_PATH: $(pwd)
      ROSINSTALL_FILE: $CI_SOURCE_PATH/dependencies.rosinstall
      CATKIN_OPTIONS: $CI_SOURCE_PATH/catkin.options
      ROS_PARALLEL_JOBS: '-j8 -l6'
      # Set the python path manually to include /usr/-/python2.7/dist-packages
      # as this is where apt-get installs python packages.
      PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
      ROS_DISTRO: melodic
    steps:
      - uses: actions/checkout@v1
      - name: Install ROS
        run: |
            sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
            sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            sudo apt-get update -qq
            sudo apt-get install dpkg
            sudo apt-get install -y python-catkin-tools python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-cv-bridge ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-roslint
            sudo apt-get install -y ros-$ROS_DISTRO-nodelet-core ros-$ROS_DISTRO-ddynamic-reconfigure frei0r-plugins-dev
            source /opt/ros/$ROS_DISTRO/setup.bash
            # Prepare rosdep to install dependencies.
            sudo rosdep init
            rosdep update --include-eol-distros  # Support EOL distros.
      - name: build
        run: |
          source /opt/ros/$ROS_DISTRO/setup.bash
          mkdir -p ~/catkin_ws/src
          cd ~/catkin_ws
          catkin build
          source devel/setup.bash
          cd ~/catkin_ws/src
          ln -s ~/work  # $CI_SOURCE_PATH
          # echo "::warning $CI_SOURCE_PATH"
          # echo "::warning `ls -l`"
          cd ..
          catkin build
      - name: lint
        run: |
          cd ~/catkin_ws
          catkin build frei0r_image --no-deps --catkin-make-args roslint

It would be fantastic if there was a ubuntu-18.04 target image that already has melodic on it to speed up the build. (In other contexts I've seen downloading a large custom pre-installed image is slower than starting with a clean base image and installing everything from highly available apt repos, but I'm sure that can vary wildly)

I'm not sure out to get commands like echo or ls to have output show up in the actions log.

I think I'm doing several things manually that are built in but I wasn't using correctly- the environmental variables don't seem to be getting set properly so I circumvented that with knowledge that the source is checked out to ~/work, which may not be true forever.

I've got something mostly working here: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/catkin_build.yml (see also https://github.com/lucasw/frei0r_image/actions )

name: ROS CI

on: [push]

jobs:    
  build:
    runs-on: ubuntu-18.04
    env:
      ROS_CI_DESKTOP: "`lsb_release -cs`"  # e.g. [trusty|xenial|...]
      CI_SOURCE_PATH: $(pwd)
      ROSINSTALL_FILE: $CI_SOURCE_PATH/dependencies.rosinstall
      CATKIN_OPTIONS: $CI_SOURCE_PATH/catkin.options
      ROS_PARALLEL_JOBS: '-j8 -l6'
      # Set the python path manually to include /usr/-/python2.7/dist-packages
      # as this is where apt-get installs python packages.
      PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
      ROS_DISTRO: melodic
    steps:
      - uses: actions/checkout@v1
      - name: Install ROS
        run: |
            sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
            sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            sudo apt-get update -qq
            sudo apt-get install dpkg
            sudo apt-get install -y python-catkin-tools python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-cv-bridge ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-roslint
            sudo apt-get install -y ros-$ROS_DISTRO-nodelet-core ros-$ROS_DISTRO-ddynamic-reconfigure frei0r-plugins-dev
            source /opt/ros/$ROS_DISTRO/setup.bash
            # Prepare rosdep to install dependencies.
            sudo rosdep init
            rosdep update --include-eol-distros  # Support EOL distros.
      - name: build
        run: |
          source /opt/ros/$ROS_DISTRO/setup.bash
          mkdir -p ~/catkin_ws/src
          cd ~/catkin_ws
          catkin build
          source devel/setup.bash
          cd ~/catkin_ws/src
          ln -s ~/work  # $CI_SOURCE_PATH
          # echo "::warning $CI_SOURCE_PATH"
          # echo "::warning `ls -l`"
          cd ..
          catkin build
      - name: lint
        run: |
          cd ~/catkin_ws
          catkin build frei0r_image --no-deps --catkin-make-args roslint

It would be fantastic if there was a ubuntu-18.04 target image that already has melodic on it to speed up the build. (In other contexts I've seen downloading a large custom pre-installed image is slower than starting with a clean base image and installing everything from highly available apt repos, but I'm sure that can vary wildly)

I'm not sure out to get commands like echo or ls to have output show up in the actions log.

I think I'm doing several things manually that are built in but I wasn't using correctly- all the environmental variables don't seem to be getting set properly so I circumvented that with knowledge that the source is checked out to ~/work, which may not be true forever.

I've got something mostly working here: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/catkin_build.yml (see also https://github.com/lucasw/frei0r_image/actions )

name: ROS CI

on: [push]

jobs:    
  build:
    runs-on: ubuntu-18.04
    env:
      ROS_CI_DESKTOP: "`lsb_release -cs`"  # e.g. [trusty|xenial|...]
      CI_SOURCE_PATH: $(pwd)
      ROSINSTALL_FILE: $CI_SOURCE_PATH/dependencies.rosinstall
      CATKIN_OPTIONS: $CI_SOURCE_PATH/catkin.options
      ROS_PARALLEL_JOBS: '-j8 -l6'
      # Set the python path manually to include /usr/-/python2.7/dist-packages
      # as this is where apt-get installs python packages.
      PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
      ROS_DISTRO: melodic
    steps:
      - uses: actions/checkout@v1
      - name: Install ROS
        run: |
            sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
            sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            sudo apt-get update -qq
            sudo apt-get install dpkg
            sudo apt-get install -y python-catkin-tools python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-cv-bridge ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-roslint
            sudo apt-get install -y ros-$ROS_DISTRO-nodelet-core ros-$ROS_DISTRO-ddynamic-reconfigure frei0r-plugins-dev
            source /opt/ros/$ROS_DISTRO/setup.bash
            # Prepare rosdep to install dependencies.
            sudo rosdep init
            rosdep update --include-eol-distros  # Support EOL distros.
      - name: build
        run: |
          source /opt/ros/$ROS_DISTRO/setup.bash
          mkdir -p ~/catkin_ws/src
          cd ~/catkin_ws
          catkin build
          source devel/setup.bash
          cd ~/catkin_ws/src
          ln -s ~/work  # $CI_SOURCE_PATH
          # echo "::warning $CI_SOURCE_PATH"
          # echo "::warning `ls -l`"
          cd ..
          catkin build
      - name: lint
        run: |
          cd ~/catkin_ws
          catkin build frei0r_image --no-deps --catkin-make-args roslint

It would be fantastic if there was a ubuntu-18.04 target image that already has melodic on it to speed up the build. (In other contexts I've seen downloading a large custom pre-installed image is slower than starting with a clean base image and installing everything from highly available apt repos, but I'm sure that can vary wildly)

I'm not sure out to get commands like echo or ls to have output show up in the actions log.

I think I'm doing several things manually that are built in but I wasn't using correctly- all the environmental variables don't seem to be getting set properly so I circumvented that with knowledge that the source is checked out to ~/work, which may not be true forever.

Here is a Ubuntu 20.04 noetic example: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/ubuntu_20_04.yml

I've got something mostly working here: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/catkin_build.yml https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/ubuntu_18_04.yml (see also https://github.com/lucasw/frei0r_image/actions )

name: ROS CI

on: [push]

jobs:    
  build:
    runs-on: ubuntu-18.04
    env:
      ROS_CI_DESKTOP: "`lsb_release -cs`"  # e.g. [trusty|xenial|...]
      CI_SOURCE_PATH: $(pwd)
      ROSINSTALL_FILE: $CI_SOURCE_PATH/dependencies.rosinstall
      CATKIN_OPTIONS: $CI_SOURCE_PATH/catkin.options
      ROS_PARALLEL_JOBS: '-j8 -l6'
      # Set the python path manually to include /usr/-/python2.7/dist-packages
      # as this is where apt-get installs python packages.
      PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
      ROS_DISTRO: melodic
    steps:
      - uses: actions/checkout@v1
      - name: Install ROS
        run: |
            sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
            sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            sudo apt-get update -qq
            sudo apt-get install dpkg
            sudo apt-get install -y python-catkin-tools python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-cv-bridge ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-roslint
            sudo apt-get install -y ros-$ROS_DISTRO-nodelet-core ros-$ROS_DISTRO-ddynamic-reconfigure frei0r-plugins-dev
            source /opt/ros/$ROS_DISTRO/setup.bash
            # Prepare rosdep to install dependencies.
            sudo rosdep init
            rosdep update --include-eol-distros  # Support EOL distros.
      - name: build
        run: |
          source /opt/ros/$ROS_DISTRO/setup.bash
          mkdir -p ~/catkin_ws/src
          cd ~/catkin_ws
          catkin build
          source devel/setup.bash
          cd ~/catkin_ws/src
          ln -s ~/work  # $CI_SOURCE_PATH
          # echo "::warning $CI_SOURCE_PATH"
          # echo "::warning `ls -l`"
          cd ..
          catkin build
      - name: lint
        run: |
          cd ~/catkin_ws
          catkin build frei0r_image --no-deps --catkin-make-args roslint

It would be fantastic if there was a ubuntu-18.04 target image that already has melodic on it to speed up the build. (In other contexts I've seen downloading a large custom pre-installed image is slower than starting with a clean base image and installing everything from highly available apt repos, but I'm sure that can vary wildly)

I'm not sure out to get commands like echo or ls to have output show up in the actions log.

I think I'm doing several things manually that are built in but I wasn't using correctly- all the environmental variables don't seem to be getting set properly so I circumvented that with knowledge that the source is checked out to ~/work, which may not be true forever.

Here is a Ubuntu 20.04 noetic example: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/ubuntu_20_04.yml

I've got something mostly working here: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/ubuntu_18_04.yml https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/ubuntu_20_04.yml (see also https://github.com/lucasw/frei0r_image/actions )for how the results are reported)

name: Noetic Ubuntu 20.04

name: ROS CI

on: [push]

jobs:    
on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-18.04
ubuntu-20.04
    env:
      ROS_CI_DESKTOP: "`lsb_release -cs`"  # e.g. [trusty|xenial|...]
      CI_SOURCE_PATH: $(pwd)
      ROSINSTALL_FILE: $CI_SOURCE_PATH/dependencies.rosinstall
      CATKIN_OPTIONS: $CI_SOURCE_PATH/catkin.options
      ROS_PARALLEL_JOBS: '-j8 -l6'
      # Set the python path manually to include /usr/-/python2.7/dist-packages
      # as this is where apt-get installs python packages.
      PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
      ROS_DISTRO: melodic
noetic
    steps:
      - uses: actions/checkout@v1
actions/checkout@v2
      - name: Install Non-ROS Dependencies
        run: |
            ls -l $GITHUB_WORKSPACE
            sudo apt-get install -y frei0r-plugins-dev
      - name: Install ROS
        run: |
            sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
            sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            sudo apt-get update -qq
            sudo apt-get install dpkg
            sudo apt-get install -y python-catkin-tools python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-cv-bridge ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-roslint
            sudo apt-get install -y ros-$ROS_DISTRO-nodelet-core ros-$ROS_DISTRO-ddynamic-reconfigure frei0r-plugins-dev
python3-catkin-pkg
            sudo apt-get install -y python3-catkin-tools
            sudo apt-get install -y python3-osrf-pycommon
            sudo apt-get install -y python3-rosdep
            sudo apt-get install -y python3-wstool
            sudo apt-get install -y ros-cmake-modules
            sudo apt-get install -y ros-$ROS_DISTRO-catkin
            source /opt/ros/$ROS_DISTRO/setup.bash
            # Prepare rosdep to install dependencies.
  - name: Install ROS packages with rosdep
        run: |
          source /opt/ros/$ROS_DISTRO/setup.bash
          sudo rosdep init
           rosdep update --include-eol-distros  # Support EOL distros.
      - name: build
        run: |
          source /opt/ros/$ROS_DISTRO/setup.bash
update
          mkdir -p ~/catkin_ws/src
          ln -s $GITHUB_WORKSPACE ~/catkin_ws/src/frei0r_image
          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/$ROS_DISTRO/setup.bash
          cd ~/catkin_ws
          catkin build --no-status
          source devel/setup.bash
          cd ~/catkin_ws/src
          ln -s ~/work  # $CI_SOURCE_PATH
          # echo "::warning $CI_SOURCE_PATH"
          # echo "::warning `ls -l`"
          cd ..
          catkin build
      - name: lint
        run: |
          cd ~/catkin_ws
          catkin build frei0r_image --no-deps --catkin-make-args roslint

It would be fantastic if there was a ubuntu-18.04ubuntu-20.04 target image that already has melodic noetic on it to speed up the build. (In other contexts I've seen downloading a large custom pre-installed image is slower than starting with a clean base image and installing everything from highly available apt repos, but I'm sure that can vary wildly)wildly).

I'm not sure out to get commands like echo or ls to have output show up in the actions log.

I think I'm doing several things manually that are built in but I wasn't using correctly- all the environmental variables don't seem to be getting set properly so I circumvented that with knowledge that the source is checked out to ~/work, which may not be true forever.

Here is a Ubuntu 20.04 noetic example: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/ubuntu_20_04.yml

I've got something working here: https://github.com/lucasw/frei0r_image/blob/master/.github/workflows/ubuntu_20_04.yml (see also https://github.com/lucasw/frei0r_image/actions for how the results are reported)

name: Noetic Ubuntu 20.04

20.04
on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-20.04
    env:
      ROS_CI_DESKTOP: "`lsb_release -cs`"  # e.g. [trusty|xenial|...]
      ROS_DISTRO: noetic
    steps:
      - uses: actions/checkout@v2
      - name: Install Non-ROS Dependencies
        run: |
            ls -l $GITHUB_WORKSPACE
            sudo apt-get install -y frei0r-plugins-dev
      - name: Install ROS
        run: |
            sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
            sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            sudo apt-get update -qq
            sudo apt-get install dpkg
            sudo apt-get install -y python3-catkin-pkg
            sudo apt-get install -y python3-catkin-tools
            sudo apt-get install -y python3-osrf-pycommon
            sudo apt-get install -y python3-rosdep
            sudo apt-get install -y python3-wstool
            sudo apt-get install -y ros-cmake-modules
            sudo apt-get install -y ros-$ROS_DISTRO-catkin
            source /opt/ros/$ROS_DISTRO/setup.bash
      - name: Install ROS packages with rosdep
        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/frei0r_image
          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/$ROS_DISTRO/setup.bash
          cd ~/catkin_ws
          catkin build --no-status
          source devel/setup.bash
      - name: lint
        run: |
          cd ~/catkin_ws
          catkin build frei0r_image --no-deps --catkin-make-args roslint

It would be fantastic if there was a ubuntu-20.04 target image that already has noetic on it to speed up the build. (In other contexts I've seen downloading a large custom pre-installed image is slower than starting with a clean base image and installing everything from highly available apt repos, but I'm sure that can vary wildly).