Update Build Thunder on Yocto.yml #14
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 Thunder on Yocto | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_call: | |
jobs: | |
Thunder: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
# machine : [raspberrypi3-64, raspberrypi4-64] | |
# build_type: [debug, release, production] | |
# yocto_version : [dunfell, kirkstone, scarthgap] | |
machine : [raspberrypi3-64] | |
build_type: [debug] | |
yocto_version : [dunfell] | |
name: Build ${{matrix.build_type}} on ${{matrix.yocto_version}} for ${{matrix.machine}} | |
steps: | |
# ----- Setup Yocto ----- | |
- name: Install necessary packages | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 10 | |
command: | | |
sudo gem install apt-spy2 | |
sudo apt-spy2 fix --commit --launchpad --country=US | |
sudo apt-get update | |
sudo apt install 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 python3-subunit zstd \ | |
liblz4-tool file locales | |
- name: Generate locale | |
run: | | |
sudo locale-gen en_US.UTF-8 | |
- name: Get poky | |
uses: actions/checkout@v4 | |
with: | |
github-server-url: 'https://git.yoctoproject.org' | |
repository: git/poky | |
ref: ${{matrix.yocto_version}} | |
path : poky | |
# The repo git/openembedded-core fails, falling back on github mirror | |
- name: Get openembedded-core | |
uses: actions/checkout@v4 | |
with: | |
repository: openembedded/openembedded-core | |
ref: ${{matrix.yocto_version}} | |
path : openembedded-core | |
# the repo git/meta-openembedded fails, falling back on github mirror | |
- name: Get meta-openembedded | |
uses: actions/checkout@v4 | |
with: | |
repository: openembedded/meta-openembedded | |
ref: ${{matrix.yocto_version}} | |
path : meta-openembedded | |
- name: Get meta-raspberrypi BSP | |
if: contains(${{matrix.machine}}, 'raspberrypi') | |
uses: actions/checkout@v4 | |
with: | |
github-server-url: 'https://git.yoctoproject.org' | |
repository: git/meta-raspberrypi | |
ref: ${{matrix.yocto_version}} | |
path : meta-raspberrypi | |
- name: Get meta-thunder-framework | |
uses: actions/checkout@v4 | |
with: | |
repository: metrological/meta-thunder-framework | |
path: meta-thunder-framework | |
# ----- Build image ----- | |
- name: Build | |
run: | | |
source poky/oe-init-build-env build-${{matrix.machine}} | |
bitbake-layers add-layer ../meta-openembedded/meta-oe | |
bitbake-layers add-layer ../meta-openembedded/meta-python | |
bitbake-layers add-layer ../meta-raspberrypi | |
bitbake-layers add-layer ../meta-thunder-framework | |
echo 'MACHINE = "${{matrix.machine}}"' >> ./conf/local.conf | |
echo 'DISTRO_FEATURES += "thunder_${{matrix.build_type}}"' >> ./conf/local.conf | |
bitbake core-image-thunder -n | |
bitbake core-image-thunder |