Skip to content

Commit

Permalink
DO NOT MERGE: Add Github actions CI workflow
Browse files Browse the repository at this point in the history
* Add a build badge to README.md
* Add yoe.yml for Github actions CI support

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Sep 22, 2024
1 parent b85f429 commit 047f077
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/yoe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Yoe Distro CI

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- yoe/mut
pull_request:
branches:
- master
jobs:
build:
name: Yoe Build
runs-on: [self-hosted, Linux]
timeout-minutes: 720
steps:
- name: Fetch Repo Name
id: repo-name
run: echo "value=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: checkout yoe
run: |
git clone --recurse-submodules -j8 -b master https://github.com/YoeDistro/yoe-distro.git yoe
cd yoe
git checkout master
git pull
git submodule update --recursive --init
rm -rf sources/${{ steps.repo-name.outputs.value }}/*
rsync -av --progress --exclude="yoe" --exclude=".git" `pwd`/../ sources/${{ steps.repo-name.outputs.value }}/
- name: Setup
run: |
cd yoe
export DOCKER_REPO=none
export LANG=en_US.UTF-8
export SSTATE_CACHE_DIR=/scratch/sstate-cache
echo export DOCKER_REPO=none > local.sh
echo export LANG=en_US.UTF-8 >> local.sh
echo export SSTATE_CACHE_DIR=/scratch/sstate-cache >> local.sh
cp conf/local.conf.sample conf/local.conf
echo SSTATE_DIR = \"$SSTATE_CACHE_DIR\" >> conf/local.conf
echo IMAGE_CLASSES += \"testimage testsdk\" >> conf/local.conf
echo INHERIT += \"report-error rm_work\" >> conf/local.conf
echo ERR_REPORT_SERVER = \"errors.yoctoproject.org\" >> conf/local.conf
echo ERR_REPORT_PORT = \"80\" >> conf/local.conf
echo ERR_REPORT_USERNAME = \"Yoe Distro CI\" >> conf/local.conf
echo ERR_REPORT_EMAIL = \"[email protected]\" >> conf/local.conf
echo TOOLCHAIN = \"clang\" >> conf/local.conf
echo BB_NUMBER_THREADS = \"16\" >> conf/local.conf
echo PARALLEL_MAKE = \"-j 32\" >> conf/local.conf
echo ZSTD_THREADS = \"8\" >> conf/local.conf
echo XZ_THREADS = \"8\" >> conf/local.conf
echo XZ_MEMLIMIT = \"20%\" >> conf/local.conf
echo CLANGSDK = \"1\" >> conf/local.conf
echo IMAGE_INSTALL:append = \" clang \" >> conf/local.conf
echo SDKMACHINE = \"aarch64\" >> conf/local.conf
/bin/bash -c "sed -i -e 's/PACKAGE_FEED_URI.*$//' conf/site.conf"
/bin/bash -c "sed -i -e 's/SDK_UPDATE_URL.*$//' conf/site.conf"
- name: Build Image
run: |
cd yoe
/bin/bash -c ". ./envsetup.sh qemuarm64 && bitbake yoe-kiosk-image yoe-sdk-image yoe-debug-image"
- name: Build SDK
run: |
cd yoe
/bin/bash -c ". ./envsetup.sh qemuarm64 && bitbake yoe-debug-image -cpopulate_sdk_ext"
- name: Test Image
run: |
cd yoe
export DISPLAY=":0"
echo TESTIMAGE_AUTO:qemuall = \"1\" >> conf/local.conf
/bin/bash -c ". ./envsetup.sh qemuarm64 && bitbake yoe-sdk-image"
- name: Prepare results
run: |
cd yoe
/bin/bash -c ". ./envsetup.sh qemuarm64 && resulttool report build/tmp/log/oeqa"
- name: Clean shared state
run: |
cd yoe
/bin/bash -c ". ./envsetup.sh qemuarm64 && ./sources/poky/scripts/sstate-cache-management.py -d --remove-orphans -y "
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Yoe Distro CI](https://github.com/YoeDistro/meta-openembedded/workflows/Yoe%20Distro%20CI/badge.svg?branch=yoe%2Fmut)](https://github.com/YoeDistro/meta-openembedded/actions/workflows/yoe.yml?query=workflow%3AYoe+branch%3Ayoe%2Fmut)

Collection of layers for the OE-core universe

Main layer maintainer: Khem Raj <[email protected]>
Expand Down

0 comments on commit 047f077

Please sign in to comment.