github: refactor yocto setup #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build core-image-minimal | |
on: [ push, workflow_dispatch, pull_request ] | |
env: | |
YOCTO_BUILD_PATH: /tmp/yocto-test-build/ | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Build Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
chrpath \ | |
cpio \ | |
diffstat \ | |
file \ | |
gawk \ | |
git \ | |
iproute2 \ | |
iptables \ | |
iputils-ping \ | |
libncurses-dev \ | |
locales \ | |
lz4 \ | |
python3 \ | |
python3-distutils \ | |
wget \ | |
zstd | |
- name: setup yocto | |
run: | | |
sudo locale-gen en_US.UTF-8 | |
mkdir -p $YOCTO_BUILD_PATH | |
git clone -b kirkstone git://git.yoctoproject.org/poky.git $YOCTO_BUILD_PATH/poky | |
git clone -b kirkstone https://github.com/openembedded/meta-openembedded.git $YOCTO_BUILD_PATH/meta-openembedded | |
ln -s $(pwd) $YOCTO_BUILD_PATH/meta-elos | |
cd $YOCTO_BUILD_PATH | |
. poky/oe-init-build-env | |
- name: Setup meta-elos | |
run: | | |
./ci/test_build_variants.sh | |
echo "########### local.conf to build ###################" | |
cat $YOCTO_BUILD_PATH/build/conf/bblayers.conf | |
- name: create image | |
run: | | |
cd $YOCTO_BUILD_PATH | |
. poky/oe-init-build-env | |
# bitbake -n core-image-minimal | |
bitbake-layers show-layers | |
bitbake elos | |
- name: save yocto image artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Yocto image artefacts | |
path: $YOCTO_BUILD_PATH/build/tmp/deploy | |