Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of Industrial CI #961

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 43 additions & 15 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,30 @@ on:
jobs:
benchmark:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
CCACHE_DIR: "$GITHUB_WORKSPACE/benchmark/.ccache"
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
path: target_ws/src

- name: Install Depends
shell: bash
run: |
apt update
apt upgrade -y
apt install -y cmake curl lsb-release ca-certificates gnupg python3 python3-distutils python3-pip ccache git liboctomap-dev
python3 -m pip install vcstool -q
python3 -m pip install colcon-common-extensions -q
python3 -m pip install rosdep -q
rosdep init
rosdep update
cd $GITHUB_WORKSPACE/target_ws/src
./.github/workflows/add_ros_apt_sources.sh

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand All @@ -29,26 +51,32 @@ jobs:
restore-keys: |
benchmark-ccache-

- uses: 'tesseract-robotics/industrial_ci@0109bf3523050402490b56e19c9554e7d7c5379f'
env:
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'
AFTER_SCRIPT: '$target_ws/src/tesseract/.run_combine_benchmark_results'
- name: Build Upstream Workspace
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/upstream_ws/src
vcs import --input "$GITHUB_WORKSPACE/target_ws/src/dependencies.repos" $GITHUB_WORKSPACE/upstream_ws/src/
cd $GITHUB_WORKSPACE/upstream_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release
if [ $? -ge 1 ]; then return 1; fi

- name: Build Target Workspace And Run Benchmarks
shell: bash
run: |
source $GITHUB_WORKSPACE/upstream_ws/install/setup.bash
cd $GITHUB_WORKSPACE/target_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=OFF -DTESSERACT_ENABLE_BENCHMARKING=ON -DTESSERACT_ENABLE_RUN_BENCHMARKING=ON -DBENCHMARK_ARGS=CI_ONLY
if [ $? -ge 1 ]; then return 1; fi
./src/.run_combine_benchmark_results

- name: Store Bullet Discrete, FCL Discrete and Environment benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: C++ Benchmark
tool: 'googlecpp'
output-file-path: ${{ github.workspace }}/benchmarks/tesseract-benchmark_result.json
output-file-path: $GITHUB_WORKSPACE/target_ws/benchmarks/tesseract-benchmark_result.json
benchmark-data-dir-path: tesseract/dev/bench
gh-repository: github.com/tesseract-robotics/tesseract_docs
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
76 changes: 51 additions & 25 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,35 @@ jobs:
include:
- job_type: clang-tidy
env:
TARGET_CMAKE_ARGS: "-DTESSERACT_ENABLE_CLANG_TIDY=ON -DTESSERACT_ENABLE_TESTING=ON"
NOT_TEST_BUILD: true
TARGET_CMAKE_ARGS: "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_CLANG_TIDY=ON -DTESSERACT_ENABLE_TESTING=ON"
- job_type: codecov
env:
TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_CODE_COVERAGE=ON -DTESSERACT_WARNINGS_AS_ERRORS=OFF"
AFTER_SCRIPT: 'ici_with_unset_variables source ${HOME}/${PREFIX}target_ws/install/setup.bash && cd ${HOME}/${PREFIX}target_ws && colcon build --cmake-target ccov-all --packages-select tesseract_collision tesseract_common tesseract_environment tesseract_geometry tesseract_kinematics tesseract_srdf tesseract_state_solver tesseract_scene_graph tesseract_urdf && cd src/tesseract && git config --global --add safe.directory ${HOME}/${PREFIX}target_ws/src/tesseract && bash <(curl -s https://codecov.io/bash) -t 758610a6-d851-4185-a01a-5b9465889b62 -s ${HOME}/${PREFIX}target_ws/build -f *all-merged.info'
env:
DOCKER_IMAGE: ubuntu:20.04
ROS_DISTRO: false
PREFIX: ${{ github.repository }}_
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"
TARGET_CMAKE_ARGS: "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_CODE_COVERAGE=ON -DTESSERACT_WARNINGS_AS_ERRORS=OFF"
container:
image: ubuntu:20.04
env:
CCACHE_DIR: "$GITHUB_WORKSPACE/${{ matrix.job_type }}/.ccache"
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
path: target_ws/src

- name: Free Disk Space
continue-on-error: true
- name: Install Depends
shell: bash
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
apt update
apt upgrade -y
apt install -y cmake curl lsb-release ca-certificates gnupg python3 python3-distutils python3-pip ccache git clang-tidy liboctomap-dev
python3 -m pip install vcstool -q
python3 -m pip install colcon-common-extensions -q
python3 -m pip install rosdep -q
rosdep init
rosdep update
cd $GITHUB_WORKSPACE/target_ws/src
./.github/workflows/add_ros_apt_sources.sh

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand All @@ -68,7 +70,31 @@ jobs:
restore-keys: |
${{ matrix.job_type }}-ccache-

- name: Build repository
uses: 'tesseract-robotics/industrial_ci@0109bf3523050402490b56e19c9554e7d7c5379f'
env: ${{ matrix.env }}
- name: Build Upstream Workspace
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/upstream_ws/src
vcs import --input "$GITHUB_WORKSPACE/target_ws/src/dependencies.repos" $GITHUB_WORKSPACE/upstream_ws/src/
cd $GITHUB_WORKSPACE/upstream_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release
if [ $? -ge 1 ]; then return 1; fi

- name: Build Target Workspace
shell: bash
run: |
source $GITHUB_WORKSPACE/upstream_ws/install/setup.bash
cd $GITHUB_WORKSPACE/target_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args ${{ matrix.env.TARGET_CMAKE_ARGS }}
if [ $? -ge 1 ]; then return 1; fi

- name: Upload CodeCov Results
shell: bash
run: |
if [[ "${{ matrix.job_type }}" == "codecov" ]]; then
source $GITHUB_WORKSPACE/target_ws/install/setup.bash
cd $GITHUB_WORKSPACE/target_ws
colcon build --cmake-target ccov-all --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 758610a6-d851-4185-a01a-5b9465889b62 -s $GITHUB_WORKSPACE/target_ws/build -f *all-merged.info
fi
79 changes: 51 additions & 28 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,32 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [bionic, focal]
include:
- distro: bionic
image: ubuntu:18.04
- distro: focal
image: ubuntu:20.04

distro: [focal, jammy]
container:
image: ubuntu:${{ matrix.distro }}
env:
CCACHE_DIR: "$GITHUB_WORKSPACE/${{ matrix.distro }}/.ccache"
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
path: target_ws/src

- name: Free Disk Space
continue-on-error: true
- name: Install Depends
shell: bash
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
apt update
apt upgrade -y
apt install -y cmake curl lsb-release ca-certificates gnupg python3 python3-distutils python3-pip ccache git liboctomap-dev
python3 -m pip install vcstool -q
python3 -m pip install colcon-common-extensions -q
python3 -m pip install rosdep -q
rosdep init
rosdep update
cd $GITHUB_WORKSPACE/target_ws/src
./.github/workflows/add_ros_apt_sources.sh

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand All @@ -52,16 +60,31 @@ jobs:
restore-keys: |
${{ matrix.distro }}-ccache-

- uses: 'tesseract-robotics/industrial_ci@0109bf3523050402490b56e19c9554e7d7c5379f'
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"
- name: Build Upstream Workspace
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/upstream_ws/src
vcs import --input "$GITHUB_WORKSPACE/target_ws/src/dependencies.repos" $GITHUB_WORKSPACE/upstream_ws/src/
cd $GITHUB_WORKSPACE/upstream_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release
if [ $? -ge 1 ]; then return 1; fi

- name: Build Target Workspace
shell: bash
run: |
source $GITHUB_WORKSPACE/upstream_ws/install/setup.bash
cd $GITHUB_WORKSPACE/target_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_TESTING=ON
if [ $? -ge 1 ]; then return 1; fi

- name: Run Tests
shell: bash
run: |
cd $GITHUB_WORKSPACE/target_ws
source $GITHUB_WORKSPACE/target_ws/install/setup.bash
colcon test --event-handlers console_direct+ --return-code-on-test-failure
if [ $? -ge 1 ]; then return 1; fi
colcon test-result --verbose
if [ $? -ge 1 ]; then return 1; fi
104 changes: 46 additions & 58 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,31 @@ jobs:
fail-fast: false
matrix:
distro: [focal, jammy]
env:
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' }}
container:
image: ubuntu:${{ matrix.distro }}
env:
CCACHE_DIR: "$GITHUB_WORKSPACE/${{ matrix.distro }}/.ccache"
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: target_ws/src

- name: Free disk space
continue-on-error: true
- name: Install Depends
shell: bash
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
apt update
apt upgrade -y
apt install -y cmake curl lsb-release ca-certificates gnupg python3 python3-distutils python3-pip ccache git liboctomap-dev
python3 -m pip install vcstool -q
python3 -m pip install colcon-common-extensions -q
python3 -m pip install rosdep -q
rosdep init
rosdep update
cd $GITHUB_WORKSPACE/target_ws/src
./.github/workflows/add_ros_apt_sources.sh

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand All @@ -58,51 +66,31 @@ jobs:
restore-keys: |
${{ matrix.distro }}-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=${{ matrix.distro }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ matrix.distro }}-

- name: Set build type
- name: Build Upstream Workspace
shell: bash
run: |
if [[ "${{ env.PUSH_DOCKER_IMAGE }}" = true ]]
then
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
else
echo "BUILD_TYPE=Debug" >> $GITHUB_ENV
fi
mkdir -p $GITHUB_WORKSPACE/upstream_ws/src
vcs import --input "$GITHUB_WORKSPACE/target_ws/src/dependencies.repos" $GITHUB_WORKSPACE/upstream_ws/src/
cd $GITHUB_WORKSPACE/upstream_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release
if [ $? -ge 1 ]; then return 1; fi

- name: Build repository
uses: 'tesseract-robotics/industrial_ci@0109bf3523050402490b56e19c9554e7d7c5379f'
env:
DOCKER_IMAGE: ubuntu:${{ matrix.distro }}
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 }}_
UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release"
TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DTESSERACT_ENABLE_TESTING=ON"
BEFORE_RUN_TARGET_TEST_EMBED: "ici_with_unset_variables source $BASEDIR/${PREFIX}target_ws/install/setup.bash"
AFTER_SCRIPT: 'rm -r $BASEDIR/${PREFIX}upstream_ws/build $BASEDIR/${PREFIX}target_ws/build'
DOCKER_COMMIT: ${{ steps.meta.outputs.tags }}
- name: Build Target Workspace
shell: bash
run: |
source $GITHUB_WORKSPACE/upstream_ws/install/setup.bash
cd $GITHUB_WORKSPACE/target_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_TESTING=ON
if [ $? -ge 1 ]; then return 1; fi

- name: Push post-build Docker
if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
run: docker push ${{ steps.meta.outputs.tags }}
- name: Run Tests
shell: bash
run: |
cd $GITHUB_WORKSPACE/target_ws
source $GITHUB_WORKSPACE/target_ws/install/setup.bash
colcon test --event-handlers console_direct+ --return-code-on-test-failure
if [ $? -ge 1 ]; then return 1; fi
colcon test-result --verbose
if [ $? -ge 1 ]; then return 1; fi
Loading
Loading