aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rw-r--r--ci/96b-avenger96.yml6
-rw-r--r--ci/96b-nitrogen.yml20
-rw-r--r--ci/arduino-nano-33-ble.yml21
-rw-r--r--ci/base.yml39
-rwxr-xr-xci/check-machine-coverage26
-rwxr-xr-xci/check-warnings19
-rw-r--r--ci/frdm-kw41z.yml6
-rw-r--r--ci/intel-x86-64.yml10
-rwxr-xr-xci/jobs-to-kas26
-rw-r--r--ci/logging.yml13
-rw-r--r--ci/meta-openembedded.yml11
-rw-r--r--ci/mps2-an385.yml10
-rw-r--r--ci/mps2-an521.yml6
-rw-r--r--ci/mps3-an547.yml6
-rw-r--r--ci/nrf52840-mdk-usb-dongle.yml20
-rw-r--r--ci/nrf52840dk-nrf52840.yml21
-rw-r--r--ci/qemu-cortex-a53.yml10
-rw-r--r--ci/qemu-cortex-a9.yml10
-rw-r--r--ci/qemu-cortex-m0.yml11
-rw-r--r--ci/qemu-cortex-m3.yml6
-rw-r--r--ci/qemu-cortex-r5.yml6
-rw-r--r--ci/qemu-nios2.yml7
-rw-r--r--ci/qemu-x86.yml10
-rw-r--r--ci/stm32mp157c-dk2.yml13
-rw-r--r--ci/testimage.yml9
-rwxr-xr-xci/update-repos40
-rw-r--r--ci/v2m-beetle.yml10
-rw-r--r--ci/v2m-musca-b1.yml6
-rw-r--r--ci/v2m-musca-s1.yml6
-rw-r--r--ci/zephyr-toolchain.yml11
30 files changed, 415 insertions, 0 deletions
diff --git a/ci/96b-avenger96.yml b/ci/96b-avenger96.yml
new file mode 100644
index 0000000..bcdccf3
--- /dev/null
+++ b/ci/96b-avenger96.yml
@@ -0,0 +1,6 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: 96b-avenger96
diff --git a/ci/96b-nitrogen.yml b/ci/96b-nitrogen.yml
new file mode 100644
index 0000000..9b685fe
--- /dev/null
+++ b/ci/96b-nitrogen.yml
@@ -0,0 +1,20 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: 96b-nitrogen
+
+target:
+ - zephyr-blinky
+ - zephyr-coap-client
+ - zephyr-coap-server
+ - zephyr-echo-client
+ - zephyr-hci-uart
+ - zephyr-helloworld
+ - zephyr-http-client
+ - zephyr-kernel-test-all
+ - zephyr-mqtt-publisher
+ - zephyr-peripheral-esp
+ - zephyr-peripheral-hr
+ - zephyr-philosophers
diff --git a/ci/arduino-nano-33-ble.yml b/ci/arduino-nano-33-ble.yml
new file mode 100644
index 0000000..1035118
--- /dev/null
+++ b/ci/arduino-nano-33-ble.yml
@@ -0,0 +1,21 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: arduino-nano-33-ble
+
+target:
+ - zephyr-blinky
+ - zephyr-coap-client
+ - zephyr-coap-server
+ - zephyr-echo-client
+ - zephyr-helloworld
+ - zephyr-http-client
+ - zephyr-kernel-test-all
+ - zephyr-mqtt-publisher
+ - zephyr-openthread-echo-client
+ - zephyr-openthread-rcp
+ - zephyr-peripheral-esp
+ - zephyr-peripheral-hr
+ - zephyr-philosophers
diff --git a/ci/base.yml b/ci/base.yml
new file mode 100644
index 0000000..70adac1
--- /dev/null
+++ b/ci/base.yml
@@ -0,0 +1,39 @@
+header:
+ version: 11
+ includes:
+ - ci/meta-openembedded.yml
+
+distro: zephyr
+
+defaults:
+ repos:
+ refspec: master
+
+repos:
+ meta-zephyr:
+ layers:
+ meta-zephyr-core:
+ meta-zephyr-bsp:
+
+ poky:
+ url: https://git.yoctoproject.org/git/poky
+ layers:
+ meta:
+ meta-poky:
+
+env:
+ BB_LOGCONFIG: ""
+
+local_conf_header:
+ base: |
+ BB_SERVER_TIMEOUT = "60"
+ CONF_VERSION = "2"
+ INHERIT += "rm_work"
+
+machine: unset
+
+target:
+ - zephyr-helloworld
+ - zephyr-kernel-test-all
+ - zephyr-philosophers
+ - zephyr-synchronization
diff --git a/ci/check-machine-coverage b/ci/check-machine-coverage
new file mode 100755
index 0000000..19f9571
--- /dev/null
+++ b/ci/check-machine-coverage
@@ -0,0 +1,26 @@
+#! /usr/bin/env python3
+
+from pathlib import Path
+import sys
+
+metazephyr = Path.cwd()
+
+if metazephyr.name != "meta-zephyr":
+ print("Not running inside meta-zephyr")
+ sys.exit(1)
+
+# All machine configurations
+machines = metazephyr.glob("meta-zephyr-bsp/conf/machine/*.conf")
+machines = set(p.stem for p in machines)
+
+# All kas files
+kas = metazephyr.glob("ci/*.yml")
+kas = set(p.stem for p in kas)
+
+missing = machines - kas
+print(f"The following machines are missing: {', '.join(sorted(missing))}.")
+
+covered = len(machines) - len(missing)
+total = len(machines)
+percent = int(covered / total * 100)
+print(f"Coverage: {percent}%")
diff --git a/ci/check-warnings b/ci/check-warnings
new file mode 100755
index 0000000..9d08010
--- /dev/null
+++ b/ci/check-warnings
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+# Expects the path to a log file as $1, and if this file has any content
+# then display the contents and exit with an error code.
+
+set -e -u
+
+LOGFILE=$1
+
+LINES=$(grep --invert-match "relocations in \.text" $LOGFILE | wc -l)
+if test "$LINES" -ne 0; then
+ echo ==============================
+ echo The build had warnings/errors:
+ echo ==============================
+ cat $LOGFILE
+ exit 1
+fi
+
+exit 0
diff --git a/ci/frdm-kw41z.yml b/ci/frdm-kw41z.yml
new file mode 100644
index 0000000..cb1ce1f
--- /dev/null
+++ b/ci/frdm-kw41z.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: frdm-kw41z
diff --git a/ci/intel-x86-64.yml b/ci/intel-x86-64.yml
new file mode 100644
index 0000000..2eda5a4
--- /dev/null
+++ b/ci/intel-x86-64.yml
@@ -0,0 +1,10 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "gen_isr_table"
+
+machine: intel-x86-64
diff --git a/ci/jobs-to-kas b/ci/jobs-to-kas
new file mode 100755
index 0000000..296bb0d
--- /dev/null
+++ b/ci/jobs-to-kas
@@ -0,0 +1,26 @@
+#! /bin/bash
+
+# This script is expecting an input of machine name, optionally followed by a
+# colon and a list of one or more parameters separated by commas between
+# brackets. For example, the following are acceptable:
+# qemu-x86
+# qemu-cortex-m3: [testimage]
+# qemu-cortex-a53: [zephyr-toolchain, testimage]
+#
+# Turn this list into a series of yml files separated by colons to pass to kas
+
+set -e -u
+
+FILES="ci/$(echo $1 | cut -d ':' -f 1).yml"
+
+for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
+ # Given that there is no yml file for default, we can simply ignore those
+ # parameters. They are necessary to pass in so that matrix can correctly
+ # setup all of the permutations of each individual run.
+ if [[ $i == 'default' ]]; then
+ continue
+ fi
+ FILES+=":ci/$i.yml"
+done
+
+echo $FILES
diff --git a/ci/logging.yml b/ci/logging.yml
new file mode 100644
index 0000000..3af1029
--- /dev/null
+++ b/ci/logging.yml
@@ -0,0 +1,13 @@
+# Python logging configuration to write all warnings to a separate file
+version: 1
+
+handlers:
+ warnings:
+ class: logging.FileHandler
+ level: WARNING
+ filename: warnings.log
+ formatter: BitBake.logfileFormatter
+
+loggers:
+ BitBake:
+ handlers: [warnings]
diff --git a/ci/meta-openembedded.yml b/ci/meta-openembedded.yml
new file mode 100644
index 0000000..bed338d
--- /dev/null
+++ b/ci/meta-openembedded.yml
@@ -0,0 +1,11 @@
+header:
+ version: 11
+
+repos:
+ meta-openembedded:
+ url: https://git.openembedded.org/meta-openembedded
+ layers:
+ meta-filesystems:
+ meta-networking:
+ meta-oe:
+ meta-python:
diff --git a/ci/mps2-an385.yml b/ci/mps2-an385.yml
new file mode 100644
index 0000000..caa685e
--- /dev/null
+++ b/ci/mps2-an385.yml
@@ -0,0 +1,10 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "gen_isr_table"
+
+machine: mps2-an385
diff --git a/ci/mps2-an521.yml b/ci/mps2-an521.yml
new file mode 100644
index 0000000..13259cf
--- /dev/null
+++ b/ci/mps2-an521.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: mps2-an521
diff --git a/ci/mps3-an547.yml b/ci/mps3-an547.yml
new file mode 100644
index 0000000..372ec04
--- /dev/null
+++ b/ci/mps3-an547.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: mps3-an547
diff --git a/ci/nrf52840-mdk-usb-dongle.yml b/ci/nrf52840-mdk-usb-dongle.yml
new file mode 100644
index 0000000..e9a36a0
--- /dev/null
+++ b/ci/nrf52840-mdk-usb-dongle.yml
@@ -0,0 +1,20 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: nrf52840-mdk-usb-dongle
+
+target:
+ - zephyr-blinky
+ - zephyr-coap-client
+ - zephyr-coap-server
+ - zephyr-echo-client
+ - zephyr-helloworld
+ - zephyr-http-client
+ - zephyr-kernel-test-all
+ - zephyr-mqtt-publisher
+ - zephyr-openthread-rcp
+ - zephyr-peripheral-esp
+ - zephyr-peripheral-hr
+ - zephyr-philosophers
diff --git a/ci/nrf52840dk-nrf52840.yml b/ci/nrf52840dk-nrf52840.yml
new file mode 100644
index 0000000..1b16af1
--- /dev/null
+++ b/ci/nrf52840dk-nrf52840.yml
@@ -0,0 +1,21 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: nrf52840dk-nrf52840
+
+target:
+ - zephyr-blinky
+ - zephyr-coap-client
+ - zephyr-coap-server
+ - zephyr-echo-client
+ - zephyr-helloworld
+ - zephyr-http-client
+ - zephyr-kernel-test-all
+ - zephyr-lvgl
+ - zephyr-mqtt-publisher
+ - zephyr-openthread-rcp
+ - zephyr-peripheral-esp
+ - zephyr-peripheral-hr
+ - zephyr-philosophers
diff --git a/ci/qemu-cortex-a53.yml b/ci/qemu-cortex-a53.yml
new file mode 100644
index 0000000..d959075
--- /dev/null
+++ b/ci/qemu-cortex-a53.yml
@@ -0,0 +1,10 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "gen_isr_table"
+
+machine: qemu-cortex-a53
diff --git a/ci/qemu-cortex-a9.yml b/ci/qemu-cortex-a9.yml
new file mode 100644
index 0000000..d75ea4d
--- /dev/null
+++ b/ci/qemu-cortex-a9.yml
@@ -0,0 +1,10 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "common gen_isr_table poll queue"
+
+machine: qemu-cortex-a9
diff --git a/ci/qemu-cortex-m0.yml b/ci/qemu-cortex-m0.yml
new file mode 100644
index 0000000..a3da2ae
--- /dev/null
+++ b/ci/qemu-cortex-m0.yml
@@ -0,0 +1,11 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: qemu-cortex-m0
+
+target:
+ - zephyr-helloworld
+ - zephyr-kernel-test-all
+ - zephyr-synchronization
diff --git a/ci/qemu-cortex-m3.yml b/ci/qemu-cortex-m3.yml
new file mode 100644
index 0000000..46fd551
--- /dev/null
+++ b/ci/qemu-cortex-m3.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: qemu-cortex-m3
diff --git a/ci/qemu-cortex-r5.yml b/ci/qemu-cortex-r5.yml
new file mode 100644
index 0000000..6e5ca81
--- /dev/null
+++ b/ci/qemu-cortex-r5.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: qemu-cortex-r5
diff --git a/ci/qemu-nios2.yml b/ci/qemu-nios2.yml
new file mode 100644
index 0000000..30a560a
--- /dev/null
+++ b/ci/qemu-nios2.yml
@@ -0,0 +1,7 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+
+machine: qemu-nios2
diff --git a/ci/qemu-x86.yml b/ci/qemu-x86.yml
new file mode 100644
index 0000000..ab92917
--- /dev/null
+++ b/ci/qemu-x86.yml
@@ -0,0 +1,10 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "gen_isr_table pending"
+
+machine: qemu-x86
diff --git a/ci/stm32mp157c-dk2.yml b/ci/stm32mp157c-dk2.yml
new file mode 100644
index 0000000..3dc04a5
--- /dev/null
+++ b/ci/stm32mp157c-dk2.yml
@@ -0,0 +1,13 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: stm32mp157c-dk2
+
+target:
+ - zephyr-blinky
+ - zephyr-helloworld
+ - zephyr-kernel-test-all
+ - zephyr-philosophers
+ - zephyr-openamp-rsc-table
diff --git a/ci/testimage.yml b/ci/testimage.yml
new file mode 100644
index 0000000..83e17a7
--- /dev/null
+++ b/ci/testimage.yml
@@ -0,0 +1,9 @@
+header:
+ version: 11
+
+local_conf_header:
+ testimage: |
+ IMAGE_CLASSES += "testimage"
+ TEST_TARGET = "QemuTargetZephyr"
+ TEST_SUITES = "zephyr"
+ TESTIMAGE_AUTO = "1"
diff --git a/ci/update-repos b/ci/update-repos
new file mode 100755
index 0000000..fa638aa
--- /dev/null
+++ b/ci/update-repos
@@ -0,0 +1,40 @@
+#! /usr/bin/env python3
+
+# Update clones of the repositories we need in KAS_REPO_REF_DIR to speed up fetches
+
+import sys
+import os
+import subprocess
+import pathlib
+
+def repo_shortname(url):
+ # Taken from Kas (Repo.__getattr__) to ensure the logic is right
+ from urllib.parse import urlparse
+ url = urlparse(url)
+ return ('{url.netloc}{url.path}'
+ .format(url=url)
+ .replace('@', '.')
+ .replace(':', '.')
+ .replace('/', '.')
+ .replace('*', '.'))
+
+repositories = (
+ "https://git.yoctoproject.org/git/poky",
+ "https://git.openembedded.org/meta-openembedded",
+)
+
+if __name__ == "__main__":
+ if "KAS_REPO_REF_DIR" not in os.environ:
+ print("KAS_REPO_REF_DIR needs to be set")
+ sys.exit(1)
+
+ base_repodir = pathlib.Path(os.environ["KAS_REPO_REF_DIR"])
+
+ for repo in repositories:
+ repodir = base_repodir / repo_shortname(repo)
+ if repodir.exists():
+ print("Updating %s..." % repo)
+ subprocess.run(["git", "-C", repodir, "fetch"], check=True)
+ else:
+ print("Cloning %s..." % repo)
+ subprocess.run(["git", "clone", "--bare", repo, repodir], check=True)
diff --git a/ci/v2m-beetle.yml b/ci/v2m-beetle.yml
new file mode 100644
index 0000000..51a4225
--- /dev/null
+++ b/ci/v2m-beetle.yml
@@ -0,0 +1,10 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "gen_isr_table"
+
+machine: v2m-beetle
diff --git a/ci/v2m-musca-b1.yml b/ci/v2m-musca-b1.yml
new file mode 100644
index 0000000..490f295
--- /dev/null
+++ b/ci/v2m-musca-b1.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: v2m-musca-b1
diff --git a/ci/v2m-musca-s1.yml b/ci/v2m-musca-s1.yml
new file mode 100644
index 0000000..4451ff0
--- /dev/null
+++ b/ci/v2m-musca-s1.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: v2m-musca-s1
diff --git a/ci/zephyr-toolchain.yml b/ci/zephyr-toolchain.yml
new file mode 100644
index 0000000..ab8baa3
--- /dev/null
+++ b/ci/zephyr-toolchain.yml
@@ -0,0 +1,11 @@
+header:
+ version: 11
+
+# The Zephyr toolchain is standalone and does not depend on TCMODE or TCLIB, so
+# validate that it is possible to build Zephyr applications alongside a
+# poky-based Linux distro
+distro: poky
+
+local_conf_header:
+ zephyr-toolchain: |
+ ZEPHYR_TOOLCHAIN_VARIANT = "zephyr"