Skip to content

Commit

Permalink
fixup benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Nov 12, 2023
1 parent 6535f49 commit 6c1102e
Showing 1 changed file with 43 additions and 15 deletions.
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

0 comments on commit 6c1102e

Please sign in to comment.