diff options
-rw-r--r-- | .github/workflows/CI_github.yml | 81 | ||||
-rw-r--r-- | recipes-mono/images/test-image-mono.bb | 10 |
2 files changed, 91 insertions, 0 deletions
diff --git a/.github/workflows/CI_github.yml b/.github/workflows/CI_github.yml new file mode 100644 index 0000000..bb1e175 --- /dev/null +++ b/.github/workflows/CI_github.yml @@ -0,0 +1,81 @@ +name: meta-mono + +on: + push: + branches: + - thud + - thud-next + pull_request: + +jobs: + build-and-test: + runs-on: [self-hosted, linux] + container: + image: dynamicdevices/yocto-ci-build:sumo + options: --privileged -v /dev/net/tun:/dev/net/tun -v /dev/kvm:/dev/kvm + strategy: + matrix: + mono_version: [6.8.0.123] + branch: [thud] + arch: [x86, arm] + env: + name: build-and-test + MONO_VERSION: ${{ matrix.mono_version }} + ARCH: ${{ matrix.arch }} + BRANCH: ${{ matrix.branch }} + steps: + - name: Checkout meta-mono + uses: actions/checkout@v2 + 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 + if [[ ! $(grep '#Make test image' conf/local.conf) ]]; then + echo "#Make test image" >> conf/local.conf + echo "INHERIT += ' testimage '" >> conf/local.conf + fi + - name: Building + run: | + . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build + + export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} PREFERRED_VERSION_mono PREFERRED_VERSION_mono-native" + export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} MACHINE DL_DIR" + + env PREFERRED_VERSION_mono="${MONO_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_EXTRAWHITE="${BB_ENV_EXTRAWHITE} PREFERRED_VERSION_mono PREFERRED_VERSION_mono-native" + export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} MACHINE DL_DIR" + export TERM=linux + env PREFERRED_VERSION_mono="${MONO_VERSION}" PREFERRED_VERSION_mono-native="${MONO_VERSION}" MACHINE="qemu${ARCH}" DL_DIR="$GITHUB_WORKSPACE/downloads" bitbake test-image-mono -c testimage diff --git a/recipes-mono/images/test-image-mono.bb b/recipes-mono/images/test-image-mono.bb new file mode 100644 index 0000000..8969b7a --- /dev/null +++ b/recipes-mono/images/test-image-mono.bb @@ -0,0 +1,10 @@ +require recipes-sato/images/core-image-sato.bb + +require core-image-mono.inc + +# Build up meta-mono test image here +#IMAGE_INSTALL += "msbuild \ +#" + +IMAGE_BASENAME = "${PN}" + |