Skip to content

Commit 5feff61

Browse files
authored
ci: add yocto-pybootchartgui (#832)
Create buildchart.svg with the buildstats collected data. We have the buildstats enabled but the output is hard to read and understand. The openembedded-core pybootchartgui scripts can process this logs and generates some pretty charts. For each Yocto build, this will generate a github artifact by machine like `buildchart-qcm6490-idp.zip` with an svg image inside https://github.com/qualcomm-linux/meta-qcom/actions/runs/14362539141/artifacts/2916117283 ![buildchart](https://github.com/user-attachments/assets/ae39df6d-76a9-484e-b629-a993f52bd375)
2 parents d839239 + f6cfffd commit 5feff61

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/build-yocto.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ jobs:
111111
export KAS_WORK_DIR=$PWD/../kas
112112
mkdir $KAS_WORK_DIR
113113
kas build ci/mirror.yml:ci/${{ matrix.machine }}.yml
114+
ci/yocto-pybootchartgui.sh && mv $KAS_WORK_DIR/build/buildchart.svg .
115+
116+
- uses: actions/upload-artifact@v4
117+
with:
118+
name: buildchart-${{ matrix.machine }}
119+
path: buildchart.svg
114120

115121
- name: Publish image
116122
run: |

ci/yocto-pybootchartgui.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh -e
2+
# Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
3+
# SPDX-License-Identifier: MIT
4+
5+
TOPDIR=$(realpath $(dirname $(readlink -f $0))/..)
6+
7+
if [ -z $KAS_WORK_DIR ]; then
8+
echo "KAS_WORK_DIR is empty and it needs to point to populated work dir"
9+
fi
10+
11+
# pybootchartgui tool
12+
CMD="$CMD $KAS_WORK_DIR/oe-core/scripts/pybootchartgui/pybootchartgui.py"
13+
# display time in minutes instead of seconds
14+
CMD="$CMD --minutes"
15+
# image format (png, svg, pdf); default format png
16+
CMD="$CMD --format=svg"
17+
# output path (file or directory) where charts are stored
18+
CMD="$CMD --output=buildchart"
19+
# /path/to/tmp/buildstats/<recipe-machine>/<BUILDNAME>/
20+
CMD="$CMD $KAS_WORK_DIR/build/tmp/buildstats"
21+
22+
exec kas shell $TOPDIR/ci/base.yml --command "$CMD"

0 commit comments

Comments
 (0)