From 4c6d64a00e237351aad38107ec6851e93f926e8f Mon Sep 17 00:00:00 2001 From: Michael Ripperger Date: Mon, 13 Mar 2023 20:17:14 -0500 Subject: [PATCH] Use ROS-independent version of ICI (#861) * Use ROS-independent version of ICI * Added liboctomap-dev as dependency and ignore rosdep install * Use variables for ccache directory * Standardize rosdep skip list * Added clang-tidy dependency * Remove taskflow from rosdep exclusion list * Added FCL 6.1 to dependencies file * Changed from .rosinstall to .repos * Added name to build stage of clang-tidy job * Added catkin to rosdep skip list * Added octomap to source dependencies * Consolidated regular Ubuntu jobs into single matrix job * Set fail-fast false * Simplified nightly workflow * Updated code coverage command * Combined code coverage and clang tidy jobs * Simplify clang format job * Remove bionic build * Support CI build on multiple versions of Windows * Updated job names * Added RICB to windows vcpkg list * Add gtest to windows build * Remove octomap and fcl from vcpkg install * Add custom window dependencies --------- Co-authored-by: Levi Armstrong --- .github/workflows/add_ros_apt_sources.sh | 4 + .github/workflows/api_docs.yml | 2 +- .github/workflows/benchmarking.yml | 28 ++--- .github/workflows/bionic_build.yml | 106 ------------------ .github/workflows/clang_format.yml | 45 ++------ .github/workflows/clang_tidy.yml | 61 ---------- .github/workflows/cmake_format.yml | 3 +- .github/workflows/code_quality.yml | 73 ++++++++++++ .github/workflows/codecov.yml | 44 -------- .github/workflows/nightly.yml | 57 ++++------ .../workflows/{focal_build.yml => ubuntu.yml} | 50 +++++---- .../{windows_2019.yml => windows.yml} | 29 +++-- .../workflows/windows_dependencies.repos | 0 README.md | 2 +- dependencies.repos | 16 +++ ....rosinstall => dependencies_with_ext.repos | 0 16 files changed, 179 insertions(+), 341 deletions(-) create mode 100755 .github/workflows/add_ros_apt_sources.sh delete mode 100644 .github/workflows/bionic_build.yml delete mode 100644 .github/workflows/clang_tidy.yml create mode 100644 .github/workflows/code_quality.yml delete mode 100644 .github/workflows/codecov.yml rename .github/workflows/{focal_build.yml => ubuntu.yml} (63%) rename .github/workflows/{windows_2019.yml => windows.yml} (73%) rename dependencies.rosinstall => .github/workflows/windows_dependencies.repos (100%) create mode 100644 dependencies.repos rename dependencies_with_ext.rosinstall => dependencies_with_ext.repos (100%) diff --git a/.github/workflows/add_ros_apt_sources.sh b/.github/workflows/add_ros_apt_sources.sh new file mode 100755 index 00000000000..53a27e4be7f --- /dev/null +++ b/.github/workflows/add_ros_apt_sources.sh @@ -0,0 +1,4 @@ +#! /bin/bash +sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' +curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - +apt update -qq diff --git a/.github/workflows/api_docs.yml b/.github/workflows/api_docs.yml index fcf8ac2b4ad..87c6504334a 100644 --- a/.github/workflows/api_docs.yml +++ b/.github/workflows/api_docs.yml @@ -1,4 +1,4 @@ -name: DeployDocumentation +name: Deploy Documentation on: push: diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index 1f5e5daba45..ead79fa2ff8 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -9,14 +9,8 @@ on: workflow_dispatch: jobs: - industrial_ci: - name: ${{ matrix.env.CI_NAME }} + benchmark: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - env: - - {CI_NAME: Focal-Benchmark} steps: - uses: actions/checkout@v2 @@ -30,18 +24,20 @@ jobs: - name: ccache cache files uses: actions/cache@v1.1.0 with: - path: ${{ matrix.env.CI_NAME }}/.ccache - key: ${{ matrix.env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + path: benchmark/.ccache + key: benchmark-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} restore-keys: | - ${{ matrix.env.CI_NAME }}-ccache- + benchmark-ccache- - - uses: 'ros-industrial/industrial_ci@master' + - uses: 'marip8/industrial_ci@2f4c8ab919f0aafddd514e586325defabd2911ea' env: - ROS_DISTRO: noetic - UPSTREAM_WORKSPACE: 'dependencies.rosinstall' - ROSDEP_SKIP_KEYS: "bullet ros_industrial_cmake_boilerplate fcl iwyu" - DOCKER_IMAGE: "rosindustrial/tesseract:noetic" - CCACHE_DIR: "${{ github.workspace }}/${{ matrix.env.CI_NAME }}/.ccache" + DOCKER_IMAGE: ubuntu:20.04 + ROS_DISTRO: false + ADDITIONAL_DEBS: 'curl lsb-release liboctomap-dev' + AFTER_INIT: './.github/workflows/add_ros_apt_sources.sh' + UPSTREAM_WORKSPACE: 'dependencies.repos' + ROSDEP_SKIP_KEYS: "fcl opw_kinematics ros_industrial_cmake_boilerplate iwyu octomap catkin" + CCACHE_DIR: "${{ github.workspace }}/benchmark/.ccache" UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=OFF -DTESSERACT_ENABLE_BENCHMARKING=ON -DTESSERACT_ENABLE_RUN_BENCHMARKING=ON -DBENCHMARK_ARGS=CI_ONLY" DOCKER_RUN_OPTS: '-v ${{ github.workspace }}/benchmarks:/root/benchmarks' diff --git a/.github/workflows/bionic_build.yml b/.github/workflows/bionic_build.yml deleted file mode 100644 index de7da3be6ae..00000000000 --- a/.github/workflows/bionic_build.yml +++ /dev/null @@ -1,106 +0,0 @@ -name: Bionic-Build - -on: - push: - branches: - - master - pull_request: - paths: - - 'tesseract**' - - '.github/workflows/bionic_build.yml' - - '**.rosinstall' - schedule: - - cron: '0 5 * * *' - release: - types: - - released - -jobs: - industrial_ci: - name: Melodic - runs-on: ubuntu-latest - env: - CI_NAME: Bionic-Build - CCACHE_DIR: "/home/runner/work/tesseract/tesseract/Bionic-Build/.ccache" - ROS_DISTRO: melodic - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - PUSH_DOCKER_IMAGE: ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }} - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Free disk space - continue-on-error: true - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker rmi $(docker image ls -aq) - df -h - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - - name: ccache cache files - continue-on-error: true - uses: actions/cache@v1.1.0 - with: - path: ${{ env.CI_NAME }}/.ccache - key: ${{ env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} - restore-keys: | - ${{ env.CI_NAME }}-ccache- - - - name: Login to Github container registry - uses: docker/login-action@v1 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Docker meta-information - id: meta - uses: docker/metadata-action@v3 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - flavor: | - latest=false - prefix= - suffix= - tags: | - type=ref,event=branch,prefix=${{ env.ROS_DISTRO }}- - type=semver,pattern={{major}}.{{minor}},prefix=${{ env.ROS_DISTRO }}- - - - name: Set build type - run: | - if [[ "${{ env.PUSH_DOCKER_IMAGE }}" = true ]] - then - echo "BUILD_TYPE=Release" >> $GITHUB_ENV - else - echo "BUILD_TYPE=Debug" >> $GITHUB_ENV - fi - - - name: Build repository - uses: 'ros-industrial/industrial_ci@master' - env: - OS_NAME: ubuntu - OS_CODE_NAME: bionic - ROS_REPO: main - UPSTREAM_WORKSPACE: 'dependencies.rosinstall' - ROSDEP_SKIP_KEYS: 'bullet ros_industrial_cmake_boilerplate iwyu fcl taskflow' - DOCKER_IMAGE: 'rosindustrial/tesseract:${{ env.ROS_DISTRO }}' - PARALLEL_BUILDS: 1 - PARALLEL_TESTS: false - PREFIX: ${{ github.repository }}_ - UPSTREAM_CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Release' - TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DTESSERACT_ENABLE_TESTING=ON -DTESSERACT_WARNINGS_AS_ERRORS=OFF" - AFTER_SCRIPT: 'catkin build -w $target_ws --no-deps --verbose tesseract_collision tesseract_common tesseract_environment tesseract_geometry tesseract_kinematics tesseract_scene_graph tesseract_srdf tesseract_state_solver tesseract_urdf --make-args test' - DOCKER_COMMIT: ${{ steps.meta.outputs.tags }} - - - name: Push post-build Docker - if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }} - run: docker push ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml index a827fe197a1..55a0c3ae2b6 100644 --- a/.github/workflows/clang_format.yml +++ b/.github/workflows/clang_format.yml @@ -13,44 +13,15 @@ on: - cron: '0 5 * * *' jobs: - industrial_ci: - name: Format + clang_format: runs-on: ubuntu-latest - env: - CI_NAME: Clang-Format - OS_NAME: ubuntu - OS_CODE_NAME: bionic - ROS_DISTRO: melodic - ROS_REPO: main - ROSDEP_SKIP_KEYS: "bullet fcl" - CLANG_FORMAT_CHECK: file - CLANG_FORMAT_VERSION: 8 - DOCKER_IMAGE: "rosindustrial/tesseract:melodic" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 - - name: Free Disk Space + - name: Run clang format run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker rmi $(docker image ls -aq) - df -h - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - - name: ccache cache files - uses: actions/cache@v1.1.0 - with: - path: ${{ env.CI_NAME }}/.ccache - key: ${{ env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} - restore-keys: | - ${{ env.CI_NAME }}-ccache- - - - uses: 'ros-industrial/industrial_ci@master' - env: ${{env}} + sudo apt update + sudo apt install -y git clang-format + ./.run-clang-format + output=$(git diff) + if [ -n "$output" ]; then exit 1; else exit 0; fi diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml deleted file mode 100644 index 63558220de1..00000000000 --- a/.github/workflows/clang_tidy.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Clang-Tidy - -on: - push: - branches: - - master - pull_request: - paths: - - 'tesseract**' - - '.github/workflows/clang_tidy.yml' - - '.clang-tidy' - schedule: - - cron: '0 5 * * *' - -jobs: - industrial_ci: - name: ClangTidy - runs-on: ubuntu-latest - env: - CI_NAME: Clang-Tidy - OS_NAME: ubuntu - OS_CODE_NAME: focal - ROS_DISTRO: noetic - ROS_REPO: main - UPSTREAM_WORKSPACE: 'dependencies.rosinstall' - ROSDEP_SKIP_KEYS: "bullet fcl ompl orocos_kdl python-numpy ifopt python descartes_opw descartes_samplers descartes_light opw_kinematics ros_industrial_cmake_boilerplate iwyu taskflow" - DOCKER_IMAGE: "rosindustrial/tesseract:noetic" - CCACHE_DIR: "/home/runner/work/tesseract/tesseract/Clang-Tidy/.ccache" - NOT_TEST_BUILD: true - UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" - TARGET_CMAKE_ARGS: "-DTESSERACT_ENABLE_CLANG_TIDY=ON -DTESSERACT_ENABLE_TESTING=ON" - steps: - - uses: actions/checkout@v2 - - - name: Free Disk Space - continue-on-error: true - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker rmi $(docker image ls -aq) - df -h - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - - name: ccache cache files - continue-on-error: true - uses: actions/cache@v1.1.0 - with: - path: ${{ env.CI_NAME }}/.ccache - key: ${{ env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} - restore-keys: | - ${{ env.CI_NAME }}-ccache- - - - uses: 'ros-industrial/industrial_ci@master' - env: ${{env}} diff --git a/.github/workflows/cmake_format.yml b/.github/workflows/cmake_format.yml index 7c9dec055ac..9bfe1fec8f4 100644 --- a/.github/workflows/cmake_format.yml +++ b/.github/workflows/cmake_format.yml @@ -13,8 +13,7 @@ on: - cron: '0 5 * * *' jobs: - cmake_lang: - name: Format + cmake_format: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml new file mode 100644 index 00000000000..d064e19dfd3 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,73 @@ +name: Code Quality + +on: + push: + branches: + - master + pull_request: + paths: + - 'tesseract**' + - '.github/workflows/code_quality.yml' + - '.clang-tidy' + schedule: + - cron: '0 5 * * *' + +jobs: + ci: + name: ${{ matrix.job_type }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + job_type: [clang-tidy, codecov] + include: + - job_type: clang-tidy + env: + TARGET_CMAKE_ARGS: "-DTESSERACT_ENABLE_CLANG_TIDY=ON -DTESSERACT_ENABLE_TESTING=ON" + NOT_TEST_BUILD: true + - job_type: codecov + env: + TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_CODE_COVERAGE=ON -DTESSERACT_WARNINGS_AS_ERRORS=OFF" + AFTER_SCRIPT: 'cd $target_ws && export MAKEFLAGS=ccov-all:${MAKEFLAGS:-} && colcon build --packages-select tesseract_collision tesseract_common tesseract_environment tesseract_geometry tesseract_kinematics tesseract_srdf tesseract_state_solver tesseract_scene_graph tesseract_urdf + && bash <(curl -s https://codecov.io/bash) -t c4af0da7-9fc3-4d3c-bb2e-6b2523ddd382 -s $target_ws/build -f *all-merged.info' + env: + DOCKER_IMAGE: ubuntu:20.04 + ROS_DISTRO: false + ADDITIONAL_DEBS: 'curl lsb-release liboctomap-dev clang-tidy' + AFTER_INIT: './.github/workflows/add_ros_apt_sources.sh' + UPSTREAM_WORKSPACE: 'dependencies.repos' + ROSDEP_SKIP_KEYS: "fcl opw_kinematics ros_industrial_cmake_boilerplate iwyu octomap catkin" + CCACHE_DIR: "${{ github.workspace }}/${{ matrix.job_type }}/.ccache" + UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" + steps: + - uses: actions/checkout@v2 + + - name: Free Disk Space + continue-on-error: true + run: | + sudo swapoff -a + sudo rm -f /swapfile + sudo apt clean + docker rmi $(docker image ls -aq) + df -h + + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) + message("::set-output name=timestamp::${current_date}") + + - name: ccache cache files + continue-on-error: true + uses: actions/cache@v1.1.0 + with: + path: ${{ matrix.job_type }}/.ccache + key: ${{ matrix.job_type }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + restore-keys: | + ${{ matrix.job_type }}-ccache- + + - name: Build repository + uses: 'marip8/industrial_ci@2f4c8ab919f0aafddd514e586325defabd2911ea' + env: ${{ matrix.env }} + diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index 19cd8ac2bb6..00000000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: CodeCov - -on: - push: - branches: - - master - pull_request: - paths: - - 'tesseract**' - - '.github/workflows/codecov.yml' - schedule: - - cron: '0 5 * * *' - -jobs: - industrial_ci: - name: CodeCov - runs-on: ubuntu-latest - env: - CI_NAME: CodeCov - OS_NAME: ubuntu - OS_CODE_NAME: focal - ROS_DISTRO: noetic - ROS_REPO: main - UPSTREAM_WORKSPACE: 'dependencies.rosinstall' - ROSDEP_SKIP_KEYS: "bullet fcl ompl orocos_kdl python-numpy ifopt python descartes_opw descartes_samplers descartes_light opw_kinematics ros_industrial_cmake_boilerplate iwyu taskflow" - DOCKER_IMAGE: "rosindustrial/tesseract:noetic" - UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" - TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_CODE_COVERAGE=ON -DTESSERACT_WARNINGS_AS_ERRORS=OFF" - AFTER_SCRIPT: 'catkin build -w $target_ws --no-deps tesseract_collision tesseract_common tesseract_environment tesseract_geometry tesseract_kinematics tesseract_srdf tesseract_state_solver tesseract_scene_graph tesseract_urdf --make-args ccov-all - && bash <(curl -s https://codecov.io/bash) -t c4af0da7-9fc3-4d3c-bb2e-6b2523ddd382 -s $target_ws/build -f *all-merged.info' - steps: - - uses: actions/checkout@v2 - - - name: Free Disk Space - continue-on-error: true - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker rmi $(docker image ls -aq) - df -h - - - uses: 'ros-industrial/industrial_ci@master' - env: ${{env}} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f7090bc18ae..117e3337322 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -12,39 +12,17 @@ on: jobs: industrial_ci: if: contains(github.event.pull_request.labels.*.name, 'check-tesseract-ros') || github.event.schedule == true - name: ${{ matrix.env.CI_NAME }} + name: ${{ matrix.distro }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - env: - - {CI_NAME: Bionic-Build-Nightly, - OS_NAME: ubuntu, - OS_CODE_NAME: bionic, - ROS_DISTRO: melodic, - ROS_REPO: main, - UPSTREAM_WORKSPACE: 'dependencies.rosinstall', - DOWNSTREAM_WORKSPACE: 'github:ros-industrial-consortium/tesseract_planning#master github:ros-industrial-consortium/trajopt_ros#master github:ros-industrial-consortium/tesseract_ros#master', - ROSDEP_SKIP_KEYS: "bullet ros_industrial_cmake_boilerplate fcl iwyu", - DOCKER_IMAGE: "rosindustrial/tesseract:melodic", - CCACHE_DIR: "/home/runner/work/tesseract/tesseract/Bionic-Build-Nightly/.ccache", - PARALLEL_TESTS: false, - UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release", - TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release", - DOWNSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release"} - - {CI_NAME: Focal-Build-Nightly, - OS_NAME: ubuntu, - OS_CODE_NAME: focal, - ROS_DISTRO: noetic, - ROS_REPO: main, - UPSTREAM_WORKSPACE: 'dependencies.rosinstall', - DOWNSTREAM_WORKSPACE: 'github:ros-industrial-consortium/tesseract_planning#master github:ros-industrial-consortium/trajopt_ros#master github:ros-industrial-consortium/tesseract_ros#master', - ROSDEP_SKIP_KEYS: "bullet fcl ompl orocos_kdl python-numpy ifopt python descartes_opw descartes_samplers descartes_light opw_kinematics ros_industrial_cmake_boilerplate iwyu taskflow", - DOCKER_IMAGE: "rosindustrial/tesseract:noetic", - CCACHE_DIR: "/home/runner/work/tesseract/tesseract/Focal-Build-Nightly/.ccache", - UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release", - TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release", - DOWNSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release"} + distro: [bionic, focal] + include: + - distro: bionic + image: ubuntu:18.04 + - distro: focal + image: ubuntu:20.04 steps: - uses: actions/checkout@v2 @@ -69,10 +47,21 @@ jobs: continue-on-error: true uses: actions/cache@v1.1.0 with: - path: ${{ matrix.env.CI_NAME }}/.ccache - key: ${{ matrix.env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + path: ${{ matrix.distro }}/.ccache + key: ${{ matrix.distro }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} restore-keys: | - ${{ matrix.env.CI_NAME }}-ccache- + ${{ matrix.distro }}-ccache- - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} + - uses: 'marip8/industrial_ci@2f4c8ab919f0aafddd514e586325defabd2911ea' + env: + DOCKER_IMAGE: ${{ matrix.image }} + ROS_DISTRO: false + ADDITIONAL_DEBS: 'curl lsb-release liboctomap-dev' + AFTER_INIT: './.github/workflows/add_ros_apt_sources.sh' + UPSTREAM_WORKSPACE: 'dependencies.repos' + DOWNSTREAM_WORKSPACE: 'github:ros-industrial-consortium/tesseract_planning#master github:ros-industrial-consortium/trajopt_ros#master github:ros-industrial-consortium/tesseract_ros#master' + ROSDEP_SKIP_KEYS: "fcl opw_kinematics ros_industrial_cmake_boilerplate iwyu octomap catkin" + CCACHE_DIR: "${{ github.workspace }}/${{ matrix.distro}}/.ccache" + UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" + TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" + DOWNSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" diff --git a/.github/workflows/focal_build.yml b/.github/workflows/ubuntu.yml similarity index 63% rename from .github/workflows/focal_build.yml rename to .github/workflows/ubuntu.yml index 9f3f5250ab6..55329558bed 100644 --- a/.github/workflows/focal_build.yml +++ b/.github/workflows/ubuntu.yml @@ -1,4 +1,4 @@ -name: Focal-Build +name: Ubuntu on: push: @@ -7,8 +7,8 @@ on: pull_request: paths: - 'tesseract**' - - '.github/workflows/focal_build.yml' - - '**.rosinstall' + - '.github/workflows/ubuntu.yml' + - '**.repos' schedule: - cron: '0 5 * * *' release: @@ -16,13 +16,18 @@ on: - released jobs: - industrial_ci: - name: Noetic + ci: + name: ${{ matrix.distro }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + distro: [focal] + include: + - distro: focal + image: ubuntu:20.04 env: - CI_NAME: Focal-Build - CCACHE_DIR: "/home/runner/work/tesseract/tesseract/Focal-Build/.ccache" - ROS_DISTRO: noetic + CCACHE_DIR: "${{ github.workspace }}/${{ matrix.distro }}/.ccache" REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} PUSH_DOCKER_IMAGE: ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }} @@ -50,10 +55,10 @@ jobs: continue-on-error: true uses: actions/cache@v1.1.0 with: - path: ${{ env.CI_NAME }}/.ccache - key: ${{ env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + path: ${{ matrix.distro }}/.ccache + key: ${{ matrix.distro }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} restore-keys: | - ${{ env.CI_NAME }}-ccache- + ${{ matrix.distro }}-ccache- - name: Login to Github container registry uses: docker/login-action@v1 @@ -72,8 +77,8 @@ jobs: prefix= suffix= tags: | - type=ref,event=branch,prefix=${{ env.ROS_DISTRO }}- - type=semver,pattern={{major}}.{{minor}},prefix=${{ env.ROS_DISTRO }}- + type=ref,event=branch,prefix=${{ matrix.distro }}- + type=semver,pattern={{major}}.{{minor}},prefix=${{ matrix.distro }}- - name: Set build type run: | @@ -85,21 +90,18 @@ jobs: fi - name: Build repository - uses: 'ros-industrial/industrial_ci@master' + uses: 'marip8/industrial_ci@2f4c8ab919f0aafddd514e586325defabd2911ea' env: - OS_NAME: ubuntu - OS_CODE_NAME: focal - ROS_REPO: main - UPSTREAM_WORKSPACE: 'dependencies.rosinstall' - ROSDEP_SKIP_KEYS: "bullet fcl ompl orocos_kdl python-numpy ifopt python descartes_opw descartes_samplers descartes_light opw_kinematics ros_industrial_cmake_boilerplate iwyu taskflow" - DOCKER_IMAGE: "rosindustrial/tesseract:${{ env.ROS_DISTRO }}" - PARALLEL_TESTS: false - PARALLEL_BUILDS: false + DOCKER_IMAGE: ${{ matrix.image }} + ROS_DISTRO: false + ADDITIONAL_DEBS: 'curl lsb-release liboctomap-dev' + AFTER_INIT: './.github/workflows/add_ros_apt_sources.sh' + UPSTREAM_WORKSPACE: 'dependencies.repos' + ROSDEP_SKIP_KEYS: "fcl opw_kinematics ros_industrial_cmake_boilerplate iwyu octomap catkin" PREFIX: ${{ github.repository }}_ - BEFORE_RUN_TARGET_TEST_EMBED: "ici_with_unset_variables source $BASEDIR/${PREFIX}target_ws/install/setup.bash" UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release" TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DTESSERACT_ENABLE_TESTING=ON" - AFTER_SCRIPT: 'catkin build -w $target_ws --no-deps --verbose tesseract_collision tesseract_common tesseract_environment tesseract_geometry tesseract_kinematics tesseract_scene_graph tesseract_srdf tesseract_state_solver tesseract_urdf --make-args test' + BEFORE_RUN_TARGET_TEST_EMBED: "ici_with_unset_variables source $BASEDIR/${PREFIX}target_ws/install/setup.bash" DOCKER_COMMIT: ${{ steps.meta.outputs.tags }} - name: Push post-build Docker diff --git a/.github/workflows/windows_2019.yml b/.github/workflows/windows.yml similarity index 73% rename from .github/workflows/windows_2019.yml rename to .github/workflows/windows.yml index 1b124dbde99..e442c562eb9 100644 --- a/.github/workflows/windows_2019.yml +++ b/.github/workflows/windows.yml @@ -1,4 +1,4 @@ -name: Windows-2019 +name: Windows on: push: @@ -7,33 +7,32 @@ on: pull_request: paths: - 'tesseract**' - - '.github/workflows/windows_2019.yml' - - '**.rosinstall' + - '.github/workflows/windows.yml' + - '.github/workflows/windows_dependencies.repos' schedule: - cron: '0 5 * * *' -env: - VCPKG_PKGS: >- - fcl bullet3[multithreading,double-precision,rtti] octomap console-bridge eigen3 yaml-cpp - benchmark tinyxml2 assimp orocos-kdl pcl lapack-reference boost-dll boost-filesystem boost-filesystem - boost-serialization boost-program-options boost-graph urdfdom ccd[double-precision] - jobs: - windows_ci: - name: Windows-2019 - runs-on: windows-2019 + ci: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-2019] steps: - uses: actions/checkout@v3 with: path: workspace/src/tesseract + - name: vcpkg build uses: johnwason/vcpkg-action@v4 with: - pkgs: >- - ${{ env.VCPKG_PKGS }} + pkgs: fcl bullet3[multithreading,double-precision,rtti] octomap console-bridge eigen3 yaml-cpp benchmark tinyxml2 assimp orocos-kdl pcl lapack-reference boost-dll boost-filesystem boost-filesystem boost-serialization boost-program-options boost-graph urdfdom ccd[double-precision] gtest triplet: x64-windows-release extra-args: --clean-after-build token: ${{ github.token }} + - name: install-depends shell: cmd run: | @@ -52,7 +51,7 @@ jobs: run: | set PATH=%PATH%;%GITHUB_WORKSPACE%\vcpkg\installed\x64-windows-release\bin set CMAKE_PREFIX_PATH=%GITHUB_WORKSPACE%\vcpkg\installed\x64-windows-release - vcs import --input "${{ github.workspace }}/workspace/src/tesseract/dependencies.rosinstall" src/ + vcs import --input "${{ github.workspace }}/workspace/src/tesseract/.github/workflows/windows_dependencies.repos" src/ if %ERRORLEVEL% GEQ 1 exit 1 colcon build --event-handlers console_direct+ --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=ON if %ERRORLEVEL% GEQ 1 exit 1 diff --git a/dependencies.rosinstall b/.github/workflows/windows_dependencies.repos similarity index 100% rename from dependencies.rosinstall rename to .github/workflows/windows_dependencies.repos diff --git a/README.md b/README.md index 55e3bee232f..3e223677073 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ See [issue #66](https://github.com/tesseract-robotics/tesseract/issues/66) ## Build Instructions 1) Clone repository into your workspace -2) Clone the repositories in the dependencies.rosinstall file using wstool or some other method (e.g. manually git cloning them) +2) Clone the repositories in the dependencies.repos file using wstool or some other method (e.g. manually git cloning them) 3) Build the workspace using catkin tools, colcon, or a similar tool NOTE: For noetic tesseract_ext is not required. Install the following dependencies: libbullet-dev, libbullet-extras-dev and ros-noetic-fcl. Taskflow can be install using the PPA below. diff --git a/dependencies.repos b/dependencies.repos new file mode 100644 index 00000000000..71e16837272 --- /dev/null +++ b/dependencies.repos @@ -0,0 +1,16 @@ +- git: + local-name: ros_industrial_cmake_boilerplate + uri: https://github.com/ros-industrial/ros_industrial_cmake_boilerplate.git + version: 0.4.5 +- git: + local-name: opw_kinematics + uri: https://github.com/Jmeyer1292/opw_kinematics.git + version: 0.5.0 +- git: + local-name: fcl + uri: https://github.com/flexible-collision-library/fcl.git + version: 0.6.1 +- git: + local-name: octomap + uri: https://github.com/OctoMap/octomap.git + version: v1.9.8 diff --git a/dependencies_with_ext.rosinstall b/dependencies_with_ext.repos similarity index 100% rename from dependencies_with_ext.rosinstall rename to dependencies_with_ext.repos