summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2023-05-29 15:24:10 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2023-06-05 15:35:23 +0300
commitf5c68b4fb7f714b526b28ee9c20e7102937124af (patch)
tree457f1d9a581c80de36db378e92ae5b84d671256d
parent1e7b7e5dc71859c79f84e729fb99d7ea904a482e (diff)
Add CI support
Build common targets against different Qt versions. Task-number: QTBUG-108502 Change-Id: I742b1e64bde822850f79da1dfc263507f20062d4 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
-rw-r--r--coin/dependencies.yaml5
-rw-r--r--coin/module_config.yaml111
2 files changed, 116 insertions, 0 deletions
diff --git a/coin/dependencies.yaml b/coin/dependencies.yaml
new file mode 100644
index 0000000..e708d8e
--- /dev/null
+++ b/coin/dependencies.yaml
@@ -0,0 +1,5 @@
+product_dependency:
+ ../../qt/qt5:
+ ref: "dev"
+dependencies:
+ {}
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
new file mode 100644
index 0000000..9311db5
--- /dev/null
+++ b/coin/module_config.yaml
@@ -0,0 +1,111 @@
+version: 2
+tags: ["git"]
+accept_configuration:
+ condition: and
+ conditions:
+ - condition: property
+ property: host.compiler
+ equals_value: Yocto
+ - condition: property
+ property: target.arch
+ in_values: [TARGET1, TARGET2, TARGET3]
+
+machine_type:
+ Build:
+ cores: 16
+
+target1: &target1
+ type: Group
+ instructions:
+ - type: EnvironmentVariable
+ variableName: MACHINE
+ variableValue: apalis-imx8
+ - type: EnvironmentVariable
+ variableName: MANIFEST
+ variableValue: toradex/dev.xml
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: TARGET1
+target2: &target2
+ type: Group
+ instructions:
+ - type: EnvironmentVariable
+ variableName: MACHINE
+ variableValue: apalis-imx6
+ - type: EnvironmentVariable
+ variableName: MANIFEST
+ variableValue: toradex/6.5.xml
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: TARGET2
+target3: &target3
+ type: Group
+ instructions:
+ - type: EnvironmentVariable
+ variableName: MACHINE
+ variableValue: colibri-imx6ull
+ - type: EnvironmentVariable
+ variableName: MANIFEST
+ variableValue: toradex/lts-6.2.xml
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: TARGET3
+
+instructions:
+ Build:
+ - *target1
+ - *target2
+ - *target3
+ - 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.ci.qt.io:/srv/yocto-cache /mnt/yocto-cache
+
+ curl https://storage.googleapis.com/git-repo-downloads/repo > repo
+ chmod +x repo
+
+ ./repo init \
+ --repo-url https://github.com/theqtcompany/git-repo \
+ -u git://code.qt.io/yocto/boot2qt-manifest \
+ -m ${MANIFEST} \
+ --reference /mnt/yocto-cache/mirror \
+ --group all
+ ./repo sync
+
+ rm -rf sources/meta-boot2qt-toradex
+ ln -s ${SOURCE_DIR} sources/meta-boot2qt-toradex
+
+ source ./setup-environment.sh build
+ echo "require ../sources/meta-qt6/coin/test-ci.inc" >> conf/local.conf
+
+ bitbake meta-b2qt-embedded-qbsp
+ SDKMACHINE=x86_64-mingw32 bitbake meta-b2qt-embedded-qbsp
+ filename: "{{.BuildDir}}/start-build"
+ fileMode: 420
+ - type: ExecuteCommand
+ command: ["bash", "-xe", "{{.BuildDir}}/start-build"]
+ maxTimeInSeconds: 43200
+ maxTimeBetweenOutput: 7200
+ userMessageOnFailure: "Build failed."
+ - type: ExecuteCommand
+ command: ["sudo", "umount", "/mnt/yocto-cache"]
+ userMessageOnFailure: "Unmounting cache failed."
+
+ Test: []