Ajl/merge master to honister #616
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: meta-mono | |
on: | |
push: | |
branches: | |
- honister | |
- honister-next | |
pull_request: | |
jobs: | |
build-and-test: | |
runs-on: [self-hosted, linux, X64] | |
timeout-minutes: 600 | |
container: | |
image: dynamicdevices/yocto-ci-build:latest | |
options: --privileged --platform linux/amd64 -v /dev/net/tun:/dev/net/tun -v /dev/kvm:/dev/kvm | |
strategy: | |
matrix: | |
dotnet_version: [8.0.201, 6.0.419] | |
mono_version: [6.12.0.182] | |
branch: [honister] | |
arch: [x86-64, arm, arm64] | |
env: | |
name: build-and-test | |
MONO_VERSION: ${{ matrix.mono_version }} | |
DOTNET_VERSION: ${{ matrix.dotnet_version }} | |
ARCH: ${{ matrix.arch }} | |
BRANCH: ${{ matrix.branch }} | |
steps: | |
- name: Checkout meta-mono | |
uses: actions/checkout@v4 | |
with: | |
clean: false | |
path: ${{ matrix.branch }}/meta-mono | |
- name: Update repo poky | |
run: | | |
if [ ! -d ${BRANCH}/poky ]; then | |
git clone git://git.yoctoproject.org/poky -b ${BRANCH} ${BRANCH}/poky | |
else | |
cd ${BRANCH}/poky | |
git pull origin ${BRANCH} | |
cd ../.. | |
fi | |
- name: Update repo meta-openembedded | |
run: | | |
if [ ! -d ${BRANCH}/meta-openembedded ]; then | |
git clone https://github.com/openembedded/meta-openembedded.git -b ${BRANCH} ${BRANCH}/meta-openembedded | |
else | |
cd ${BRANCH}/meta-openembedded | |
git pull origin ${BRANCH} | |
cd ../.. | |
fi | |
- name: Configuring | |
run: | | |
rm -f ${BRANCH}/build/conf/local.conf | |
rm -f ${BRANCH}/build/conf/bblayers.conf | |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build | |
# Append custom variables for regenerated local.conf and bblayers.conf samples | |
echo "### Starting to configure local.conf and bblayers.conf ###" | |
echo "mono version: $MONO_VERSION" | |
echo "dotnet version: $DOTNET_VERSION" | |
echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/meta-mono'" >> conf/bblayers.conf | |
echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/meta-openembedded/meta-oe'" >> conf/bblayers.conf | |
echo "MACHINE=\"qemu${ARCH}\"" >> conf/local.conf | |
echo "DL_DIR=\"$GITHUB_WORKSPACE/downloads\"" >> conf/local.conf | |
echo "PREFERRED_VERSION_mono=\"${MONO_VERSION}\"" >> conf/local.conf | |
echo "PREFERRED_VERSION_mono-native=\"${MONO_VERSION}\"" >> conf/local.conf | |
echo "PREFERRED_VERSION_dotnet=\"${DOTNET_VERSION}\"" >> conf/local.conf | |
echo "PREFERRED_VERSION_dotnet-native=\"${DOTNET_VERSION}\"" >> conf/local.conf | |
echo "INHERIT += \" rm_work \"" >> conf/local.conf | |
sed -i 's/#IMAGE_CLASSES += "testimage testsdk"/IMAGE_CLASSES += "testimage "/' conf/local.conf | |
- name: Cleaning | |
run: | | |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build | |
bitbake -c cleanall test-image-mono dotnet dotnet-native | |
- name: Building | |
run: | | |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build | |
bitbake -k test-image-mono | |
- name: Testing | |
run: | | |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build | |
export TERM=linux | |
bitbake test-image-mono -c testimage | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-image-mono-${{ matrix.branch }}-${{ matrix.mono_version }}-${{ matrix.dotnet_version }}-${{ github.sha }}-${{ matrix.arch }} | |
path: ./${{ matrix.branch }}/build/tmp/deploy/images/qemu${{ matrix.arch }}/ |