summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2023-06-01 12:21:17 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2023-06-06 08:57:22 +0300
commit3b983f06989b49fa7a90133659939401bf2f5486 (patch)
tree951205b78e32fadfce460441ded9a9d5382777f4
parent67ecbef5948a0c99b914e56bf3389e527cd88df1 (diff)
Add CI support
Build common targets against different Qt versions. Task-number: QTBUG-108502 Change-Id: Ic5dc8fd17212da8d0150cc2096b96a0b23374a1e 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..0ee714b
--- /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: stm32mp15-disco
+ - type: EnvironmentVariable
+ variableName: MANIFEST
+ variableValue: st/dev.xml
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: TARGET1
+target2: &target2
+ type: Group
+ instructions:
+ - type: EnvironmentVariable
+ variableName: MACHINE
+ variableValue: stm32mp15-eval
+ - type: EnvironmentVariable
+ variableName: MANIFEST
+ variableValue: st/6.5.xml
+ enable_if:
+ condition: property
+ property: target.arch
+ equals_value: TARGET2
+target3: &target3
+ type: Group
+ instructions:
+ - type: EnvironmentVariable
+ variableName: MACHINE
+ variableValue: stm32mp15-disco
+ - type: EnvironmentVariable
+ variableName: MANIFEST
+ variableValue: st/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-st
+ ln -s ${SOURCE_DIR} sources/meta-boot2qt-st
+
+ 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: []