diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2019-07-29 12:53:41 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2019-08-12 09:51:23 +0000 |
commit | 2d76ded04e27038664c36dff51c57dfc0f490bea (patch) | |
tree | e1947f42e4b2cd0a3adec24c8e27057a63bf4d1f | |
parent | e1bf33d16f6131b7af2603c0e4a6e952148ef53b (diff) | |
download | meta-qt5-2d76ded04e27038664c36dff51c57dfc0f490bea.tar.gz |
Add CI build instructions
Instructions for Coin integration builds are defined in a yaml file.
Use fixed sha1s for poky and openembedded meta layers and build
all recipes located in meta-qt5 layer. Include world_fixes used
by the upstream yocto projects.
Task-number: QTPM-1138
Change-Id: I88a8c2551fd3016fa5a7409142d77d876e936656
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
-rw-r--r-- | .gitattributes | 1 | ||||
-rw-r--r-- | coin/module_config.yaml | 180 |
2 files changed, 181 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes index cb2381c0..f6a86105 100644 --- a/.gitattributes +++ b/.gitattributes | |||
@@ -1,2 +1,3 @@ | |||
1 | /coin export-ignore | ||
1 | # linguist overrides | 2 | # linguist overrides |
2 | recipes-*/**/*.inc linguist-language=BitBake | 3 | recipes-*/**/*.inc linguist-language=BitBake |
diff --git a/coin/module_config.yaml b/coin/module_config.yaml new file mode 100644 index 00000000..263d8f04 --- /dev/null +++ b/coin/module_config.yaml | |||
@@ -0,0 +1,180 @@ | |||
1 | version: 1 | ||
2 | accept_configuration: | ||
3 | condition: and | ||
4 | conditions: | ||
5 | - condition: property | ||
6 | property: host.osVersion | ||
7 | equals_value: Ubuntu_18_04 | ||
8 | - condition: property | ||
9 | property: target.osVersion | ||
10 | equals_value: QEMU | ||
11 | - condition: property | ||
12 | property: target.arch | ||
13 | in_values: [ARMv7, ARM64] | ||
14 | |||
15 | environment: &environment | ||
16 | type: Group | ||
17 | instructions: | ||
18 | - type: EnvironmentVariable | ||
19 | variableName: POKY_SHA1 | ||
20 | variableValue: 38d5c8ea98cfa49825c473eba8984c12edf062be | ||
21 | - type: EnvironmentVariable | ||
22 | variableName: OE_SHA1 | ||
23 | variableValue: 8d5dcd6522e9d15e68637b6d7dda0401f9bb91d0 | ||
24 | - type: EnvironmentVariable | ||
25 | variableName: MACHINE | ||
26 | variableValue: qemuarm64 | ||
27 | enable_if: | ||
28 | condition: property | ||
29 | property: target.arch | ||
30 | equals_value: ARM64 | ||
31 | - type: EnvironmentVariable | ||
32 | variableName: MACHINE | ||
33 | variableValue: qemux86 | ||
34 | enable_if: | ||
35 | condition: property | ||
36 | property: target.arch | ||
37 | equals_value: ARMv7 | ||
38 | |||
39 | build_instructions: | ||
40 | - *environment | ||
41 | - type: SetBuildDirectory | ||
42 | directory: "{{.AgentWorkingDir}}/build" | ||
43 | - type: MakeDirectory | ||
44 | directory: "{{.BuildDir}}" | ||
45 | - type: ChangeDirectory | ||
46 | directory: "{{.BuildDir}}" | ||
47 | - type: ExecuteCommand | ||
48 | command: ["sudo", "mkdir", "-p", "/mnt/yocto-cache"] | ||
49 | userMessageOnFailure: "Could not create '/mnt/yocto-cache' directory" | ||
50 | - type: ExecuteCommand | ||
51 | command: ["sudo", "mount", "yocto-cache.intra.qt.io:/srv/yocto-cache", "/mnt/yocto-cache"] | ||
52 | userMessageOnFailure: "Could not mount yocto cache." | ||
53 | - type: WriteFile | ||
54 | fileContents: | | ||
55 | # https://github.com/shr-project/jenkins-jobs/blob/master/jenkins-job.sh | ||
56 | INHERIT += "reproducible_build_simple" | ||
57 | # We want musl and glibc to share the same tmpfs, so instead of appending default "-${TCLIBC}" we append "fs" | ||
58 | TCLIBCAPPEND = "fs" | ||
59 | PREFERRED_PROVIDER_udev = "systemd" | ||
60 | PREFERRED_PROVIDER_virtual/fftw = "fftw" | ||
61 | # use gold | ||
62 | DISTRO_FEATURES_append = " ld-is-gold" | ||
63 | # use ptest | ||
64 | DISTRO_FEATURES_append = " ptest" | ||
65 | # use systemd | ||
66 | DISTRO_FEATURES_append = " systemd" | ||
67 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" | ||
68 | VIRTUAL-RUNTIME_init_manager = "systemd" | ||
69 | VIRTUAL-RUNTIME_initscripts = "" | ||
70 | # use opengl | ||
71 | DISTRO_FEATURES_append = " opengl" | ||
72 | # use wayland to fix building weston and qtwayland | ||
73 | DISTRO_FEATURES_append = " wayland" | ||
74 | PREFERRED_PROVIDER_jpeg = "libjpeg-turbo" | ||
75 | PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native" | ||
76 | PREFERRED_PROVIDER_gpsd = "gpsd" | ||
77 | PREFERRED_PROVIDER_e-wm-sysactions = "e-wm" | ||
78 | ESYSACTIONS = "e-wm-sysactions" | ||
79 | # don't pull libhybris unless explicitly asked for | ||
80 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | ||
81 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" | ||
82 | PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" | ||
83 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" | ||
84 | # to fix fsoaudiod, alsa-state conflict in shr-image-all | ||
85 | VIRTUAL-RUNTIME_alsa-state = "" | ||
86 | # to prevent alsa-state being pulled into -dev or -dbg images | ||
87 | RDEPENDS_${PN}-dev_pn-alsa-state = "" | ||
88 | RDEPENDS_${PN}-dbg_pn-alsa-state = "" | ||
89 | # to fix dependency on conflicting x11-common from packagegroup-core-x11 | ||
90 | VIRTUAL-RUNTIME_xserver_common ?= "xserver-common" | ||
91 | RDEPENDS_${PN}-dev_pn-x11-common = "" | ||
92 | RDEPENDS_${PN}-dbg_pn-x11-common = "" | ||
93 | # to fix apm, fso-apm conflict in shr-image-all | ||
94 | VIRTUAL-RUNTIME_apm = "fso-apm" | ||
95 | # require conf/distro/include/qt5-versions.inc | ||
96 | # QT5_VERSION = "5.4.0+git%" | ||
97 | # for qtwebkit etc | ||
98 | # see https://bugzilla.yoctoproject.org/show_bug.cgi?id=5013 | ||
99 | # DEPENDS_append_pn-qtbase = " mesa" | ||
100 | PACKAGECONFIG_append_pn-qtbase = " icu gl accessibility freetype fontconfig" | ||
101 | # qtwayland doesn't like egl and xcomposite-glx enabled at the same time | ||
102 | # http://lists.openembedded.org/pipermail/openembedded-devel/2016-December/110444.html | ||
103 | PACKAGECONFIG_remove_pn-qtwayland = "xcomposite-egl xcomposite-glx" | ||
104 | # for webkit-efl | ||
105 | PACKAGECONFIG_append_pn-harfbuzz = " icu" | ||
106 | inherit blacklist | ||
107 | # PNBLACKLIST[samsung-rfs-mgr] = "needs newer libsamsung-ipc with negative D_P: Requested 'samsung-ipc-1.0 >= 0.2' but version of libsamsung-ipc is 0.1.0" | ||
108 | PNBLACKLIST[android-system] = "depends on lxc from meta-virtualiazation which isn't included in my world builds" | ||
109 | PNBLACKLIST[bigbuckbunny-1080p] = "big and doesn't really need to be tested so much" | ||
110 | PNBLACKLIST[bigbuckbunny-480p] = "big and doesn't really need to be tested so much" | ||
111 | PNBLACKLIST[bigbuckbunny-720p] = "big and doesn't really need to be tested so much" | ||
112 | PNBLACKLIST[bigbuckbunny-720p] = "big and doesn't really need to be tested so much" | ||
113 | PNBLACKLIST[tearsofsteel-1080p] = "big and doesn't really need to be tested so much" | ||
114 | PNBLACKLIST[build-appliance-image] = "tries to include whole downloads directory in /home/builder/poky :/" | ||
115 | # enable reporting | ||
116 | # needs http://patchwork.openembedded.org/patch/68735/ | ||
117 | #ERR_REPORT_SERVER = "errors.yoctoproject.org" | ||
118 | #ERR_REPORT_PORT = "80" | ||
119 | #ERR_REPORT_USERNAME = "Martin Jansa" | ||
120 | #ERR_REPORT_EMAIL = "Martin.Jansa@gmail.com" | ||
121 | #ERR_REPORT_UPLOAD_FAILURES = "1" | ||
122 | #INHERIT += "report-error" | ||
123 | # needs patch with buildstats-summary.bbclass | ||
124 | INHERIT += "buildstats buildstats-summary" | ||
125 | # be more strict with QA warnings, turn them all to errors: | ||
126 | ERROR_QA_append = " ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi textrel already-stripped incompatible-license files-invalid installed-vs-shipped compile-host-path install-host-path pn-overrides infodir build-deps unknown-configure-option symlink-to-sysroot multilib invalid-packageconfig host-user-contaminated uppercase-pn" | ||
127 | WARN_QA_remove = " ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi textrel already-stripped incompatible-license files-invalid installed-vs-shipped compile-host-path install-host-path pn-overrides infodir build-deps unknown-configure-option symlink-to-sysroot multilib invalid-packageconfig host-user-contaminated uppercase-pn" | ||
128 | # enable thumb for broader test coverage (oe-core autobuilder doesn't have thumb enabled) | ||
129 | PREFERRED_ARM_INSTRUCTION_SET ?= "thumb" | ||
130 | ARM_INSTRUCTION_SET = "${PREFERRED_ARM_INSTRUCTION_SET}" | ||
131 | # use musl for qemux86 and qemux86copy | ||
132 | TCLIBC_qemux86 = "musl" | ||
133 | TCLIBC_qemux86copy = "musl" | ||
134 | # limit parallel make to avoid OOM | ||
135 | PARALLEL_MAKE_pn-qtwebkit = "-j 8" | ||
136 | filename: "{{.BuildDir}}/world_fixes.inc" | ||
137 | fileMode: 420 | ||
138 | - type: WriteFile | ||
139 | fileContents: | | ||
140 | #!/bin/bash -xe | ||
141 | git clone git://git.yoctoproject.org/poky --reference /mnt/yocto-cache/mirror/poky.git | ||
142 | (cd poky; git checkout ${POKY_SHA1}) | ||
143 | git clone git://github.com/openembedded/meta-openembedded --reference /mnt/yocto-cache/mirror/meta-openembedded.git | ||
144 | (cd meta-openembedded; git checkout ${OE_SHA1}) | ||
145 | |||
146 | source ./poky/oe-init-build-env | ||
147 | export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR" | ||
148 | export DL_DIR=/mnt/yocto-cache/downloads | ||
149 | export BB_GENERATE_MIRROR_TARBALLS=1 | ||
150 | export SSTATE_DIR=/mnt/yocto-cache/sstate-caches/$(sed -n -e "s/DISTRO_CODENAME.*\"\(.*\)\"/\1/p" ../poky/meta-*/conf/distro/poky.conf) | ||
151 | bitbake-layers add-layer ../meta-openembedded/meta-oe | ||
152 | bitbake-layers add-layer ${SOURCE_DIR} | ||
153 | |||
154 | echo 'require ../world_fixes.inc' >> conf/local.conf | ||
155 | |||
156 | # EXCLUDE_FROM_WORLD | ||
157 | rm -f ${SOURCE_DIR}/recipes-qt/examples/qt5-opengles2-test_git.bb | ||
158 | |||
159 | bitbake $(find ${SOURCE_DIR} -name *.bb | xargs -n1 basename | sed -e 's/\([^._]*\).*/\1/') | ||
160 | filename: "{{.BuildDir}}/start-build" | ||
161 | fileMode: 420 | ||
162 | - type: ExecuteCommand | ||
163 | command: ["chmod", "+x", "{{.BuildDir}}/start-build"] | ||
164 | userMessageOnFailure: "Could not add execution right to the start-build." | ||
165 | - type: EnvironmentVariable | ||
166 | variableName: DL_DIR | ||
167 | variableValue: "/mnt/yocto-cache/downloads" | ||
168 | - type: EnvironmentVariable | ||
169 | variableName: SOURCE_DIR | ||
170 | variableValue: "{{.SourceDir}}" | ||
171 | - type: ExecuteCommand | ||
172 | command: ["{{.BuildDir}}/start-build"] | ||
173 | maxTimeInSeconds: 28800 | ||
174 | maxTimeBetweenOutput: 28800 | ||
175 | userMessageOnFailure: "Build failed." | ||
176 | - type: ExecuteCommand | ||
177 | command: ["sudo", "umount", "/mnt/yocto-cache"] | ||
178 | userMessageOnFailure: "Unmounting cache failed." | ||
179 | |||
180 | test_instructions: [] | ||