diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 5b097c83d..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: 2 - -jobs: - build_and_test: - docker: - - image: ros:rolling - environment: - ROS_WS: "/opt/ros" - UNDERLAY_WS: "/opt/underlay_ws" - OVERLAY_WS: "/opt/overlay_ws" - steps: - - checkout - - run: - name: Set Up Container - command: | - apt update -qq && apt install -y build-essential cmake python3-colcon-common-extensions python3-rosdep libeigen3-dev liboctomap-dev - apt upgrade -y - source `find $ROS_WS -maxdepth 2 -name local_setup.bash | sort | head -1` - rosdep update - mkdir -p $OVERLAY_WS/src/grid_map && mv `find -maxdepth 1 -not -name . -not -name src` $OVERLAY_WS/src/grid_map/ - mkdir -p $UNDERLAY_WS/src && cp $OVERLAY_WS/src/grid_map/tools/ros2_dependencies.repos \ - $UNDERLAY_WS/ros2_dependencies.repos - cd $UNDERLAY_WS && vcs import src < ros2_dependencies.repos - DEBIAN_FRONTEND=noninteractive rosdep install -y --ignore-src \ - --skip-keys "gazebo_ros_pkgs pybind11_vendor ompl slam_toolbox" --from-paths src - MAKEFLAGS="-j4 -l1" colcon build --symlink-install --executor sequential --packages-up-to nav2_costmap_2d - source $UNDERLAY_WS/install/setup.bash - cd $OVERLAY_WS && DEBIAN_FRONTEND=noninteractive rosdep install -y --ignore-src --from-paths src --skip-keys "octomap_server" - - run: - name: Debug Build - command: | - source $UNDERLAY_WS/install/setup.bash - cd $OVERLAY_WS && MAKEFLAGS="-j4 -l1" colcon build --executor sequential - no_output_timeout: 30m - - run: - name: Run Tests - command: | - source $UNDERLAY_WS/install/setup.bash - cd $OVERLAY_WS - colcon test --parallel-workers 1 - colcon test-result --verbose -workflows: - version: 2 - ros_build: - jobs: - - build_and_test diff --git a/.github/workflows/colcon.yaml b/.github/workflows/colcon.yaml new file mode 100644 index 000000000..ea0e2b89f --- /dev/null +++ b/.github/workflows/colcon.yaml @@ -0,0 +1,49 @@ +name: Colcon Build Test +on: + push: + branches: + - 'rolling' + - 'iron' + - 'humble' + pull_request: + branches: + - '*' +jobs: + build-test: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + config: + - {rosdistro: 'rolling', container: 'ros:rolling'} + container: ${{ matrix.config.container }} + steps: + - uses: actions/checkout@v4 + with: + path: src/grid_map + - name: Pull in repos with vcs + run: | + apt-get update + vcs import --shallow --skip-existing --input grid_map/tools/ros2_dependencies.repos + shell: bash + working-directory: src + - name: Install Dependencies with Rosdep + run: | + apt update + rosdep update + source /opt/ros/${{matrix.config.rosdistro}}/setup.bash + rosdep install --from-paths src --ignore-src -y --skip-keys "slam_toolbox turtlebot3_gazebo gazebo_ros_pkgs" + shell: bash + - name: Colcon Build (Release) + run: | + source /opt/ros/${{matrix.config.rosdistro}}/setup.bash + colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map + shell: bash + - name: Test + run: | + source /opt/ros/${{matrix.config.rosdistro}}/setup.bash + source install/setup.bash + colcon test --return-code-on-test-failure --paths src/grid_map/* --event-handlers=console_cohesion+ + colcon test-result --all --verbose + shell: bash +