Skip to content

collector: fix ignored return value warning in dump_buffers() #7

collector: fix ignored return value warning in dump_buffers()

collector: fix ignored return value warning in dump_buffers() #7

Workflow file for this run

name: Bob the Builder
# Run on all branches, including all pull requests
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build-collector:
name: Build Collector (${{ matrix.compiler }})
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
fail-fast: false
env:
CC: ${{ matrix.compiler }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build collector
run: |
make collector
- name: Check binary
run: |
ls -lh bootchart-collector bootchartd
file bootchart-collector
ldd bootchart-collector || true
- name: Upload collector artifacts
uses: actions/upload-artifact@v4
with:
name: collector-${{ matrix.compiler }}
path: |
bootchart-collector
bootchartd
build-python:
name: Build Python
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Python code
run: |
make python
- name: Check generated files
run: |
ls -lh VERSION initviz/main.py
cat VERSION
- name: Upload Python artifacts
uses: actions/upload-artifact@v4
with:
name: python-build
path: |
VERSION
initviz/main.py
test:
name: Test
runs-on: ubuntu-latest
needs: [build-collector, build-python]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-cairo
- name: Download collector (gcc)
uses: actions/download-artifact@v4
with:
name: collector-gcc
path: .
- name: Download Python build
uses: actions/download-artifact@v4
with:
name: python-build
path: .
- name: Restore executable permissions
run: |
chmod +x bootchart-collector bootchartd
- name: Run unit tests
run: |
make test || true
echo "Note: Some tests may fail due to missing test data"
- name: Test chart generation with BusyBox data
run: |
if [ -f examples/5/busybox_bootlog.tgz ]; then
python3 initviz.py -o /tmp/test-busybox.png examples/5/busybox_bootlog.tgz
python3 initviz.py -f svg -o /tmp/test-busybox.svg examples/5/busybox_bootlog.tgz
ls -lh /tmp/test-busybox.*
file /tmp/test-busybox.png | grep -q "PNG image data"
file /tmp/test-busybox.svg | grep -q "SVG"
else
echo "No BusyBox bootlog available"
fi
- name: Test chart generation with examples
run: |
if [ -d examples/1 ]; then
python3 initviz.py -o /tmp/test-example.png examples/1/
python3 initviz.py -f svg -o /tmp/test-example.svg examples/1/
ls -lh /tmp/test-example.*
file /tmp/test-example.png | grep -q "PNG image data"
file /tmp/test-example.svg | grep -q "SVG"
else
echo "No example data available"
fi
- name: Upload test charts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-charts
path: |
/tmp/test-*.png
/tmp/test-*.svg
if-no-files-found: ignore