[v3,13/16] ci: Add compat arch support

Message ID 037da8927c218b9f8b1886b8629e07e4dd40d422.1600788534.git.jan.kiszka@siemens.com
State Accepted, archived
Headers show
Series Complete backlog: SDK, compat arch, assorting fixed and cleanups | expand

Commit Message

Jan Kiszka Sept. 22, 2020, 7:28 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Build hello-isar and libisar for the compat arch if that is enabled.
Set ISAR_ENABLE_COMPAT_ARCH for all supported combinations in CI.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta-isar/recipes-app/hello-isar/hello-isar.bb | 3 +++
 meta-isar/recipes-app/libhello/libhello.bb     | 3 +++
 scripts/ci_build.sh                            | 6 ++++++
 3 files changed, 12 insertions(+)

Patch

diff --git a/meta-isar/recipes-app/hello-isar/hello-isar.bb b/meta-isar/recipes-app/hello-isar/hello-isar.bb
index 144a433e..8c3ba8b2 100644
--- a/meta-isar/recipes-app/hello-isar/hello-isar.bb
+++ b/meta-isar/recipes-app/hello-isar/hello-isar.bb
@@ -20,4 +20,7 @@  SRC_URI = " \
     file://yet-another-change.txt;apply=yes;striplevel=0"
 SRCREV = "a18c14cc11ce6b003f3469e89223cffb4016861d"
 
+# NOTE: This is just to test 32-bit building on 64-bit archs.
+PACKAGE_ARCH_compat-arch = "${COMPAT_DISTRO_ARCH}"
+
 inherit dpkg
diff --git a/meta-isar/recipes-app/libhello/libhello.bb b/meta-isar/recipes-app/libhello/libhello.bb
index ab271b58..5c44de50 100644
--- a/meta-isar/recipes-app/libhello/libhello.bb
+++ b/meta-isar/recipes-app/libhello/libhello.bb
@@ -13,4 +13,7 @@  PV = "0.1-98f2e41"
 SRC_URI = "git://github.com/ilbers/libhello.git;protocol=https;destsuffix=${P}"
 SRCREV = "98f2e41e7d05ab8d19b0c5d160b104b725c8fd93"
 
+# NOTE: This is just to test 32-bit building on 64-bit archs.
+PACKAGE_ARCH_compat-arch = "${COMPAT_DISTRO_ARCH}"
+
 inherit dpkg
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index af996d19..a5eee82b 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -139,6 +139,12 @@  if [ ! -d "$BUILD_DIR" ]; then
 fi
 source isar-init-build-env "$BUILD_DIR"
 
+cat >>conf/local.conf <<EOF
+ISAR_ENABLE_COMPAT_ARCH_amd64 = "1"
+ISAR_ENABLE_COMPAT_ARCH_arm64 = "1"
+ISAR_ENABLE_COMPAT_ARCH_debian-stretch_amd64 = "0"
+EOF
+
 if [ -n "$CROSS_BUILD" ]; then
     sed -i -e 's/ISAR_CROSS_COMPILE ?= "0"/ISAR_CROSS_COMPILE ?= "1"/g' conf/local.conf
 fi