-
Notifications
You must be signed in to change notification settings - Fork 88
100 lines (90 loc) · 3.77 KB
/
benchmarking.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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