name: meta-mono on: push: branches: - master - master-next - sumo - thud - warrior - zeus - dunfell - gatesgarth - hardknott - honister - kirkstone pull_request: types: [opened, reopened, synchronize] jobs: build-and-test: runs-on: [self-hosted, linux] strategy: matrix: branch: [master] arch: [x86, arm] env: name: build-and-test 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 cve-check conf/local.conf) ]]; then echo "INHERIT += ' cve-check '" >> 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_EXTRAWHITE="${BB_ENV_EXTRAWHITE} MACHINE DL_DIR" env MACHINE="qemu${ARCH}" DL_DIR="$GITHUB_WORKSPACE/downloads" bitbake test-image-mono - name: CVE check run: | . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} MACHINE DL_DIR TERM" export TERM=linux env MACHINE="qemu${ARCH}" DL_DIR="$GITHUB_WORKSPACE/downloads" bitbake mono -c cve_check - name: Testing run: | . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} MACHINE DL_DIR TERM" export TERM=linux env MACHINE="qemu${ARCH}" DL_DIR="$GITHUB_WORKSPACE/downloads" bitbake test-image-mono -c testimage