Skip to content

Add comprehensive ZBOSS 019.240 configuration enhancements #344

Add comprehensive ZBOSS 019.240 configuration enhancements

Add comprehensive ZBOSS 019.240 configuration enhancements #344

Workflow file for this run

name: KAS Build CI
on:
push:
branches: [ main, develop ]
paths:
- 'kas/**'
- 'meta-dynamicdevices-bsp/**'
- 'meta-dynamicdevices-distro/**'
- 'recipes-**'
- 'classes/**'
- 'conf/**'
- '.github/workflows/kas-build-ci.yml'
- 'scripts/kas-*.sh'
- 'scripts/validation/**'
- 'bbappends/**'
- 'custom-boot-files/**'
pull_request:
branches: [ main, develop ]
paths:
- 'kas/**'
- 'meta-dynamicdevices-bsp/**'
- 'meta-dynamicdevices-distro/**'
- 'recipes-**'
- 'classes/**'
- 'conf/**'
- '.github/workflows/kas-build-ci.yml'
- 'scripts/kas-*.sh'
- 'scripts/validation/**'
- 'bbappends/**'
- 'custom-boot-files/**'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
env:
DEBIAN_FRONTEND: noninteractive
jobs:
# Validation job - validates Yocto layer compatibility
validate:
name: Validate Yocto Layers
runs-on: self-hosted
container:
image: dynamicdevices/yocto-ci-build:latest
options: --privileged --platform linux/amd64
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache KAS layers
uses: actions/cache@v4
with:
path: |
build/layers
build/cache
key: kas-layers-${{ hashFiles('kas/lmp-dynamicdevices-base.yml') }}-${{ github.sha }}
restore-keys: |
kas-layers-${{ hashFiles('kas/lmp-dynamicdevices-base.yml') }}-
kas-layers-
- name: Cache Yocto downloads
uses: actions/cache@v4
with:
path: ~/yocto/downloads
key: yocto-downloads-${{ runner.os }}-${{ hashFiles('kas/lmp-dynamicdevices-base.yml') }}
restore-keys: |
yocto-downloads-${{ runner.os }}-
- name: Validate Yocto Layers
timeout-minutes: 15
run: |
echo "🏅 Meta-DynamicDevices Layer Validation (CI)"
echo "============================================="
echo "📋 Using official yocto-check-layer for Yocto Project compliance"
echo ""
# Install KAS if not available
if ! command -v kas >/dev/null 2>&1; then
echo "📦 Installing KAS..."
pip3 install kas
fi
# Create validation workspace
VALIDATION_DIR="ci-layer-validation"
rm -rf "$VALIDATION_DIR"
mkdir -p "$VALIDATION_DIR"
cd "$VALIDATION_DIR"
echo "🔧 Setting up KAS environment for layer validation..."
# Copy KAS configuration for validation
cp ../kas/layer-validation.yml .
# Initialize KAS environment
echo "📋 Initializing KAS build environment..."
kas shell layer-validation.yml -c "echo 'KAS environment initialized'"
echo "✅ KAS environment ready"
echo ""
echo "🔍 Starting comprehensive layer validation..."
echo ""
# Run yocto-check-layer validation
echo "1️⃣ Validating all meta-dynamicdevices layers together..."
if kas shell layer-validation.yml -c "
# Use the yocto-check-layer script from openembedded-core
YOCTO_CHECK_LAYER='./layers/openembedded-core/scripts/yocto-check-layer'
if [ ! -f \"\$YOCTO_CHECK_LAYER\" ]; then
echo '❌ yocto-check-layer script not found at expected location'
exit 1
fi
echo '✅ Found yocto-check-layer: '\$YOCTO_CHECK_LAYER
# Clean up all potential conflicts from BitBake test data
rm -rf layers/bitbake/lib/layerindexlib/tests/testdata/ 2>/dev/null || true
find ../.. -name 'bitbake' -type d -exec rm -rf {}/lib/layerindexlib/tests/testdata/ 2>/dev/null \\; || true
# Clean up any other build directories that might cause collection conflicts
find ../.. -maxdepth 2 -name 'build*' -type d ! -path '*/ci-layer-validation/build' -exec echo '🧹 Temporarily moving {}' \\; -exec mv {} {}.bak 2>/dev/null \\; || true
# Run validation on all meta-dynamicdevices layers together to handle dependencies
echo '🔍 Running yocto-check-layer validation...'
python3 \"\$YOCTO_CHECK_LAYER\" \"$PWD/../meta-dynamicdevices-bsp\" \"$PWD/../meta-dynamicdevices-distro\" \"$PWD/..\"
# Restore moved directories
find ../.. -maxdepth 2 -name 'build*.bak' -type d -exec sh -c 'mv \"\$1\" \"\${1%.bak}\"' _ {} \\; 2>/dev/null || true
"; then
echo ""
echo "✅ meta-dynamicdevices layers validation PASSED"
echo ""
echo "============================================="
echo "✅ All layer validations PASSED"
echo "✅ All meta-dynamicdevices layers pass comprehensive yocto-check-layer validation!"
echo "✅ Layers are ready for Yocto Project compatibility."
echo ""
else
echo ""
echo "❌ meta-dynamicdevices layers validation FAILED"
echo ""
echo "============================================="
echo "❌ Layer validation FAILED"
echo ""
echo "ℹ️ Please fix the yocto-check-layer issues above before proceeding."
echo "ℹ️ Run './scripts/validate-layers-local.sh' locally to debug issues."
echo ""
exit 1
fi
# Cleanup validation workspace
cd ..
rm -rf "$VALIDATION_DIR"
# Summary job
summary:
name: Validation Summary
runs-on: self-hosted
needs: [validate]
if: always()
steps:
- name: Generate validation summary
run: |
echo "# KAS Layer Validation Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Workflow:** ${{ github.workflow }}" >> $GITHUB_STEP_SUMMARY
echo "**Trigger:** ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
echo "**Branch:** ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Determine overall status
if [ "${{ needs.validate.result }}" = "success" ]; then
echo "## ✅ Validation Status: SUCCESS" >> $GITHUB_STEP_SUMMARY
echo "All meta-dynamicdevices layers pass comprehensive yocto-check-layer validation!" >> $GITHUB_STEP_SUMMARY
echo "Layers are ready for Yocto Project compatibility." >> $GITHUB_STEP_SUMMARY
else
echo "## ❌ Validation Status: FAILED" >> $GITHUB_STEP_SUMMARY
echo "- Layer validation: ${{ needs.validate.result }}" >> $GITHUB_STEP_SUMMARY
echo "Please fix validation issues before proceeding." >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Validation Coverage" >> $GITHUB_STEP_SUMMARY
echo "- **Tool:** Official yocto-check-layer" >> $GITHUB_STEP_SUMMARY
echo "- **Layers:** meta-dynamicdevices, meta-dynamicdevices-bsp, meta-dynamicdevices-distro" >> $GITHUB_STEP_SUMMARY
echo "- **Compliance:** Full Yocto Project compatibility validation" >> $GITHUB_STEP_SUMMARY