Skip to content

Add issue templates (#1082) #709

Add issue templates (#1082)

Add issue templates (#1082) #709

Workflow file for this run

name: Benchmarking
on:
push:
branches:
- master
# allow manually starting this workflow
workflow_dispatch:
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@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
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/[email protected]
with:
path: benchmark/.ccache
key: benchmark-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
benchmark-ccache-
- 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/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 }}
auto-push: false
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: '@Levi-Armstrong'
max-items-in-chart: 20
- name: Push benchmark result
uses: cpina/[email protected]
env:
SSH_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }}
with:
source-directory: benchmark-data-repository/tesseract/dev/bench
destination-github-username: tesseract-robotics
destination-repository-name: tesseract_docs
target-branch: gh-pages
target-directory: tesseract/dev/bench