From f5c68b4fb7f714b526b28ee9c20e7102937124af Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 29 May 2023 15:24:10 +0300 Subject: Add CI support Build common targets against different Qt versions. Task-number: QTBUG-108502 Change-Id: I742b1e64bde822850f79da1dfc263507f20062d4 Reviewed-by: Mikko Gronoff --- coin/dependencies.yaml | 5 +++ coin/module_config.yaml | 111 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 coin/dependencies.yaml create mode 100644 coin/module_config.yaml 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: [] -- cgit v1.2.3