Skip to content

Update main.yml

Update main.yml #3

Workflow file for this run

name: Yocto Build
on:
push:
branches:
- '**' # Matches all branches
jobs:
yocto-build:
runs-on: ubuntu-latest
env:
YOCTO_BRANCH: kirkstone
WORKDIR: ${GITHUB_WORKSPACE}/yocto-build
steps:
- name: Create working directory
run: |
mkdir -p ${GITHUB_WORKSPACE}/yocto-build
cd ${GITHUB_WORKSPACE}/yocto-build
- name: Checkout meta layer
uses: actions/checkout@v3
with:
path: yocto-build/meta-sysele-nxp
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gawk wget git diffstat unzip texinfo gcc build-essential \
chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm \
python3-subunit mesa-common-dev zstd liblz4-tool
- name: Setup Yocto
working-directory: yocto-build
run: |
# Clone poky
git clone -b $YOCTO_BRANCH git://git.yoctoproject.org/poky
# Clone required layers
git clone -b $YOCTO_BRANCH git://git.openembedded.org/meta-openembedded
git clone -b $YOCTO_BRANCH git://git.yoctoproject.org/meta-arm
- name: Configure and Build
working-directory: yocto-build
run: |
cd poky
source oe-init-build-env build
# Add layers to bblayers.conf using absolute paths
cat << EOF >> conf/bblayers.conf
BBLAYERS += "${WORKDIR}/meta-openembedded/meta-oe"
BBLAYERS += "${WORKDIR}/meta-arm"
BBLAYERS += "${WORKDIR}/meta-sysele-nxp"
EOF
# Configure local.conf
cat << EOF >> conf/local.conf
MACHINE = "your-machine-name"
DISTRO = "poky"
DL_DIR = "${WORKDIR}/downloads"
SSTATE_DIR = "${WORKDIR}/sstate-cache"
EOF
# Print directory structure for debugging
echo "Current working directory:"
pwd
echo "Directory structure:"
ls -la ${WORKDIR}
echo "Layers configuration:"
cat conf/bblayers.conf
# Start the build
bitbake core-image-minimal
- name: Archive artifacts
if: success()
uses: actions/upload-artifact@v3
with:
name: yocto-build-artifacts
path: yocto-build/poky/build/tmp/deploy/images/**/*