Merge pull request #198 from Livius90/master #525
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: | |
- master | |
- master-next | |
- mickledore | |
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: [7.0.400] | |
mono_version: [6.12.0.182] | |
branch: [mickledore] | |
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@v3 | |
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: | | |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build | |
if [[ ! $(grep meta-mono/meta-mono/${BRANCH}/meta-mono conf/bblayers.conf) ]]; then | |
echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/meta-mono'" >> conf/bblayers.conf | |
fi | |
if [[ ! $(grep meta-openembedded conf/bblayers.conf) ]]; then | |
echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/meta-openembedded/meta-oe'" >> conf/bblayers.conf | |
fi | |
if [[ ! $(grep rm_work conf/local.conf) ]]; then | |
echo "INHERIT += ' rm_work '" >> conf/local.conf | |
fi | |
sed -i 's/#IMAGE_CLASSES += "testimage testsdk"/IMAGE_CLASSES += "testimage "/' conf/local.conf | |
- name: Building | |
run: | | |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build | |
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} PREFERRED_VERSION_mono PREFERRED_VERSION_mono-native" | |
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} PREFERRED_VERSION_dotnet" | |
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} MACHINE DL_DIR" | |
env PREFERRED_VERSION_mono="${MONO_VERSION}" PREFERRED_VERSION_dotnet="${DOTNET_VERSION}" PREFERRED_VERSION_mono-native="${MONO_VERSION}" MACHINE="qemu${ARCH}" DL_DIR="$GITHUB_WORKSPACE/downloads" bitbake -k test-image-mono | |
- name: Testing | |
run: | | |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build | |
export BB_ENV_PASSTHROUGH_ADDITIONS="BB_ENV_PASSTHROUGH_ADDITIONS PREFERRED_VERSION_mono PREFERRED_VERSION_mono-native" | |
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} PREFERRED_VERSION_dotnet" | |
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} MACHINE DL_DIR" | |
export TERM=linux | |
env PREFERRED_VERSION_mono="${MONO_VERSION}" PREFERRED_VERSION_dotnet="${DOTNET_VERSION}" PREFERRED_VERSION_mono-native="${MONO_VERSION}" MACHINE="qemu${ARCH}" DL_DIR="$GITHUB_WORKSPACE/downloads" bitbake test-image-mono -c testimage | |
- name: Store artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-image-mono-${{ github.sha }} | |
path: ./${{ matrix.branch }}/build/tmp/deploy/images/qemu${{ matrix.arch }}/ |