Files
meta-qcom-extras/.github/workflows/build-template.yml
Dmitry Baryshkov b89db4e267 CI: adapt to OE/poky changes
Follow the poky demise and use OE-Core / meta-yocto separately.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2025-12-31 03:47:15 +02:00

147 lines
4.1 KiB
YAML

on:
workflow_call:
inputs:
host:
required: true
type: string
images:
required: true
type: string
machines:
required: true
type: string
variants:
required: true
type: string
url:
required: true
type: string
branch:
required: true
type: string
ref:
required: true
type: string
ref_type:
type: string
default: ref
secrets:
TUXSUITE_TOKEN:
required: true
env:
BB_URL: https://github.com/openembedded/bitbake
OE_CORE_URL: https://github.com/openembedded/openembedded-core
META_OE_URL: https://github.com/openembedded/meta-openembedded
META_YOCTO_URL: https://git.yoctoproject.org/meta-yocto
QCOM_URL: https://github.com/qualcomm-linux/meta-qcom
DISTRO: poky-altcfg
TCLIBC: glibc musl
KERNELS: yocto
jobs:
build:
name: ${{github.event_name}} - ${{github.ref}}
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade tuxsuite
- name: Setup tux plan
run: |
cat << EOF > plan.yaml
name: CI for ${{github.repository}}
description: ${{github.workflow}} - ${{github.ref}}
version: 1
common: &commondata
container: ${{inputs.host}}
envsetup: openembedded-core/oe-init-build-env
sources:
git_trees:
- branch: ${{inputs.branch}}
url: $BB_URL
- branch: ${{inputs.branch}}
url: $OE_CORE_URL
- branch: ${{inputs.branch}}
url: $META_OE_URL
- branch: ${{inputs.branch}}
url: $META_YOCTO_URL
- branch: ${{inputs.branch}}
url: $QCOM_URL
- ${{inputs.ref_type}}: ${{inputs.ref}}
url: ${{inputs.url}}
distro: $DISTRO
bblayers_conf:
- BBLAYERS += '../$(echo ${{github.repository}} | cut -d'/' -f2) ../meta-openembedded/meta-oe ../meta-yocto/meta-poky ../meta-qcom'
artifacts: ["licenses"]
EOF
for tclibc in ${TCLIBC}; do
for kernel in ${KERNELS}; do
cat << EOF >> plan.yaml
${tclibc}-${kernel}: &${tclibc}-${kernel}
local_conf:
- INHERIT += 'buildstats buildstats-summary'
- INHERIT:remove = 'rm_work'
- TCLIBC := '${tclibc}'
- PREFERRED_PROVIDER_virtual/kernel := 'linux-${kernel}'
- INITRAMFS_IMAGE ?= 'initramfs-rootfs-image'
${tclibc}-${kernel}-noinitramfs: &${tclibc}-${kernel}-noinitramfs
local_conf:
- INHERIT += 'buildstats buildstats-summary'
- INHERIT:remove = 'rm_work'
- TCLIBC := '${tclibc}'
- PREFERRED_PROVIDER_virtual/kernel := 'linux-${kernel}'
EOF
done
done
# armv7 machines do not support ESP / UKI
for machine in ${{inputs.machines}}; do
if [ ${machine##qcom-armv8a} == ${machine} ] ; then
images=`echo ${{inputs.images}} | sed -e 's/esp-qcom-image//g'`
else
images="${{inputs.images}}"
fi
cat << EOF >> plan.yaml
${machine}: &${machine}
machine: ${machine}
target: ${images}
EOF
done
cat << EOF >> plan.yaml
jobs:
EOF
for tclibc in ${TCLIBC}; do
cat << EOF >> plan.yaml
- name: ${tclibc}
bakes:
EOF
for machine in ${{inputs.machines}}; do
for variant in ${{inputs.variants}}; do
[ ${variant##${machine}-${tclibc}} == ${variant} ] && continue
cat << EOF >> plan.yaml
- { <<: [*commondata, *${variant#${machine}-}, *${machine}], name: ${variant} }
EOF
done
done
done
echo "Ready to submit this Tux Plan:"
cat plan.yaml
- name: Run build
run: |
tuxsuite plan plan.yaml
env:
TUXSUITE_TOKEN: ${{ secrets.TUXSUITE_TOKEN }}