version: 2 accept_configuration: condition: and conditions: - condition: property property: host.compiler equals_value: Yocto - condition: property property: target.arch in_values: [TARGET1, TARGET2, TARGET3, TARGET4] machine_type: Build: cores: 16 # Target build matrix: # # [target1] [target2] [target3] [target4] # [machine] qemuarm64 qemux86 qemuarm qemux86-64 # [yocto] gatesgarth dunfell hardknott honister # target1: &target1 type: Group instructions: - type: EnvironmentVariable variableName: MACHINE variableValue: qemuarm64 - type: EnvironmentVariable variableName: YOCTO_BRANCH variableValue: gatesgarth enable_if: condition: property property: target.arch equals_value: TARGET1 target2: &target2 type: Group instructions: - type: EnvironmentVariable variableName: MACHINE variableValue: qemux86 - type: EnvironmentVariable variableName: YOCTO_BRANCH variableValue: dunfell enable_if: condition: property property: target.arch equals_value: TARGET2 target3: &target3 type: Group instructions: - type: EnvironmentVariable variableName: MACHINE variableValue: qemuarm - type: EnvironmentVariable variableName: YOCTO_BRANCH variableValue: hardknott enable_if: condition: property property: target.arch equals_value: TARGET3 target4: &target4 type: Group instructions: - type: EnvironmentVariable variableName: MACHINE variableValue: qemux86-64 - type: EnvironmentVariable variableName: YOCTO_BRANCH variableValue: honister enable_if: condition: property property: target.arch equals_value: TARGET4 instructions: Build: - *target1 - *target2 - *target3 - *target4 - type: EnvironmentVariable variableName: DL_DIR variableValue: "/mnt/yocto-cache/downloads" - type: EnvironmentVariable variableName: SOURCE_DIR variableValue: "{{.SourceDir}}" - type: SetBuildDirectory directory: "{{.AgentWorkingDir}}/build" - type: MakeDirectory directory: "{{.BuildDir}}" - type: ChangeDirectory directory: "{{.BuildDir}}" - type: WriteFile fileContents: | #!/bin/bash -xe # make hostname unique for NFS sudo hostname $(hostname -s)-$(date +%s%N) sudo mkdir -p /mnt/yocto-cache sudo mount yocto-cache.intra.qt.io:/srv/yocto-cache /mnt/yocto-cache git clone git://git.yoctoproject.org/poky --reference /mnt/yocto-cache/mirror/poky.git (cd poky; git checkout ${YOCTO_BRANCH}) git clone git://git.openembedded.org/meta-openembedded --reference /mnt/yocto-cache/mirror/meta-openembedded.git (cd meta-openembedded; git checkout ${YOCTO_BRANCH}) git clone git://git.openembedded.org/meta-python2 --reference /mnt/yocto-cache/mirror/meta-python2.git (cd meta-python2; git checkout ${YOCTO_BRANCH}) source ./poky/oe-init-build-env export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR" export DL_DIR=/mnt/yocto-cache/downloads export BB_GENERATE_MIRROR_TARBALLS=1 export SSTATE_DIR=/mnt/yocto-cache/sstate-caches/$(sed -n -e "s/DISTRO_CODENAME.*\"\(.*\)\"/\1/p" ../poky/meta-*/conf/distro/poky.conf)-meta-qt5 bitbake-layers add-layer ../meta-openembedded/meta-oe bitbake-layers add-layer ../meta-python2 bitbake-layers add-layer ${SOURCE_DIR} echo "require ${SOURCE_DIR}/coin/test-configs.inc" >> conf/local.conf # EXCLUDE_FROM_WORLD rm -fv ${SOURCE_DIR}/recipes-qt/examples/qt5-opengles2-test_git.bb rm -rv ${SOURCE_DIR}/recipes-python/pyqt5/python3-pyqt5_*.bb rm -rv ${SOURCE_DIR}/recipes-python/pyqtchart/python3-pyqtchart_*.bb # build all recipes found in the layer bitbake $(find ${SOURCE_DIR} -name *.bb | xargs -n1 basename | sed -e 's/\([^._]*\).*/\1/') filename: "{{.BuildDir}}/start-build" fileMode: 420 - type: ExecuteCommand command: ["bash", "-xe", "{{.BuildDir}}/start-build"] maxTimeInSeconds: 39600 maxTimeBetweenOutput: 39600 userMessageOnFailure: "Build failed." - type: ExecuteCommand command: ["sudo", "umount", "/mnt/yocto-cache"] userMessageOnFailure: "Unmounting cache failed." Test: []