aboutsummaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorToni Saario <toni.saario@qt.io>2019-07-11 15:39:24 +0300
committerToni Saario <toni.saario@qt.io>2019-07-12 11:59:35 +0300
commitc0ef031fc86f8b51457b05374c1b3bafcba598fa (patch)
treec9970d9e7d040c07b8b2bd9957ccefbec880701f /coin
parent2f1e53b55a7b743731337319fa6a3f6d835e9f30 (diff)
Implement module instructions for coin
Modules instructions will be defined in module itself as part of abstraction of instructions. Documentation how to use moduleconfig.yaml can be found on coins documentation page under Qt Ci for module maintainers. Task-number: COIN-291 Change-Id: I58dfa5902caf3e2a6d8c8f83dc5413e3b808db03 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Diffstat (limited to 'coin')
-rw-r--r--coin/module_config.yaml96
1 files changed, 96 insertions, 0 deletions
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
new file mode 100644
index 00000000..4f4bbd49
--- /dev/null
+++ b/coin/module_config.yaml
@@ -0,0 +1,96 @@
+version: 1
+accept_configuration:
+ condition: and
+ conditions:
+ - condition: property
+ property: host.osVersion
+ equals_value: Ubuntu_18_04
+ - condition: property
+ property: target.osVersion
+ equals_value: QEMU
+
+environment: &environment
+ type: Group
+ instructions:
+ - type: EnvironmentVariable
+ variableName: QT_QPA_PLATFORM
+ variableValue: offscreen
+ - type: Group
+ instructions:
+ - type: EnvironmentVariable
+ variableName: MACHINE
+ variableValue: jetson-tx1
+ - type: EnvironmentVariable
+ variableName: QEMU_LD_PREFIX
+ variableValue: "{{.Env.QEMUARM64_TOOLCHAIN_SYSROOT}}"
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: ARM64
+ - type: EnvironmentVariable
+ variableName: MACHINE
+ variableValue: nitrogen6x
+ disable_if:
+ condition: property
+ property: target.arch
+ equals_value: ARM64
+ - type: EnvironmentVariable
+ variableName: QEMU_LD_PREFIX
+ variableValue: "{{.Env.QEMUARMV7_TOOLCHAIN_SYSROOT}}"
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: ARMv7
+ - type: EnvironmentVariable
+ variableName: QEMU_LD_PREFIX
+ variableValue: "{{.Env.QEMUMIPS64_TOOLCHAIN_SYSROOT}}"
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: MIPS64
+
+build_instructions:
+ - *environment
+ - type: SetBuildDirectory
+ directory: "{{.AgentWorkingDir}}/build"
+ - type: MakeDirectory
+ directory: "{{.BuildDir}}"
+ - type: ChangeDirectory
+ directory: "{{.BuildDir}}"
+ - type: ExecuteCommand
+ command: ["sudo", "mkdir", "-p", "/mnt/yocto-cache"]
+ userMessageOnFailure: "Could not create '/mnt/yocto-cache' directory"
+ - type: ExecuteCommand
+ command: ["sudo", "mount", "yocto-cache.intra.qt.io:/srv/yocto-cache", "/mnt/yocto-cache"]
+ userMessageOnFailure: "Could not mount yocto cache."
+ - type: WriteFile
+ fileContents: |
+ #!/bin/bash -xe
+ source ./setup-environment.sh
+ export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR"
+ export SSTATE_DIR=/mnt/yocto-cache/sstate-caches/$(sed -n -e "s/DISTRO_CODENAME.*\"\(.*\)\"/\1/p" ../sources/poky/meta-*/conf/distro/poky.conf)
+ bitbake b2qt-embedded-qt5-image meta-toolchain-b2qt-embedded-qt5-sdk
+ SDKMACHINE=i686-mingw32 bitbake meta-toolchain-b2qt-embedded-qt5-sdk
+ filename: "{{.BuildDir}}/start-build"
+ fileMode: 420
+ - type: ExecuteCommand
+ command: ["chmod", "+x", "{{.BuildDir}}/start-build"]
+ userMessageOnFailure: "Could not add execution right to the start-build."
+ - type: EnvironmentVariable
+ variableName: DL_DIR
+ variableValue: "/mnt/yocto-cache/downloads"
+ - type: ExecuteCommand
+ command: ["{{.SourceDir}}/b2qt-init-build-env", "init", "--device", "{{.Env.MACHINE}}", "--reference", "/mnt/yocto-cache/mirror"]
+ maxTimeInSeconds: 1800
+ maxTimeBetweenOutput: 1800
+ userMessageOnFailure: "Failed to download the yocto recipes repositories"
+ - type: ExecuteCommand
+ command: ["{{.BuildDir}}/start-build"]
+ maxTimeInSeconds: 28800
+ maxTimeBetweenOutput: 28800
+ userMessageOnFailure: "Build failed."
+ - type: ExecuteCommand
+ command: ["sudo", "umount", "/mnt/yocto-cache"]
+ userMessageOnFailure: "Unmounting cache failed."
+
+test_instructions: []