From 5f1fc49661829b8d5bfbd515eef050d9196feda4 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 4 Apr 2024 14:09:55 +0200 Subject: [PATCH 01/46] Add qemu testing to CI --- .github/workflows/qemu.yaml | 63 ++++++++ .gitignore | 2 + scripts/run_in_vm.sh | 36 +++++ scripts/setup/requirements.all.txt | 1 + scripts/tests/chiptest/linux.py | 175 ++++++++++++++++++++++ scripts/tests/chiptest/test_definition.py | 25 +++- scripts/tests/run_test_suite.py | 36 ++++- 7 files changed, 327 insertions(+), 11 deletions(-) create mode 100755 scripts/run_in_vm.sh diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 8e9816be2d329d..c62a0061076bb2 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -97,3 +97,66 @@ jobs: --target tizen-arm-tests-no-ble-no-thread \ build " + + qemu-linux: + name: ubuntu + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/jlatusek/chip-build-linux-qemu:latest + volumes: + - "/tmp/log_output:/tmp/test_logs" + # Required for using KVM + options: --privileged + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Build Apps + run: | + scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-chip-tool \ + --target linux-x64-all-clusters \ + build \ + --copy-artifacts-to objdir-clone \ + " + # There is no enough space for running the test withouth cleaning the environment + - name: Clean up + run: | + rm -rf out/*/obj + rm -rf out/*/lib + rm -rf $PW_ENVIRONMENT_ROOT + git clean -fdx --exclude out + # Without all required apps paths provided as argument, script starts to search for them in the current directory and it takes a lot of time. + - name: Run ble commission test using the python parser sending commands to chip-tool + run: | + ./scripts/run_in_vm.sh \ + "./scripts/run_in_build_env.sh \ + \"./scripts/tests/run_test_suite.py \ + --runner chip_tool_python \ + --target TestCommissionerNodeId \ + --chip-tool ./out/linux-x64-chip-tool/chip-tool \ + run \ + --iterations 1 \ + --test-timeout-seconds 120 \ + --all-clusters-app ./out/linux-x64-all-clusters/chip-all-clusters-app \ + --lock-app ./out/linux-x64-lock/chip-lock-app \ + --ota-provider-app ./out/linux-x64-ota-provider/chip-ota-provider-app \ + --ota-requestor-app ./out/linux-x64-ota-requestor/chip-ota-requestor-app \ + --tv-app ./out/linux-x64-tv-app/chip-tv-app \ + --bridge-app ./out/linux-x64-bridge/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd/lit-icd-app \ + --microwave-oven-app .out/linux-x64-microwave-oven/chip-microwave-oven-app \ + --rvc-app .out/linux-x64-rvc/chip-rvc-app \ + --ble-wifi \ + \" \ + " diff --git a/.gitignore b/.gitignore index 1c2d1430263594..e0c11483daa7aa 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,5 @@ examples/*/esp32/dependencies.lock # jupyter temporary files .ipynb_checkpoints +/runner.sh +/runner_status diff --git a/scripts/run_in_vm.sh b/scripts/run_in_vm.sh new file mode 100755 index 00000000000000..7050dc7611f145 --- /dev/null +++ b/scripts/run_in_vm.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script executes the command given as an argument after +# activating the given python virtual environment +set -e + +PROJECT_PATH=$(dirname "$(dirname "$(realpath "$0")")") + +echo "$@" >"$PROJECT_PATH/runner.sh" +chmod +x "$PROJECT_PATH/runner.sh" + +echo "CMD:" +cat "$PROJECT_PATH/runner.sh" + +"$PROJECT_PATH/integrations/docker/images/stage-2/chip-build-linux-qemu/run-img.sh" + +if [ -f "$PROJECT_PATH/runner_status" ]; then + exit "$(cat "$PROJECT_PATH/runner_status")" +else + exit 1 +fi diff --git a/scripts/setup/requirements.all.txt b/scripts/setup/requirements.all.txt index 3266eaf8504572..c68f8f1914d06f 100644 --- a/scripts/setup/requirements.all.txt +++ b/scripts/setup/requirements.all.txt @@ -42,6 +42,7 @@ mypy==0.971 mypy-protobuf==3.5.0 protobuf==4.24.4 types-protobuf==4.24.0.2 +PyGObject cryptography diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index 3dbd851be26b47..f733c191b1e33c 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -18,15 +18,22 @@ Handles linux-specific functionality for running test cases """ +import glob import logging import os +import shutil import subprocess import sys import time +from collections import namedtuple +from time import sleep +from typing import Optional from .test_definition import ApplicationPaths test_environ = os.environ.copy() +PW_PROJECT_ROOT = os.environ.get("PW_PROJECT_ROOT") +QEMU_CONFIG_FILES = "integrations/docker/images/stage-2/chip-build-linux-qemu/files" def EnsureNetworkNamespaceAvailability(): @@ -169,6 +176,174 @@ def ShutdownNamespaceForTestExecution(): RemoveNamespaceForAppTest() +class DbusTest: + DBUS_SYSTEM_BUS_ADDRESS = "unix:path=/tmp/chip-dbus-test" + + def __init__(self): + self._dbus = None + self._dbus_proxy = None + + def start(self): + original_env = os.environ.copy() + os.environ["DBUS_SYSTEM_BUS_ADDRESS"] = DbusTest.DBUS_SYSTEM_BUS_ADDRESS + dbus = shutil.which("dbus-daemon") + self._dbus = subprocess.Popen( + [dbus, "--session", "--address", self.DBUS_SYSTEM_BUS_ADDRESS]) + + self._dbus_proxy = subprocess.Popen( + ["python3", f"{PW_PROJECT_ROOT}/scripts/tools/dbus-proxy-bluez.py", "--bus-proxy", DbusTest.DBUS_SYSTEM_BUS_ADDRESS], env=original_env) + + def stop(self): + if self._dbus: + self._dbus_proxy.terminate() + self._dbus.terminate() + self._dbus.wait() + + +class VirtualWifi: + def __init__(self, hostapd_path: str, dnsmasq_path: str, wpa_supplicant_path: str, wlan_app: Optional[str] = None, wlan_tool: Optional[str] = None): + self._hostapd_path = hostapd_path + self._dnsmasq_path = dnsmasq_path + self._wpa_supplicant_path = wpa_supplicant_path + self._hostapd_conf = os.path.join( + PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/hostapd.conf") + self._dnsmasq_conf = os.path.join( + PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/dnsmasq.conf") + self._wpa_supplicant_conf = os.path.join( + PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/wpa_supplicant.conf") + + if wlan_app is None or wlan_tool is None: + wlans = glob.glob( + "/sys/devices/virtual/mac80211_hwsim/hwsim*/net/*") + if len(wlans) < 2: + raise RuntimeError("Not enough wlan devices found") + + self._wlan_app = os.path.basename(wlans[0]) + self._wlan_tool = os.path.basename(wlans[1]) + else: + self._wlan_app = wlan_app + self._wlan_tool = wlan_tool + self._hostapd = None + self._dnsmasq = None + self._wpa_supplicant = None + + @staticmethod + def _get_phy(dev: str) -> str: + output = subprocess.check_output(['iw', 'dev', dev, 'info']) + for line in output.split(b'\n'): + if b'wiphy' in line: + wiphy = int(line.split(b' ')[1]) + return f"phy{wiphy}" + raise ValueError(f'No wiphy found for {dev}') + + @staticmethod + def _move_phy_to_netns(phy: str, netns: str): + subprocess.check_call( + ["iw", "phy", phy, "set", "netns", "name", netns]) + + @staticmethod + def _set_interface_ip_in_netns(netns: str, dev: str, ip: str): + subprocess.check_call( + ["ip", "netns", "exec", netns, "ip", "link", "set", "dev", dev, "up"]) + subprocess.check_call( + ["ip", "netns", "exec", netns, "ip", "addr", "add", ip, "dev", dev]) + + def start(self): + self._move_phy_to_netns(self._get_phy(self._wlan_app), 'app') + self._move_phy_to_netns(self._get_phy(self._wlan_tool), 'tool') + self._set_interface_ip_in_netns( + 'tool', self._wlan_tool, '192.168.200.1/24') + + self._hostapd = subprocess.Popen(["ip", "netns", "exec", "tool", self._hostapd_path, + self._hostapd_conf], stdout=subprocess.DEVNULL) + self._dnsmasq = subprocess.Popen(["ip", "netns", "exec", "tool", self._dnsmasq_path, + '-d', '-C', self._dnsmasq_conf], stdout=subprocess.DEVNULL) + self._wpa_supplicant = subprocess.Popen( + ["ip", "netns", "exec", "app", self._wpa_supplicant_path, "-u", '-s', '-c', self._wpa_supplicant_conf], stdout=subprocess.DEVNULL) + + def stop(self): + if self._hostapd: + self._hostapd.terminate() + self._hostapd.wait() + if self._dnsmasq: + self._dnsmasq.terminate() + self._dnsmasq.wait() + if self._wpa_supplicant: + self._wpa_supplicant.terminate() + self._wpa_supplicant.wait() + + +class VirtualBle: + BleDevice = namedtuple('BleDevice', ['hci', 'mac', 'index']) + + def __init__(self, btvirt_path: str, bluetoothctl_path: str): + self._btvirt_path = btvirt_path + self._bluetoothctl_path = bluetoothctl_path + self._btvirt = None + self._bluetoothctl = None + self._ble_app = None + self._ble_tool = None + + @property + def ble_app(self) -> Optional[BleDevice]: + if not self._ble_app: + raise RuntimeError("Bluetooth not started") + return self._ble_app + + @property + def ble_tool(self) -> Optional[BleDevice]: + if not self._ble_tool: + raise RuntimeError("Bluetooth not started") + return self._ble_tool + + def bletoothctl_cmd(self, cmd): + self._bluetoothctl.stdin.write(cmd) + self._bluetoothctl.stdin.flush() + + def _get_mac_address(self, hci_name): + result = subprocess.run( + ['hcitool', 'dev'], capture_output=True, text=True) + lines = result.stdout.splitlines() + + for line in lines: + if hci_name in line: + mac_address = line.split()[1] + return mac_address + + raise RuntimeError(f"No MAC address found for device {hci_name}") + + def _get_ble_info(self): + ble_dev_paths = glob.glob("/sys/devices/virtual/bluetooth/hci*") + hci = [os.path.basename(path) for path in ble_dev_paths] + if len(hci) < 2: + raise RuntimeError("Not enough BLE devices found") + self._ble_app = self.BleDevice( + hci=hci[0], mac=self._get_mac_address(hci[0]), index=int(hci[0].replace('hci', ''))) + self._ble_tool = self.BleDevice( + hci=hci[1], mac=self._get_mac_address(hci[1]), index=int(hci[1].replace('hci', ''))) + + def _run_bluetoothctl(self): + self._bluetoothctl = subprocess.Popen([self._bluetoothctl_path], text=True, + stdin=subprocess.PIPE, stdout=subprocess.DEVNULL) + self.bletoothctl_cmd(f"select {self.ble_app.mac}\n") + self.bletoothctl_cmd("power on\n") + self.bletoothctl_cmd(f"select {self.ble_tool.mac}\n") + self.bletoothctl_cmd("power on\n") + self.bletoothctl_cmd("quit\n") + self._bluetoothctl.wait() + + def start(self): + self._btvirt = subprocess.Popen([self._btvirt_path, '-l2']) + sleep(1) + self._get_ble_info() + self._run_bluetoothctl() + + def stop(self): + if self._btvirt: + self._btvirt.terminate() + self._btvirt.wait() + + def PathsWithNetworkNamespaces(paths: ApplicationPaths) -> ApplicationPaths: """ Returns a copy of paths with updated command arrays to invoke the diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 970c098f1354bb..067fbbedc2e9af 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -284,7 +284,7 @@ def tags_str(self) -> str: return ", ".join([t.to_s() for t in self.tags]) def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, - timeout_seconds: typing.Optional[int], dry_run=False, test_runtime: TestRunTime = TestRunTime.CHIP_TOOL_PYTHON): + timeout_seconds: typing.Optional[int], dry_run=False, test_runtime: TestRunTime = TestRunTime.CHIP_TOOL_PYTHON, app_hci_number: typing.Optional[int] = None, tool_hci_number: typing.Optional[int] = None): """ Executes the given test case using the provided runner for execution. """ @@ -331,8 +331,11 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, key = 'default' else: key = os.path.basename(path[-1]) - - app = App(runner, path) + ble_wifi_cmd = [] + if app_hci_number is not None: + ble_wifi_cmd = ["--ble-device", + str(app_hci_number), "--wifi"] + app = App(runner, path + ble_wifi_cmd) # Add the App to the register immediately, so if it fails during # start() we will be able to clean things up properly. apps_register.add(key, app) @@ -372,13 +375,21 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, runner.RunSubprocess(python_cmd, name='CHIP_REPL_YAML_TESTER', dependencies=[apps_register], timeout_seconds=timeout_seconds) else: - pairing_cmd = paths.chip_tool_with_python_cmd + ['pairing', 'code', TEST_NODE_ID, setupCode] - if self.target == TestTarget.LIT_ICD and test_runtime == TestRunTime.CHIP_TOOL_PYTHON: - pairing_cmd += ['--icd-registration', 'true'] + pairing_server_args = [] + if tool_hci_number is not None: + pairing_cmd = paths.chip_tool_with_python_cmd + [ + "pairing", "ble-wifi", TEST_NODE_ID, "Virtual_Wifi", "ExamplePassword", "20202021", "3840", ] + pairing_server_args = [ + "--ble-adapter", str(tool_hci_number)] + else: + pairing_cmd = paths.chip_tool_with_python_cmd + ['pairing', 'code', TEST_NODE_ID, setupCode] + if self.target == TestTarget.LIT_ICD and test_runtime == TestRunTime.CHIP_TOOL_PYTHON: + pairing_cmd += ['--icd-registration', 'true'] test_cmd = paths.chip_tool_with_python_cmd + ['tests', self.run_name] + ['--PICS', pics_file] server_args = ['--server_path', paths.chip_tool[-1]] + \ ['--server_arguments', 'interactive server' + - (' ' if len(tool_storage_args) else '') + ' '.join(tool_storage_args)] + (' ' if len(tool_storage_args) else '') + ' '.join(tool_storage_args) + + (' ' if len(pairing_server_args) else '') + ' '.join(pairing_server_args)] pairing_cmd += server_args test_cmd += server_args diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 2df88cd6740653..ea2070485064b3 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -289,9 +289,15 @@ def cmd_list(context): default=0, show_default=True, help='Number of tests that are expected to fail in each iteration. Overall test will pass if the number of failures matches this. Nonzero values require --keep-going') +@click.option( + '--ble-wifi', + is_flag=True, + default=False, + show_default=True, + help='Use a virtual wifi and bluetooth to commission device') @click.pass_context def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, ota_requestor_app, - tv_app, bridge_app, lit_icd_app, microwave_oven_app, rvc_app, chip_repl_yaml_tester, chip_tool_with_python, pics_file, keep_going, test_timeout_seconds, expected_failures): + tv_app, bridge_app, lit_icd_app, microwave_oven_app, rvc_app, chip_repl_yaml_tester, chip_tool_with_python, pics_file, keep_going, test_timeout_seconds, expected_failures, ble_wifi): if expected_failures != 0 and not keep_going: logging.exception(f"'--expected-failures {expected_failures}' used without '--keep-going'") sys.exit(2) @@ -355,6 +361,19 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o if sys.platform == 'linux': chiptest.linux.PrepareNamespacesForTestExecution( context.obj.in_unshare) + if (ble_wifi): + dbus = chiptest.linux.DbusTest() + dbus.start() + + virt_wifi = chiptest.linux.VirtualWifi( + "/usr/sbin/hostapd", + "/usr/sbin/dnsmasq", + "/usr/sbin/wpa_supplicant", + ) + virt_ble = chiptest.linux.VirtualBle( + "/usr/bin/btvirt", "/usr/bin/bluetoothctl") + virt_wifi.start() + virt_ble.start() paths = chiptest.linux.PathsWithNetworkNamespaces(paths) logging.info("Each test will be executed %d times" % iterations) @@ -365,6 +384,10 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o def cleanup(): apps_register.uninit() if sys.platform == 'linux': + if (ble_wifi): + virt_wifi.stop() + virt_ble.stop() + dbus.stop() chiptest.linux.ShutdownNamespaceForTestExecution() for i in range(iterations): @@ -387,9 +410,14 @@ def cleanup(): logging.info("Would run test: %s" % test.name) else: logging.info('%-20s - Starting test' % (test.name)) - test.Run( - runner, apps_register, paths, pics_file, test_timeout_seconds, context.obj.dry_run, - test_runtime=context.obj.runtime) + if ble_wifi: + test.Run( + runner, apps_register, paths, pics_file, test_timeout_seconds, context.obj.dry_run, + test_runtime=context.obj.runtime, app_hci_number=virt_ble.ble_app.index, tool_hci_number=virt_ble.ble_tool.index) + else: + test.Run( + runner, apps_register, paths, pics_file, test_timeout_seconds, context.obj.dry_run, + test_runtime=context.obj.runtime) if not context.obj.dry_run: test_end = time.monotonic() logging.info('%-30s - Completed in %0.2f seconds' % From d18e47cad13287050f2a9bd02b9ddaf116f187f1 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Tue, 2 Apr 2024 14:12:27 +0200 Subject: [PATCH 02/46] Simple script to proxy messages between D-Bus buses --- scripts/tools/dbus-proxy-bluez.py | 230 ++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100755 scripts/tools/dbus-proxy-bluez.py diff --git a/scripts/tools/dbus-proxy-bluez.py b/scripts/tools/dbus-proxy-bluez.py new file mode 100755 index 00000000000000..5e981ebe525050 --- /dev/null +++ b/scripts/tools/dbus-proxy-bluez.py @@ -0,0 +1,230 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging +import os.path +from argparse import ArgumentParser +from collections import namedtuple + +from gi.repository import Gio, GLib + + +def bus_get_connection(address: str): + """Get a connection object for a given D-Bus bus.""" + if address == "session": + address = Gio.dbus_address_get_for_bus_sync(Gio.BusType.SESSION) + elif address == "system": + address = Gio.dbus_address_get_for_bus_sync(Gio.BusType.SYSTEM) + logging.info("Connecting to: %s", address) + conn = Gio.DBusConnection.new_for_address_sync( + address, + Gio.DBusConnectionFlags.AUTHENTICATION_CLIENT | + Gio.DBusConnectionFlags.MESSAGE_BUS_CONNECTION) + logging.info("Assigned unique name: %s", conn.get_unique_name()) + return conn + + +def bus_get_name_owner(conn, name: str): + """Get the unique name of a well known name on a D-Bus bus.""" + params = GLib.Variant("(s)", (name,)) + reply = conn.call_sync("org.freedesktop.DBus", "/org/freedesktop/DBus", + "org.freedesktop.DBus", "GetNameOwner", + params, None, Gio.DBusCallFlags.NONE, -1) + return reply.get_child_value(0).get_string() + + +def bus_introspect_path(conn, client: str, path: str): + """Introspect a D-Bus object path and return its node info.""" + reply = conn.call_sync(client, path, + "org.freedesktop.DBus.Introspectable", "Introspect", + None, None, Gio.DBusCallFlags.NONE, -1) + xml = reply.get_child_value(0).get_string() + return Gio.DBusNodeInfo.new_for_xml(xml) + + +class DBusServiceProxy: + + MappingKey = namedtuple("MappingKey", ["path", "iface"]) + + objects: dict[MappingKey, int] = {} + subscriptions: set[str] = set() + clients = {} + + def __init__(self, source: str, proxy: str, service: str): + self.source = bus_get_connection(source) + self.proxy = bus_get_connection(proxy) + self.service = service + Gio.bus_own_name_on_connection(self.proxy, self.service, + Gio.BusNameOwnerFlags.DO_NOT_QUEUE, + self.on_bus_name_acquired, + self.on_bus_name_lost) + + def on_bus_name_acquired(self, conn, name): + logging.info("Acquired name on proxy bus: %s", name) + self.mirror_source_on_proxy(self.service, "/") + + def on_bus_name_lost(self, conn, name): + logging.debug("Lost name on proxy bus: %s", name) + + def proxy_client_save(self, path, client): + self.clients[path] = client + + def proxy_client_load(self, path): + return self.clients[path] + + def register_object(self, conn, path, iface): + key = DBusServiceProxy.MappingKey(path, iface.name) + if key not in self.objects: + logging.debug("Registering: %s { %s }", path, iface.name) + id = conn.register_object(path, iface, self.on_method_call) + self.objects[key] = id + + def unregister_object(self, conn, path, iface_name): + key = DBusServiceProxy.MappingKey(path, iface_name) + if key in self.objects: + logging.debug("Removing: %s { %s }", path, iface_name) + conn.unregister_object(self.objects.pop(key)) + + def signal_subscribe(self, conn, client): + """Subscribe for signals from a D-Bus client.""" + if client not in self.subscriptions: + conn.signal_subscribe(client, None, None, None, None, + Gio.DBusSignalFlags.NONE, + self.on_signal_received) + self.subscriptions.add(client) + + def mirror_path(self, conn_src, conn_dest, client, path, save=False): + """Mirror all interfaces and nodes of a D-Bus client object path. + + Parameters: + conn_src -- source D-Bus connection + conn_dest -- proxy D-Bus connection + client -- name of the client on the source bus + path -- object path to mirror recursively + save -- save the client name for the path + + """ + info = bus_introspect_path(conn_src, client, path) + for iface in info.interfaces: + if save: + self.proxy_client_save(path, client) + self.register_object(conn_dest, path, iface) + for node in info.nodes: + self.mirror_path(conn_src, conn_dest, client, + os.path.join(path, node.path), save) + + def mirror_source_on_proxy(self, client, path): + """Mirror source bus objects on the proxy bus.""" + self.signal_subscribe(self.source, client) + self.mirror_path(self.source, self.proxy, client, path) + + def mirror_proxy_on_source(self, client, path): + """Mirror proxy bus objects on the source bus.""" + self.signal_subscribe(self.proxy, client) + self.mirror_path(self.proxy, self.source, client, path, True) + + def on_method_call(self, conn, sender, *args, **kwargs): + if conn == self.source: + return self.on_method_call_from_source(sender, *args, **kwargs) + return self.on_method_call_from_proxy(sender, *args, **kwargs) + + def on_signal_received(self, conn, sender, *args, **kwargs): + if conn == self.source: + return self.on_signal_from_source(sender, *args, **kwargs) + return self.on_signal_from_proxy(sender, *args, **kwargs) + + def on_method_call_from_source(self, sender, path, iface, method, + params, invocation): + logging.debug("Call from source: %s %s.%s()", path, iface, method) + self.proxy.call(self.proxy_client_load(path), path, iface, method, + params, None, Gio.DBusCallFlags.NONE, -1, None, + self.on_method_return, invocation) + + def on_method_call_from_proxy(self, sender, path, iface, method, + params, invocation): + logging.debug("Call from proxy: %s %s.%s()", path, iface, method) + self.source.call(self.service, path, iface, method, + params, None, Gio.DBusCallFlags.NONE, -1, None, + self.on_method_return, invocation) + + def on_method_return(self, conn, result, invocation): + try: + logging.debug("Finishing call: %s %s.%s()", + invocation.get_object_path(), + invocation.get_interface_name(), + invocation.get_method_name()) + reply = conn.call_with_unix_fd_list_finish(result) + invocation.return_value_with_unix_fd_list( + reply[0], reply.out_fd_list) + except GLib.Error as e: + invocation.return_gerror(e) + + def on_signal_from_source(self, sender, path, iface, signal, params): + logging.debug("Signal from source: %s %s.%s", path, iface, signal) + if iface == "org.freedesktop.DBus.ObjectManager": + if signal == "InterfacesAdded": + dest_path = params.get_child_value(0).get_string() + self.mirror_source_on_proxy(self.service, dest_path) + if signal == "InterfacesRemoved": + dest_path = params.get_child_value(0).get_string() + for dest_iface in params.get_child_value(1).get_strv(): + self.unregister_object(self.proxy, dest_path, dest_iface) + self.proxy.emit_signal(None, path, iface, signal, params) + + def on_signal_from_proxy(self, sender, path, iface, signal, params): + logging.debug("Signal from proxy: %s %s.%s", path, iface, signal) + self.source.emit_signal(None, path, iface, signal, params) + + +class BluezProxy(DBusServiceProxy): + + def on_method_call_from_proxy(self, sender, path, iface, method, + params, invocation): + + if (iface == "org.bluez.GattManager1" and + method == "RegisterApplication"): + app_path = params.get_child_value(0).get_string() + logging.info("Mirroring GATT application: %s %s", sender, app_path) + self.mirror_proxy_on_source(sender, app_path) + + if iface == "org.bluez.LEAdvertisingManager1": + if method == "RegisterAdvertisement": + app_path = params.get_child_value(0).get_string() + logging.info("Mirroring advertiser: %s %s", sender, app_path) + self.mirror_proxy_on_source(sender, app_path) + + super().on_method_call_from_proxy(sender, path, iface, method, + params, invocation) + + +parser = ArgumentParser(description="BlueZ D-Bus proxy") +parser.add_argument( + "-v", "--verbose", action="store_true", + help="enable debug output") +parser.add_argument( + "--bus-source", metavar="ADDRESS", default="system", + help="""address of the source D-Bus bus; it can be a bus address string or + 'session' or 'system' keywords; default is '%(default)s'""") +parser.add_argument( + "--bus-proxy", metavar="ADDRESS", required=True, + help="""address of the proxy D-Bus bus""") + +args = parser.parse_args() +logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) + +BluezProxy(args.bus_source, args.bus_proxy, "org.bluez") +GLib.MainLoop().run() From b7fd33591551f7267c15caa3777fcf8ebf364927 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 3 Apr 2024 08:22:39 +0200 Subject: [PATCH 03/46] Fix typing for old python --- scripts/tools/dbus-proxy-bluez.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/tools/dbus-proxy-bluez.py b/scripts/tools/dbus-proxy-bluez.py index 5e981ebe525050..5449ad3b873dbb 100755 --- a/scripts/tools/dbus-proxy-bluez.py +++ b/scripts/tools/dbus-proxy-bluez.py @@ -19,6 +19,7 @@ import os.path from argparse import ArgumentParser from collections import namedtuple +import typing from gi.repository import Gio, GLib @@ -60,8 +61,8 @@ class DBusServiceProxy: MappingKey = namedtuple("MappingKey", ["path", "iface"]) - objects: dict[MappingKey, int] = {} - subscriptions: set[str] = set() + objects: typing.Dict[MappingKey, int] = {} + subscriptions: typing.Set[str] = set() clients = {} def __init__(self, source: str, proxy: str, service: str): From 553c84e63b123ad6a98b05d20df74246cdb5b509 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Thu, 4 Apr 2024 11:14:36 +0200 Subject: [PATCH 04/46] Fix D-Bus error forwarding --- scripts/tools/dbus-proxy-bluez.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/tools/dbus-proxy-bluez.py b/scripts/tools/dbus-proxy-bluez.py index 5449ad3b873dbb..01cc23cc553bec 100755 --- a/scripts/tools/dbus-proxy-bluez.py +++ b/scripts/tools/dbus-proxy-bluez.py @@ -169,10 +169,11 @@ def on_method_return(self, conn, result, invocation): invocation.get_interface_name(), invocation.get_method_name()) reply = conn.call_with_unix_fd_list_finish(result) - invocation.return_value_with_unix_fd_list( - reply[0], reply.out_fd_list) + invocation.return_value_with_unix_fd_list(reply[0], + reply.out_fd_list) except GLib.Error as e: - invocation.return_gerror(e) + _, name, message = e.message.split(":", 2) + invocation.return_dbus_error(name, message.strip()) def on_signal_from_source(self, sender, path, iface, signal, params): logging.debug("Signal from source: %s %s.%s", path, iface, signal) From 7e1bc8cd452a07598258cdedd256232d763054ec Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Fri, 5 Apr 2024 20:13:09 +0200 Subject: [PATCH 05/46] Remove map file --- .github/workflows/qemu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index c62a0061076bb2..3b225c752689f8 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -134,6 +134,7 @@ jobs: run: | rm -rf out/*/obj rm -rf out/*/lib + rm -rf out/*/*.map rm -rf $PW_ENVIRONMENT_ROOT git clean -fdx --exclude out # Without all required apps paths provided as argument, script starts to search for them in the current directory and it takes a lot of time. From ae25b2162d0609998ed3dff777b6941923370fa2 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 8 Apr 2024 08:04:00 +0000 Subject: [PATCH 06/46] Restyled by isort --- scripts/tools/dbus-proxy-bluez.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/dbus-proxy-bluez.py b/scripts/tools/dbus-proxy-bluez.py index 01cc23cc553bec..3ff0bda943b0f7 100755 --- a/scripts/tools/dbus-proxy-bluez.py +++ b/scripts/tools/dbus-proxy-bluez.py @@ -17,9 +17,9 @@ import logging import os.path +import typing from argparse import ArgumentParser from collections import namedtuple -import typing from gi.repository import Gio, GLib From ad08cd2a2e83b4a2238c14944cfe6819ba674c57 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 9 Apr 2024 09:14:41 +0200 Subject: [PATCH 07/46] Move BLE-WiFi testing requirements to other file --- .github/workflows/qemu.yaml | 3 ++- scripts/setup/requirements.all.txt | 1 - scripts/setup/requirements.ble-wifi-testing.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 scripts/setup/requirements.ble-wifi-testing.txt diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 3b225c752689f8..ac118441ae034f 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -141,7 +141,8 @@ jobs: - name: Run ble commission test using the python parser sending commands to chip-tool run: | ./scripts/run_in_vm.sh \ - "./scripts/run_in_build_env.sh \ + "scripts/run_in_build_env.sh 'pip3 install -r scripts/setup/requirements.ble-wifi-testing.txt' && \ + ./scripts/run_in_build_env.sh \ \"./scripts/tests/run_test_suite.py \ --runner chip_tool_python \ --target TestCommissionerNodeId \ diff --git a/scripts/setup/requirements.all.txt b/scripts/setup/requirements.all.txt index c68f8f1914d06f..3266eaf8504572 100644 --- a/scripts/setup/requirements.all.txt +++ b/scripts/setup/requirements.all.txt @@ -42,7 +42,6 @@ mypy==0.971 mypy-protobuf==3.5.0 protobuf==4.24.4 types-protobuf==4.24.0.2 -PyGObject cryptography diff --git a/scripts/setup/requirements.ble-wifi-testing.txt b/scripts/setup/requirements.ble-wifi-testing.txt new file mode 100644 index 00000000000000..69c66f7cd4c8de --- /dev/null +++ b/scripts/setup/requirements.ble-wifi-testing.txt @@ -0,0 +1 @@ +PyGObject From 88a573ced32cc52cfe27189bf5b455d405e52fdf Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 14 May 2024 10:50:01 +0200 Subject: [PATCH 08/46] Use code-wifi pairing method --- scripts/tests/chiptest/test_definition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 067fbbedc2e9af..82d598b18f221d 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -378,7 +378,7 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, pairing_server_args = [] if tool_hci_number is not None: pairing_cmd = paths.chip_tool_with_python_cmd + [ - "pairing", "ble-wifi", TEST_NODE_ID, "Virtual_Wifi", "ExamplePassword", "20202021", "3840", ] + "pairing", "code-wifi", TEST_NODE_ID, "Virtual_Wifi", "ExamplePassword", "MT:-24J0AFN00KA0648G00"] pairing_server_args = [ "--ble-adapter", str(tool_hci_number)] else: @@ -406,6 +406,7 @@ def quoter(arg): return f"'{arg}'" if ' ' in arg else arg test_cmd, name='TEST', dependencies=[apps_register], timeout_seconds=timeout_seconds) + runner.capture_delegate.LogContents() except Exception: logging.error("!!!!!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!!!!!!!") From 410a52364a9a950dfb22abf03f2d971bdd7039e7 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 12 Jun 2024 14:13:54 +0200 Subject: [PATCH 09/46] Add support for WiFi interface created by mac80211_hwsim driver --- src/platform/Linux/ConnectivityUtils.cpp | 32 ++++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/platform/Linux/ConnectivityUtils.cpp b/src/platform/Linux/ConnectivityUtils.cpp index 8084ceca43b55a..72148d75fa64fc 100644 --- a/src/platform/Linux/ConnectivityUtils.cpp +++ b/src/platform/Linux/ConnectivityUtils.cpp @@ -261,16 +261,32 @@ InterfaceTypeEnum ConnectivityUtils::GetInterfaceConnectionType(const char * ifn { ret = InterfaceTypeEnum::kWiFi; } - else if ((strncmp(ifname, "en", 2) == 0) || (strncmp(ifname, "eth", 3) == 0)) + else { - struct ethtool_cmd ecmd = {}; - ecmd.cmd = ETHTOOL_GSET; - struct ifreq ifr = {}; - ifr.ifr_data = reinterpret_cast(&ecmd); - Platform::CopyString(ifr.ifr_name, ifname); + // During tests in CI WiFi interfaces are created by mac80211_hwsim driver + // Unfortunately, this driver does not support SIOCGIWNAME so we need to check it in a different way. + struct ethtool_drvinfo drvinfo = {}; + struct ifreq ifr_driver = {}; + drvinfo.cmd = ETHTOOL_GDRVINFO; + ifr_driver.ifr_data = reinterpret_cast(&drvinfo); + Platform::CopyString(ifr_driver.ifr_name, ifname); + if (ioctl(sock, SIOCETHTOOL, &ifr_driver) == 0 && strcmp(drvinfo.driver, "mac80211_hwsim") == 0) + { + ret = InterfaceTypeEnum::kWiFi; + } + else if ((strncmp(ifname, "en", 2) == 0) || (strncmp(ifname, "eth", 3) == 0)) + { + struct ethtool_cmd ecmd = {}; + ecmd.cmd = ETHTOOL_GSET; + struct ifreq ifr = {}; + ifr.ifr_data = reinterpret_cast(&ecmd); + Platform::CopyString(ifr.ifr_name, ifname); - if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) - ret = InterfaceTypeEnum::kEthernet; + if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) + { + ret = InterfaceTypeEnum::kEthernet; + } + } } close(sock); From f0763e394969ae06eff227d07fdd0167d6321dd4 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 12 Jun 2024 14:50:27 +0200 Subject: [PATCH 10/46] Do not run test script when connected by ssh --- .../docker/images/stage-2/chip-build-linux-qemu/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile b/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile index b14a00c2ec9710..170aab23e81f83 100644 --- a/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile @@ -173,6 +173,7 @@ RUN mkdir -p /tmp/workdir/linux \ && echo -n \ "#!/bin/bash\n" \ "grep -q 'rootshell' /proc/cmdline && exit\n" \ + "[[ -n $$SSH_CONNECTION ]] && exit \n" \ "if [[ -x /chip/runner.sh ]]; then\n" \ " echo '### RUNNER START ###'\n" \ " cd /chip\n" \ From 635042d76c28b7403ec155522ca45768c62b383b Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 13 Jun 2024 13:03:56 +0200 Subject: [PATCH 11/46] Add dry run suport --- scripts/tests/chiptest/linux.py | 139 +++++++++++++++++++++----------- scripts/tests/run_test_suite.py | 57 ++++++++----- 2 files changed, 126 insertions(+), 70 deletions(-) diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index f733c191b1e33c..83e20ec5edbf24 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -179,19 +179,24 @@ def ShutdownNamespaceForTestExecution(): class DbusTest: DBUS_SYSTEM_BUS_ADDRESS = "unix:path=/tmp/chip-dbus-test" - def __init__(self): + def __init__(self, dry_run: bool = False): self._dbus = None self._dbus_proxy = None + self.dry_run = dry_run def start(self): + if self.dry_run: + logging.info("Would start dbus") + return original_env = os.environ.copy() os.environ["DBUS_SYSTEM_BUS_ADDRESS"] = DbusTest.DBUS_SYSTEM_BUS_ADDRESS dbus = shutil.which("dbus-daemon") - self._dbus = subprocess.Popen( - [dbus, "--session", "--address", self.DBUS_SYSTEM_BUS_ADDRESS]) + self._dbus = subprocess.Popen([dbus, "--session", "--address", self.DBUS_SYSTEM_BUS_ADDRESS]) self._dbus_proxy = subprocess.Popen( - ["python3", f"{PW_PROJECT_ROOT}/scripts/tools/dbus-proxy-bluez.py", "--bus-proxy", DbusTest.DBUS_SYSTEM_BUS_ADDRESS], env=original_env) + ["python3", f"{PW_PROJECT_ROOT}/scripts/tools/dbus-proxy-bluez.py", "--bus-proxy", DbusTest.DBUS_SYSTEM_BUS_ADDRESS], + env=original_env, + ) def stop(self): if self._dbus: @@ -201,20 +206,25 @@ def stop(self): class VirtualWifi: - def __init__(self, hostapd_path: str, dnsmasq_path: str, wpa_supplicant_path: str, wlan_app: Optional[str] = None, wlan_tool: Optional[str] = None): + def __init__( + self, + hostapd_path: str, + dnsmasq_path: str, + wpa_supplicant_path: str, + wlan_app: Optional[str] = None, + wlan_tool: Optional[str] = None, + dry_run: bool = False, + ): + self.dry_run = dry_run self._hostapd_path = hostapd_path self._dnsmasq_path = dnsmasq_path self._wpa_supplicant_path = wpa_supplicant_path - self._hostapd_conf = os.path.join( - PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/hostapd.conf") - self._dnsmasq_conf = os.path.join( - PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/dnsmasq.conf") - self._wpa_supplicant_conf = os.path.join( - PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/wpa_supplicant.conf") - - if wlan_app is None or wlan_tool is None: - wlans = glob.glob( - "/sys/devices/virtual/mac80211_hwsim/hwsim*/net/*") + self._hostapd_conf = os.path.join(PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/hostapd.conf") + self._dnsmasq_conf = os.path.join(PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/dnsmasq.conf") + self._wpa_supplicant_conf = os.path.join(PW_PROJECT_ROOT, QEMU_CONFIG_FILES, "wifi/wpa_supplicant.conf") + + if (wlan_app is None or wlan_tool is None) and not dry_run: + wlans = glob.glob("/sys/devices/virtual/mac80211_hwsim/hwsim*/net/*") if len(wlans) < 2: raise RuntimeError("Not enough wlan devices found") @@ -226,42 +236,63 @@ def __init__(self, hostapd_path: str, dnsmasq_path: str, wpa_supplicant_path: st self._hostapd = None self._dnsmasq = None self._wpa_supplicant = None + self._dhclient = None @staticmethod def _get_phy(dev: str) -> str: - output = subprocess.check_output(['iw', 'dev', dev, 'info']) - for line in output.split(b'\n'): - if b'wiphy' in line: - wiphy = int(line.split(b' ')[1]) + output = subprocess.check_output(["iw", "dev", dev, "info"]) + for line in output.split(b"\n"): + if b"wiphy" in line: + wiphy = int(line.split(b" ")[1]) return f"phy{wiphy}" - raise ValueError(f'No wiphy found for {dev}') + raise ValueError(f"No wiphy found for {dev}") @staticmethod def _move_phy_to_netns(phy: str, netns: str): - subprocess.check_call( - ["iw", "phy", phy, "set", "netns", "name", netns]) + subprocess.check_call(["iw", "phy", phy, "set", "netns", "name", netns]) @staticmethod def _set_interface_ip_in_netns(netns: str, dev: str, ip: str): - subprocess.check_call( - ["ip", "netns", "exec", netns, "ip", "link", "set", "dev", dev, "up"]) - subprocess.check_call( - ["ip", "netns", "exec", netns, "ip", "addr", "add", ip, "dev", dev]) + subprocess.check_call(["ip", "netns", "exec", netns, "ip", "link", "set", "dev", dev, "up"]) + subprocess.check_call(["ip", "netns", "exec", netns, "ip", "addr", "add", ip, "dev", dev]) def start(self): - self._move_phy_to_netns(self._get_phy(self._wlan_app), 'app') - self._move_phy_to_netns(self._get_phy(self._wlan_tool), 'tool') - self._set_interface_ip_in_netns( - 'tool', self._wlan_tool, '192.168.200.1/24') - - self._hostapd = subprocess.Popen(["ip", "netns", "exec", "tool", self._hostapd_path, - self._hostapd_conf], stdout=subprocess.DEVNULL) - self._dnsmasq = subprocess.Popen(["ip", "netns", "exec", "tool", self._dnsmasq_path, - '-d', '-C', self._dnsmasq_conf], stdout=subprocess.DEVNULL) - self._wpa_supplicant = subprocess.Popen( - ["ip", "netns", "exec", "app", self._wpa_supplicant_path, "-u", '-s', '-c', self._wpa_supplicant_conf], stdout=subprocess.DEVNULL) + hostapd_cmd = ["ip", "netns", "exec", "tool", self._hostapd_path, self._hostapd_conf] + dnsmaq_cmd = ["ip", "netns", "exec", "tool", self._dnsmasq_path, "-d", "-C", self._dnsmasq_conf] + # TODO: change wlan0 to the actual interface name + dhclient_cmd = ["ip", "netns", "exec", "app", "dhclient", "wlan0"] + wpa_cmd = [ + "ip", + "netns", + "exec", + "app", + self._wpa_supplicant_path, + "-u", + "-s", + "-i", + "wlan0", + "-c", + self._wpa_supplicant_conf, + ] + if self.dry_run: + logging.info(f"Would run hostapd with {hostapd_cmd}") + logging.info(f"Would run dnsmasq with {dnsmaq_cmd}") + logging.info(f"Would run wpa_supplicant with {wpa_cmd}") + return + self._move_phy_to_netns(self._get_phy(self._wlan_app), "app") + self._move_phy_to_netns(self._get_phy(self._wlan_tool), "tool") + self._set_interface_ip_in_netns("tool", self._wlan_tool, "192.168.200.1/24") + + self._hostapd = subprocess.Popen(hostapd_cmd, stdout=subprocess.DEVNULL) + self._dnsmasq = subprocess.Popen(dnsmaq_cmd, stdout=subprocess.DEVNULL) + self._dhclient = subprocess.Popen(dhclient_cmd, stdout=subprocess.DEVNULL) + print(f"DnsMasq started with {self._dnsmasq.pid}") + self._wpa_supplicant = subprocess.Popen(wpa_cmd, stdout=subprocess.DEVNULL) def stop(self): + if self.dry_run: + logging.info("Would stop hostapd, dnsmasq and wpa_supplicant") + return if self._hostapd: self._hostapd.terminate() self._hostapd.wait() @@ -271,27 +302,35 @@ def stop(self): if self._wpa_supplicant: self._wpa_supplicant.terminate() self._wpa_supplicant.wait() + if self._dhclient: + self._dhclient.terminate() + self._dhclient.wait() class VirtualBle: - BleDevice = namedtuple('BleDevice', ['hci', 'mac', 'index']) + BleDevice = namedtuple("BleDevice", ["hci", "mac", "index"]) - def __init__(self, btvirt_path: str, bluetoothctl_path: str): + def __init__(self, btvirt_path: str, bluetoothctl_path: str, dry_run: bool = False): self._btvirt_path = btvirt_path self._bluetoothctl_path = bluetoothctl_path self._btvirt = None self._bluetoothctl = None self._ble_app = None self._ble_tool = None + self._dry_run = dry_run @property def ble_app(self) -> Optional[BleDevice]: + if self._dry_run: + return self.BleDevice(hci="hci0", mac="00:11:22:33:44:55", index=0) if not self._ble_app: raise RuntimeError("Bluetooth not started") return self._ble_app @property def ble_tool(self) -> Optional[BleDevice]: + if self._dry_run: + return self.BleDevice(hci="hci1", mac="00:11:22:33:44:56", index=1) if not self._ble_tool: raise RuntimeError("Bluetooth not started") return self._ble_tool @@ -301,8 +340,7 @@ def bletoothctl_cmd(self, cmd): self._bluetoothctl.stdin.flush() def _get_mac_address(self, hci_name): - result = subprocess.run( - ['hcitool', 'dev'], capture_output=True, text=True) + result = subprocess.run(["hcitool", "dev"], capture_output=True, text=True) lines = result.stdout.splitlines() for line in lines: @@ -317,14 +355,13 @@ def _get_ble_info(self): hci = [os.path.basename(path) for path in ble_dev_paths] if len(hci) < 2: raise RuntimeError("Not enough BLE devices found") - self._ble_app = self.BleDevice( - hci=hci[0], mac=self._get_mac_address(hci[0]), index=int(hci[0].replace('hci', ''))) - self._ble_tool = self.BleDevice( - hci=hci[1], mac=self._get_mac_address(hci[1]), index=int(hci[1].replace('hci', ''))) + self._ble_app = self.BleDevice(hci=hci[0], mac=self._get_mac_address(hci[0]), index=int(hci[0].replace("hci", ""))) + self._ble_tool = self.BleDevice(hci=hci[1], mac=self._get_mac_address(hci[1]), index=int(hci[1].replace("hci", ""))) def _run_bluetoothctl(self): - self._bluetoothctl = subprocess.Popen([self._bluetoothctl_path], text=True, - stdin=subprocess.PIPE, stdout=subprocess.DEVNULL) + self._bluetoothctl = subprocess.Popen( + [self._bluetoothctl_path], text=True, stdin=subprocess.PIPE, stdout=subprocess.DEVNULL + ) self.bletoothctl_cmd(f"select {self.ble_app.mac}\n") self.bletoothctl_cmd("power on\n") self.bletoothctl_cmd(f"select {self.ble_tool.mac}\n") @@ -333,12 +370,18 @@ def _run_bluetoothctl(self): self._bluetoothctl.wait() def start(self): - self._btvirt = subprocess.Popen([self._btvirt_path, '-l2']) + if self._dry_run: + logging.info("Would start bluetooth") + return + self._btvirt = subprocess.Popen([self._btvirt_path, "-l2"]) sleep(1) self._get_ble_info() self._run_bluetoothctl() def stop(self): + if self._dry_run: + logging.info("Would stop bluetooth") + return if self._btvirt: self._btvirt.terminate() self._btvirt.wait() diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index ea2070485064b3..745457c119f510 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -361,7 +361,7 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o if sys.platform == 'linux': chiptest.linux.PrepareNamespacesForTestExecution( context.obj.in_unshare) - if (ble_wifi): + if ble_wifi: dbus = chiptest.linux.DbusTest() dbus.start() @@ -369,9 +369,13 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o "/usr/sbin/hostapd", "/usr/sbin/dnsmasq", "/usr/sbin/wpa_supplicant", + dry_run=context.obj.dry_run, ) virt_ble = chiptest.linux.VirtualBle( - "/usr/bin/btvirt", "/usr/bin/bluetoothctl") + "/usr/bin/btvirt", + "/usr/bin/bluetoothctl", + dry_run=context.obj.dry_run, + ) virt_wifi.start() virt_ble.start() paths = chiptest.linux.PathsWithNetworkNamespaces(paths) @@ -384,14 +388,14 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o def cleanup(): apps_register.uninit() if sys.platform == 'linux': - if (ble_wifi): + if ble_wifi: virt_wifi.stop() virt_ble.stop() dbus.stop() chiptest.linux.ShutdownNamespaceForTestExecution() for i in range(iterations): - logging.info("Starting iteration %d" % (i+1)) + logging.info("Starting iteration %d" % (i + 1)) observed_failures = 0 for test in context.obj.tests: if context.obj.include_tags: @@ -409,23 +413,35 @@ def cleanup(): if context.obj.dry_run: logging.info("Would run test: %s" % test.name) else: - logging.info('%-20s - Starting test' % (test.name)) + logging.info("%-20s - Starting test" % (test.name)) if ble_wifi: test.Run( - runner, apps_register, paths, pics_file, test_timeout_seconds, context.obj.dry_run, - test_runtime=context.obj.runtime, app_hci_number=virt_ble.ble_app.index, tool_hci_number=virt_ble.ble_tool.index) + runner, + apps_register, + paths, + pics_file, + test_timeout_seconds, + context.obj.dry_run, + test_runtime=context.obj.runtime, + app_hci_number=virt_ble.ble_app.index, + tool_hci_number=virt_ble.ble_tool.index, + ) else: test.Run( - runner, apps_register, paths, pics_file, test_timeout_seconds, context.obj.dry_run, - test_runtime=context.obj.runtime) + runner, + apps_register, + paths, + pics_file, + test_timeout_seconds, + context.obj.dry_run, + test_runtime=context.obj.runtime, + ) if not context.obj.dry_run: test_end = time.monotonic() - logging.info('%-30s - Completed in %0.2f seconds' % - (test.name, (test_end - test_start))) + logging.info("%-30s - Completed in %0.2f seconds" % (test.name, (test_end - test_start))) except Exception: test_end = time.monotonic() - logging.exception('%-30s - FAILED in %0.2f seconds' % - (test.name, (test_end - test_start))) + logging.exception("%-30s - FAILED in %0.2f seconds" % (test.name, (test_end - test_start))) observed_failures += 1 if not keep_going: cleanup() @@ -440,17 +456,14 @@ def cleanup(): # On linux, allow an execution shell to be prepared -if sys.platform == 'linux': - @main.command( - 'shell', - help=('Execute a bash shell in the environment (useful to test ' - 'network namespaces)')) +if sys.platform == "linux": + + @main.command("shell", help=("Execute a bash shell in the environment (useful to test " "network namespaces)")) @click.pass_context def cmd_shell(context): - chiptest.linux.PrepareNamespacesForTestExecution( - context.obj.in_unshare) + chiptest.linux.PrepareNamespacesForTestExecution(context.obj.in_unshare) os.execvpe("bash", ["bash"], os.environ.copy()) -if __name__ == '__main__': - main(auto_envvar_prefix='CHIP') +if __name__ == "__main__": + main(auto_envvar_prefix="CHIP") From fdc9a59b578de4ae33e6afe9c5afb0cd5652d2ac Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 13 Jun 2024 13:44:39 +0200 Subject: [PATCH 12/46] Make shutdown more gracefully --- .../docker/images/stage-2/chip-build-linux-qemu/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile b/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile index 170aab23e81f83..e89d5692d9e24f 100644 --- a/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile @@ -173,7 +173,7 @@ RUN mkdir -p /tmp/workdir/linux \ && echo -n \ "#!/bin/bash\n" \ "grep -q 'rootshell' /proc/cmdline && exit\n" \ - "[[ -n $$SSH_CONNECTION ]] && exit \n" \ + "[[ -n \$SSH_CONNECTION ]] && exit \n" \ "if [[ -x /chip/runner.sh ]]; then\n" \ " echo '### RUNNER START ###'\n" \ " cd /chip\n" \ @@ -185,7 +185,7 @@ RUN mkdir -p /tmp/workdir/linux \ " read -r -t 5 -p 'Press ENTER to access root shell...' && exit || echo ' timeout.'\n" \ "fi\n" \ "echo 'Shutting down emulated system...'\n" \ - "echo o > /proc/sysrq-trigger\n" \ + "systemctl poweroff\n" \ | guestfish --rw -a $UBUNTU_QEMU_IMG -m /dev/sda3:/ upload - /launcher.sh : chmod 0755 /launcher.sh \ && virt-sparsify --compress ${UBUNTU_QEMU_IMG} ${UBUNTU_QEMU_IMG}.compressed \ && mv ${UBUNTU_QEMU_IMG}.compressed ${UBUNTU_QEMU_IMG} \ From fc93c24a91d05af052f36a3f38584a0360e70a98 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 17 Jun 2024 13:18:03 +0200 Subject: [PATCH 13/46] Fix code-wifi pairing --- .../clusters/accessory_server_bridge.py | 2 +- scripts/tests/chiptest/accessories.py | 2 +- scripts/tests/chiptest/linux.py | 49 +++++++++++++------ scripts/tests/chiptest/test_definition.py | 8 ++- scripts/tests/run_test_suite.py | 5 +- 5 files changed, 46 insertions(+), 20 deletions(-) diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/accessory_server_bridge.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/accessory_server_bridge.py index 15ebdf46428830..c83f85323eaf60 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/accessory_server_bridge.py +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/accessory_server_bridge.py @@ -22,7 +22,7 @@ _PORT = 9000 if sys.platform == 'linux': - _IP = '10.10.10.5' + _IP = "10.10.12.5" def _make_url(): diff --git a/scripts/tests/chiptest/accessories.py b/scripts/tests/chiptest/accessories.py index 99433d7ed88660..b35ba3a7e57c9b 100644 --- a/scripts/tests/chiptest/accessories.py +++ b/scripts/tests/chiptest/accessories.py @@ -28,7 +28,7 @@ PORT = 9000 if sys.platform == 'linux': - IP = '10.10.10.5' + IP = "10.10.12.5" class AppsRegister: diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index 83e20ec5edbf24..10a03857378ba2 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -64,7 +64,7 @@ def EnsurePrivateState(): sys.exit(1) -def CreateNamespacesForAppTest(): +def CreateNamespacesForAppTest(wifi_ble_config: bool = False): """ Creates appropriate namespaces for a tool and app binaries in a simulated isolated network. @@ -95,23 +95,33 @@ def CreateNamespacesForAppTest(): "ip netns exec app ip link set dev lo up", "ip link set dev eth-app-switch up", - "ip netns exec tool ip addr add 10.10.10.2/24 dev eth-tool", + "ip netns exec tool ip addr add 10.10.12.2/24 dev eth-tool", "ip netns exec tool ip link set dev eth-tool up", "ip netns exec tool ip link set dev lo up", "ip link set dev eth-tool-switch up", - # Force IPv6 to use ULAs that we control - "ip netns exec tool ip -6 addr flush eth-tool", - "ip netns exec app ip -6 addr flush eth-app", - "ip netns exec tool ip -6 a add fd00:0:1:1::2/64 dev eth-tool", - "ip netns exec app ip -6 a add fd00:0:1:1::3/64 dev eth-app", - - # create link between virtual host 'tool' and the test runner "ip addr add 10.10.10.5/24 dev eth-ci", + "ip addr add 10.10.12.5/24 dev eth-ci", "ip link set dev eth-ci up", "ip link set dev eth-ci-switch up", ] + if not wifi_ble_config: + COMMANDS += [ + "ip link add eth-app-direct type veth peer name eth-tool-direct", + "ip link set eth-app-direct netns app", + "ip link set eth-tool-direct netns tool", + "ip netns exec app ip addr add 10.10.15.1/24 dev eth-app-direct", + "ip netns exec app ip link set dev eth-app-direct up", + "ip netns exec tool ip addr add 10.10.15.2/24 dev eth-tool-direct", + "ip netns exec tool ip link set dev eth-tool-direct up", + # Force IPv6 to use ULAs that we control + "ip netns exec tool ip -6 addr flush eth-tool", + "ip netns exec app ip -6 addr flush eth-app", + "ip netns exec tool ip -6 a add fd00:0:1:1::2/64 dev eth-tool-direct", + "ip netns exec app ip -6 a add fd00:0:1:1::3/64 dev eth-app-direct", + ] + for command in COMMANDS: logging.debug("Executing '%s'" % command) if os.system(command) != 0: @@ -134,7 +144,7 @@ def CreateNamespacesForAppTest(): logging.warn("Some addresses look to still be tentative") -def RemoveNamespaceForAppTest(): +def RemoveNamespaceForAppTest(wifi_ble_config: bool = False): """ Removes namespaces for a tool and app binaries previously created to simulate an isolated network. This tears down what was created in CreateNamespacesForAppTest. @@ -155,6 +165,14 @@ def RemoveNamespaceForAppTest(): "ip netns del app", ] + if not wifi_ble_config: + COMMANDS += [ + "ip link set dev eth-app-direct down", + "ip link set dev eth-tool-direct down", + "ip link delete eth-tool-direct", + "ip link delete eth-app-direct", + ] + for command in COMMANDS: logging.debug("Executing '%s'" % command) if os.system(command) != 0: @@ -163,17 +181,17 @@ def RemoveNamespaceForAppTest(): sys.exit(1) -def PrepareNamespacesForTestExecution(in_unshare: bool): +def PrepareNamespacesForTestExecution(in_unshare: bool, wifi_ble_config: bool = False): if not in_unshare: EnsureNetworkNamespaceAvailability() elif in_unshare: EnsurePrivateState() - CreateNamespacesForAppTest() + CreateNamespacesForAppTest(wifi_ble_config) -def ShutdownNamespaceForTestExecution(): - RemoveNamespaceForAppTest() +def ShutdownNamespaceForTestExecution(wifi_ble_config: bool = False): + RemoveNamespaceForAppTest(wifi_ble_config) class DbusTest: @@ -279,6 +297,9 @@ def start(self): logging.info(f"Would run dnsmasq with {dnsmaq_cmd}") logging.info(f"Would run wpa_supplicant with {wpa_cmd}") return + # Write clean configuration for wifi to prevent auto wifi connection during next test + with open(self._wpa_supplicant_conf, "w") as f: + f.write("ctrl_interface=DIR=/run/wpa_supplicant\nctrl_interface_group=root\nupdate_config=1\n") self._move_phy_to_netns(self._get_phy(self._wlan_app), "app") self._move_phy_to_netns(self._get_phy(self._wlan_tool), "tool") self._set_interface_ip_in_netns("tool", self._wlan_tool, "192.168.200.1/24") diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 82d598b18f221d..691815b33e80a1 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -378,7 +378,13 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, pairing_server_args = [] if tool_hci_number is not None: pairing_cmd = paths.chip_tool_with_python_cmd + [ - "pairing", "code-wifi", TEST_NODE_ID, "Virtual_Wifi", "ExamplePassword", "MT:-24J0AFN00KA0648G00"] + "pairing", + "code-wifi", + TEST_NODE_ID, + "Virtual_Wifi", + "ExamplePassword", + "MT:-24J042C00KA0648G00", + ] pairing_server_args = [ "--ble-adapter", str(tool_hci_number)] else: diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 745457c119f510..964ebc1b772660 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -359,8 +359,7 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o ) if sys.platform == 'linux': - chiptest.linux.PrepareNamespacesForTestExecution( - context.obj.in_unshare) + chiptest.linux.PrepareNamespacesForTestExecution(context.obj.in_unshare, ble_wifi) if ble_wifi: dbus = chiptest.linux.DbusTest() dbus.start() @@ -392,7 +391,7 @@ def cleanup(): virt_wifi.stop() virt_ble.stop() dbus.stop() - chiptest.linux.ShutdownNamespaceForTestExecution() + chiptest.linux.ShutdownNamespaceForTestExecution(ble_wifi) for i in range(iterations): logging.info("Starting iteration %d" % (i + 1)) From d8bb72cb9c5ce8f4857a8141fb7766a647002bee Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 17 Jun 2024 16:15:13 +0200 Subject: [PATCH 14/46] Get wlan name from config --- scripts/tests/chiptest/linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index 10a03857378ba2..708f448e6368e1 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -288,7 +288,7 @@ def start(self): "-u", "-s", "-i", - "wlan0", + self._wlan_app, "-c", self._wpa_supplicant_conf, ] From 2685ef272f198591a3b3ba7a324b71f037792d78 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 17 Jun 2024 16:20:44 +0200 Subject: [PATCH 15/46] Cleanup code --- scripts/tests/chiptest/linux.py | 3 +-- scripts/tests/chiptest/test_definition.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index 708f448e6368e1..e203c5b6ccf7ff 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -277,8 +277,7 @@ def _set_interface_ip_in_netns(netns: str, dev: str, ip: str): def start(self): hostapd_cmd = ["ip", "netns", "exec", "tool", self._hostapd_path, self._hostapd_conf] dnsmaq_cmd = ["ip", "netns", "exec", "tool", self._dnsmasq_path, "-d", "-C", self._dnsmasq_conf] - # TODO: change wlan0 to the actual interface name - dhclient_cmd = ["ip", "netns", "exec", "app", "dhclient", "wlan0"] + dhclient_cmd = ["ip", "netns", "exec", "app", "dhclient", self._wlan_app] wpa_cmd = [ "ip", "netns", diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 691815b33e80a1..7b4fc639de1084 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -389,8 +389,8 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, "--ble-adapter", str(tool_hci_number)] else: pairing_cmd = paths.chip_tool_with_python_cmd + ['pairing', 'code', TEST_NODE_ID, setupCode] - if self.target == TestTarget.LIT_ICD and test_runtime == TestRunTime.CHIP_TOOL_PYTHON: - pairing_cmd += ['--icd-registration', 'true'] + if self.target == TestTarget.LIT_ICD and test_runtime == TestRunTime.CHIP_TOOL_PYTHON: + pairing_cmd += ['--icd-registration', 'true'] test_cmd = paths.chip_tool_with_python_cmd + ['tests', self.run_name] + ['--PICS', pics_file] server_args = ['--server_path', paths.chip_tool[-1]] + \ ['--server_arguments', 'interactive server' + @@ -412,7 +412,6 @@ def quoter(arg): return f"'{arg}'" if ' ' in arg else arg test_cmd, name='TEST', dependencies=[apps_register], timeout_seconds=timeout_seconds) - runner.capture_delegate.LogContents() except Exception: logging.error("!!!!!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!!!!!!!") From 8b9305ecc4be02de214f836dbed60646e1cac3e2 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 17 Jun 2024 16:30:23 +0200 Subject: [PATCH 16/46] Bump version file --- integrations/docker/images/base/chip-build/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index adf6c4a4df5243..c8f9305c49499b 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -55 : Update to Ubuntu 24.04 as the base build image +56 : Update test image to gracefully shutdown From 6a1f93a754dfa1f6b787af790bc50af3b70fd7df Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 18 Jun 2024 09:03:25 +0200 Subject: [PATCH 17/46] Use specific qemu img version --- .github/workflows/qemu.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index ee63fae0370b2a..eb48a637e89bdb 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -105,7 +105,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/jlatusek/chip-build-linux-qemu:latest + image: ghcr.io/project-chip/chip-build-linux-qemu:54 volumes: - "/tmp/log_output:/tmp/test_logs" # Required for using KVM From bf02c8bba021bb9633904350c4ceeb51dc3971b8 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 18 Jun 2024 11:04:56 +0200 Subject: [PATCH 18/46] Update variable names, remove only one site of network interface --- scripts/tests/chiptest/linux.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index e203c5b6ccf7ff..651176e74a751b 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -64,7 +64,7 @@ def EnsurePrivateState(): sys.exit(1) -def CreateNamespacesForAppTest(wifi_ble_config: bool = False): +def CreateNamespacesForAppTest(ble_wifi: bool = False): """ Creates appropriate namespaces for a tool and app binaries in a simulated isolated network. @@ -106,7 +106,7 @@ def CreateNamespacesForAppTest(wifi_ble_config: bool = False): "ip link set dev eth-ci-switch up", ] - if not wifi_ble_config: + if not ble_wifi: COMMANDS += [ "ip link add eth-app-direct type veth peer name eth-tool-direct", "ip link set eth-app-direct netns app", @@ -144,7 +144,7 @@ def CreateNamespacesForAppTest(wifi_ble_config: bool = False): logging.warn("Some addresses look to still be tentative") -def RemoveNamespaceForAppTest(wifi_ble_config: bool = False): +def RemoveNamespaceForAppTest(ble_wifi: bool = False): """ Removes namespaces for a tool and app binaries previously created to simulate an isolated network. This tears down what was created in CreateNamespacesForAppTest. @@ -165,12 +165,11 @@ def RemoveNamespaceForAppTest(wifi_ble_config: bool = False): "ip netns del app", ] - if not wifi_ble_config: + if not ble_wifi: COMMANDS += [ "ip link set dev eth-app-direct down", "ip link set dev eth-tool-direct down", "ip link delete eth-tool-direct", - "ip link delete eth-app-direct", ] for command in COMMANDS: @@ -181,17 +180,17 @@ def RemoveNamespaceForAppTest(wifi_ble_config: bool = False): sys.exit(1) -def PrepareNamespacesForTestExecution(in_unshare: bool, wifi_ble_config: bool = False): +def PrepareNamespacesForTestExecution(in_unshare: bool, ble_wifi: bool = False): if not in_unshare: EnsureNetworkNamespaceAvailability() elif in_unshare: EnsurePrivateState() - CreateNamespacesForAppTest(wifi_ble_config) + CreateNamespacesForAppTest(ble_wifi) -def ShutdownNamespaceForTestExecution(wifi_ble_config: bool = False): - RemoveNamespaceForAppTest(wifi_ble_config) +def ShutdownNamespaceForTestExecution(ble_wifi: bool = False): + RemoveNamespaceForAppTest(ble_wifi) class DbusTest: From a2bcbfc3fcdaf9ccee251876f82ccdac9e92f928 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 18 Jun 2024 12:07:13 +0200 Subject: [PATCH 19/46] Bump CI images versions --- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +++++----- .github/workflows/chef.yaml | 8 ++++---- .github/workflows/cirque.yaml | 2 +- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 ++-- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .github/workflows/examples-linux-standalone.yaml | 2 +- .github/workflows/examples-linux-tv-casting-app.yaml | 2 +- .github/workflows/examples-mbed.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-nuttx.yaml | 2 +- .github/workflows/examples-nxp.yaml | 2 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-rw61x.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 4 ++-- .github/workflows/qemu.yaml | 6 +++--- .github/workflows/release_artifacts.yaml | 4 ++-- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 ++-- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- 40 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index a1b93c882bf64f..07d41905ae29ad 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 64e6b99a05d02a..c76a2c576cdef4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -281,7 +281,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -342,7 +342,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -451,7 +451,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 77c1a21be6b388..1130e88615deec 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 options: --user root steps: @@ -56,7 +56,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 options: --user root steps: @@ -77,7 +77,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:54 + image: ghcr.io/project-chip/chip-build-nrf-platform:55 options: --user root steps: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:54 + image: ghcr.io/project-chip/chip-build-telink:55 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index b3e2f9d1086ee8..fe70b7655b2720 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -42,7 +42,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: ghcr.io/project-chip/chip-build-cirque:54 + # image: ghcr.io/project-chip/chip-build-cirque:55 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index abe0568fb9e011..8516c1a2a10227 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:54 + image: ghcr.io/project-chip/chip-build-doxygen:55 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 7c098ea57f2403..3ff4baabc2d3ae 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:54 + image: ghcr.io/project-chip/chip-build-ameba:55 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index f238d10a5cf6b3..6d2e7ddb290b99 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:54 + image: ghcr.io/project-chip/chip-build-asr:55 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 12b033b791f900..cda0d8b4274e0c 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:54 + image: ghcr.io/project-chip/chip-build-bouffalolab:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index abdc5605ada47b..8c8ce164cdeb00 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:54 + image: ghcr.io/project-chip/chip-build-ti:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 564cd34dddd5b2..90684128ce30b0 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:54 + image: ghcr.io/project-chip/chip-build-ti:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index c44b24f02f49bd..846057a6722928 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:54 + image: ghcr.io/project-chip/chip-build-efr32:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 92415c0ce96930..c92f3eaa9400e3 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -126,7 +126,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 290e67273f9bd3..1ecb390c5dbece 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:54 + image: ghcr.io/project-chip/chip-build-infineon:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 4bf103ddae4542..c97db570039e14 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:54 + image: ghcr.io/project-chip/chip-build-crosscompile:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index ab32eef0801353..1362a6de5a7720 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:54 + image: ghcr.io/project-chip/chip-build-imx:55 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index eb97e63235e714..45aa7d174c1bbe 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index d18de64382ee6a..b1d28276034868 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 steps: - name: Checkout diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 3516c721fa157f..86fc95e1be196e 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-mbed-os:54 + image: ghcr.io/project-chip/chip-build-mbed-os:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 780543a70d1f11..28be41e1e4718f 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index c8d997d5ca6631..e9a2b6714786ef 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:54 + image: ghcr.io/project-chip/chip-build-nrf-platform:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index 5ffd19b1319ff5..d2c342d29e5655 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:54 + image: ghcr.io/project-chip/chip-build-nuttx:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index 05d434b0a67792..fe284e9787289e 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:54 + image: ghcr.io/project-chip/chip-build-k32w:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 2f878ea48e4540..a34c65b9940f2a 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:54 + image: ghcr.io/project-chip/chip-build-openiotsdk:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 2bb85ad4acbfac..52a582ac3dbaba 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-rw61x.yaml b/.github/workflows/examples-rw61x.yaml index eed41f209ed61d..92049d56524291 100644 --- a/.github/workflows/examples-rw61x.yaml +++ b/.github/workflows/examples-rw61x.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-rw61x:54 + image: ghcr.io/project-chip/chip-build-rw61x:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index 809861cdee179e..dc0d17cc7e1aad 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 6c836294381a0f..b6dc889dc95d8d 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:54 + image: ghcr.io/project-chip/chip-build-telink:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index ae5a847026d3c1..27d676251dbf66 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:54 + image: ghcr.io/project-chip/chip-build-tizen:55 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index c86839d8f51708..ea5372afe7ddaa 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:54 + image: ghcr.io/project-chip/chip-build-android:55 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 30b697c5f1f6ce..af5947d4e9c7d6 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index ff734d2d4fe338..7b492c72c9e6bf 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:54 + image: ghcr.io/project-chip/chip-build-java:55 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2b5bbeff0fe465..5fe9414e4d2d1c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 6fd9a96e151ec6..bf0f1e53793cac 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:54 + image: ghcr.io/project-chip/chip-build-minimal:55 steps: - name: Checkout @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:54 + image: ghcr.io/project-chip/chip-build-minimal:55 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index eb48a637e89bdb..4f87a37451f744 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:54 + image: ghcr.io/project-chip/chip-build-esp32-qemu:55 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -78,7 +78,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:54 + image: ghcr.io/project-chip/chip-build-tizen-qemu:55 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -105,7 +105,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-linux-qemu:54 + image: ghcr.io/project-chip/chip-build-linux-qemu:55 volumes: - "/tmp/log_output:/tmp/test_logs" # Required for using KVM diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 178bc028ea6b46..71f1171492446b 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:54 + image: ghcr.io/project-chip/chip-build-efr32:55 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 014573614a0448..7ad40985dd1bb4 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:54 + image: ghcr.io/project-chip/chip-build-android:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e2dbd5f707334a..c7e78513f23f7e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -441,7 +441,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index c1d3bebddde5ae..73331409cc7078 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 81ffbcbb3b057a..8d17559e99b32c 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 987cc82a2e3f06..d8a3073d0f3283 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 defaults: run: shell: sh From cd83087ab621ab8a449092a9bfe3b28b6305c9a2 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 18 Jun 2024 12:09:16 +0200 Subject: [PATCH 20/46] Bump CI images version --- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +++++----- .github/workflows/chef.yaml | 8 ++++---- .github/workflows/cirque.yaml | 2 +- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 ++-- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .github/workflows/examples-linux-standalone.yaml | 2 +- .github/workflows/examples-linux-tv-casting-app.yaml | 2 +- .github/workflows/examples-mbed.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-nuttx.yaml | 2 +- .github/workflows/examples-nxp.yaml | 2 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-rw61x.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 4 ++-- .github/workflows/qemu.yaml | 4 ++-- .github/workflows/release_artifacts.yaml | 4 ++-- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 ++-- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- 40 files changed, 52 insertions(+), 52 deletions(-) diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index a1b93c882bf64f..07d41905ae29ad 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 64e6b99a05d02a..c76a2c576cdef4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -281,7 +281,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -342,7 +342,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -451,7 +451,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 77c1a21be6b388..1130e88615deec 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 options: --user root steps: @@ -56,7 +56,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 options: --user root steps: @@ -77,7 +77,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:54 + image: ghcr.io/project-chip/chip-build-nrf-platform:55 options: --user root steps: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:54 + image: ghcr.io/project-chip/chip-build-telink:55 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index b3e2f9d1086ee8..fe70b7655b2720 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -42,7 +42,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: ghcr.io/project-chip/chip-build-cirque:54 + # image: ghcr.io/project-chip/chip-build-cirque:55 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index abe0568fb9e011..8516c1a2a10227 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:54 + image: ghcr.io/project-chip/chip-build-doxygen:55 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 7c098ea57f2403..3ff4baabc2d3ae 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:54 + image: ghcr.io/project-chip/chip-build-ameba:55 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index f238d10a5cf6b3..6d2e7ddb290b99 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:54 + image: ghcr.io/project-chip/chip-build-asr:55 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 12b033b791f900..cda0d8b4274e0c 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:54 + image: ghcr.io/project-chip/chip-build-bouffalolab:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index abdc5605ada47b..8c8ce164cdeb00 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:54 + image: ghcr.io/project-chip/chip-build-ti:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 564cd34dddd5b2..90684128ce30b0 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:54 + image: ghcr.io/project-chip/chip-build-ti:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index c44b24f02f49bd..846057a6722928 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:54 + image: ghcr.io/project-chip/chip-build-efr32:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 92415c0ce96930..c92f3eaa9400e3 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -126,7 +126,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 290e67273f9bd3..1ecb390c5dbece 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:54 + image: ghcr.io/project-chip/chip-build-infineon:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 4bf103ddae4542..c97db570039e14 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:54 + image: ghcr.io/project-chip/chip-build-crosscompile:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index ab32eef0801353..1362a6de5a7720 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:54 + image: ghcr.io/project-chip/chip-build-imx:55 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index eb97e63235e714..45aa7d174c1bbe 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index d18de64382ee6a..b1d28276034868 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 steps: - name: Checkout diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 3516c721fa157f..86fc95e1be196e 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-mbed-os:54 + image: ghcr.io/project-chip/chip-build-mbed-os:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 780543a70d1f11..28be41e1e4718f 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index c8d997d5ca6631..e9a2b6714786ef 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:54 + image: ghcr.io/project-chip/chip-build-nrf-platform:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index 5ffd19b1319ff5..d2c342d29e5655 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:54 + image: ghcr.io/project-chip/chip-build-nuttx:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index 05d434b0a67792..fe284e9787289e 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:54 + image: ghcr.io/project-chip/chip-build-k32w:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 2f878ea48e4540..a34c65b9940f2a 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:54 + image: ghcr.io/project-chip/chip-build-openiotsdk:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 2bb85ad4acbfac..52a582ac3dbaba 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-rw61x.yaml b/.github/workflows/examples-rw61x.yaml index eed41f209ed61d..92049d56524291 100644 --- a/.github/workflows/examples-rw61x.yaml +++ b/.github/workflows/examples-rw61x.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-rw61x:54 + image: ghcr.io/project-chip/chip-build-rw61x:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index 809861cdee179e..dc0d17cc7e1aad 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 6c836294381a0f..b6dc889dc95d8d 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:54 + image: ghcr.io/project-chip/chip-build-telink:55 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index ae5a847026d3c1..27d676251dbf66 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:54 + image: ghcr.io/project-chip/chip-build-tizen:55 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index c86839d8f51708..ea5372afe7ddaa 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:54 + image: ghcr.io/project-chip/chip-build-android:55 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 30b697c5f1f6ce..af5947d4e9c7d6 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index ff734d2d4fe338..7b492c72c9e6bf 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:54 + image: ghcr.io/project-chip/chip-build-java:55 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2b5bbeff0fe465..5fe9414e4d2d1c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 6fd9a96e151ec6..bf0f1e53793cac 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:54 + image: ghcr.io/project-chip/chip-build-minimal:55 steps: - name: Checkout @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:54 + image: ghcr.io/project-chip/chip-build-minimal:55 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index bff12a5999586e..a35eeca7dc8fab 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:54 + image: ghcr.io/project-chip/chip-build-esp32-qemu:55 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -78,7 +78,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:54 + image: ghcr.io/project-chip/chip-build-tizen-qemu:55 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 178bc028ea6b46..71f1171492446b 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:54 + image: ghcr.io/project-chip/chip-build-esp32:55 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:54 + image: ghcr.io/project-chip/chip-build-efr32:55 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 014573614a0448..7ad40985dd1bb4 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:54 + image: ghcr.io/project-chip/chip-build-android:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e2dbd5f707334a..c7e78513f23f7e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -441,7 +441,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index c1d3bebddde5ae..73331409cc7078 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 81ffbcbb3b057a..8d17559e99b32c 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 987cc82a2e3f06..d8a3073d0f3283 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:55 defaults: run: shell: sh From d11a7c1c3fafd296da39ab9a2c92cff50472efe0 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 18 Jun 2024 18:05:52 +0200 Subject: [PATCH 21/46] Upgrade pip --- scripts/setup/constraints.txt | 36 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 49aff90df0715c..86e4593053dafe 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile --allow-unsafe --output-file=constraints.txt --strip-extras requirements.all.txt @@ -16,6 +16,8 @@ attrs==22.2.0 # via jsonschema backcall==0.2.0 # via ipython +bitarray==2.6.0 + # via -r requirements.esp32.txt bitstring==3.1.9 # via # -r requirements.esp32.txt @@ -25,7 +27,9 @@ build==0.8.0 # -r requirements.all.txt # pip-tools cachecontrol==0.12.11 - # via idf-component-manager + # via + # cachecontrol + # idf-component-manager cbor==1.0.0 # via -r requirements.zephyr.txt cbor2==5.4.6 @@ -91,9 +95,7 @@ fastcore==1.5.28 filelock==3.9.0 # via virtualenv future==0.18.3 - # via - # -r requirements.esp32.txt - # idf-component-manager + # via -r requirements.esp32.txt ghapi==1.0.3 # via -r requirements.memory.txt humanfriendly==10.0 @@ -190,7 +192,9 @@ pygments==2.14.0 pykwalify==1.8.0 # via west pyparsing==3.0.9 - # via -r requirements.esp32.txt + # via + # -r requirements.esp32.txt + # idf-component-manager pyrsistent==0.19.3 # via jsonschema pyserial==3.5 @@ -261,11 +265,15 @@ types-protobuf==4.24.0.2 # via # -r requirements.all.txt # mypy-protobuf -typing-extensions==4.5.0 +typing-extensions==4.12.2 # via mypy +tzdata==2024.1 + # via pandas urllib3==1.26.14 - # via requests -virtualenv==20.20.0 + # via + # idf-component-manager + # requests +virtualenv==20.21.1 # via -r requirements.all.txt watchdog==2.3.1 # via -r requirements.all.txt @@ -281,18 +289,12 @@ wheel==0.38.4 ; sys_platform == "linux" # pip-tools # The following packages are considered to be unsafe in a requirements file: -pip==23.2.1 +pip==24.0 # via # fastcore # ghapi # pip-tools -setuptools==68.0.0 +setuptools==70.0.0 # via # pip-tools # west - -# Manual edits: - -# Higher versions depend on proto-plus, which break -# nanopb code generation (due to name conflict of the 'proto' module) -google-api-core==2.17.0 From 99b4808fa124b876748aa1196284ed8b41703509 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 18 Jun 2024 19:00:59 +0200 Subject: [PATCH 22/46] Update all python packages --- scripts/setup/constraints.txt | 175 +++++++++++++++++++--------------- 1 file changed, 98 insertions(+), 77 deletions(-) diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 86e4593053dafe..7b88c127911211 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -1,21 +1,21 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --allow-unsafe --output-file=constraints.txt --strip-extras requirements.all.txt # -anytree==2.8.0 +anytree==2.12.1 # via -r requirements.memory.txt appdirs==1.4.4 # via -r requirements.all.txt -appnope==0.1.3 +appnope==0.1.4 # via -r requirements.all.txt -asttokens==2.2.1 +asttokens==2.4.1 # via stack-data -attrs==22.2.0 - # via jsonschema -backcall==0.2.0 - # via ipython +attrs==23.2.0 + # via + # jsonschema + # referencing bitarray==2.6.0 # via -r requirements.esp32.txt bitstring==3.1.9 @@ -26,21 +26,21 @@ build==0.8.0 # via # -r requirements.all.txt # pip-tools -cachecontrol==0.12.11 +cachecontrol==0.14.0 # via # cachecontrol # idf-component-manager cbor==1.0.0 # via -r requirements.zephyr.txt -cbor2==5.4.6 +cbor2==5.6.4 # via -r requirements.zephyr.txt -certifi==2022.12.7 +certifi==2024.6.2 # via requests -cffi==1.15.1 +cffi==1.16.0 # via cryptography -charset-normalizer==3.0.1 +charset-normalizer==3.3.2 # via requests -click==8.1.3 +click==8.1.7 # via # -r requirements.build.txt # -r requirements.esp32.txt @@ -61,7 +61,7 @@ contextlib2==21.6.0 # via # idf-component-manager # schema -cryptography==39.0.2 +cryptography==42.0.8 # via # -c constraints.esp32.txt # -r requirements.all.txt @@ -70,65 +70,73 @@ cxxfilt==0.3.0 # via -r requirements.memory.txt decorator==5.1.1 # via ipython -diskcache==5.4.0 +diskcache==5.6.3 # via -r requirements.all.txt -distlib==0.3.6 +distlib==0.3.8 # via virtualenv docopt==0.6.2 # via pykwalify -ecdsa==0.18.0 +ecdsa==0.19.0 # via # -r requirements.esp32.txt # esptool -esp-coredump==1.7.0 +esp-coredump==1.11.0 # via esp-idf-monitor esp-idf-kconfig==1.2.0 # via -r requirements.esp32.txt esp-idf-monitor==1.1.1 # via -r requirements.esp32.txt -esptool==4.6.2 +esptool==4.7.0 # via esp-coredump -executing==1.2.0 +exceptiongroup==1.2.1 + # via ipython +executing==2.0.1 # via stack-data -fastcore==1.5.28 +fastcore==1.5.46 # via ghapi -filelock==3.9.0 - # via virtualenv -future==0.18.3 +filelock==3.15.1 + # via + # cachecontrol + # virtualenv +future==1.0.0 # via -r requirements.esp32.txt -ghapi==1.0.3 +ghapi==1.0.5 # via -r requirements.memory.txt humanfriendly==10.0 # via coloredlogs -idf-component-manager==1.5.2 +idf-component-manager==1.5.3 # via -r requirements.esp32.txt -idna==3.4 +idna==3.7 # via requests intelhex==2.3.0 - # via -r requirements.zephyr.txt -ipython==8.11.0 + # via + # -r requirements.zephyr.txt + # esptool +ipython==8.25.0 # via -r requirements.all.txt -jedi==0.18.2 +itsdangerous==2.0.1 ; python_version < "3.11" + # via -r requirements.esp32.txt +jedi==0.19.1 # via ipython -jinja2==3.0.3 +jinja2==3.1.4 # via -r requirements.build.txt -jsonschema==4.17.3 +jsonschema==4.22.0 # via -r requirements.zephyr.txt -kconfiglib==13.7.1 +jsonschema-specifications==2023.12.1 + # via jsonschema +kconfiglib==14.1.0 # via esp-idf-kconfig -lark==1.1.5 +lark==1.1.9 # via # -r requirements.all.txt # -r requirements.build.txt -lockfile==0.12.2 - # via cachecontrol -markupsafe==2.1.2 +markupsafe==2.1.5 # via jinja2 -matplotlib-inline==0.1.6 +matplotlib-inline==0.1.7 # via ipython -mobly==1.12.1 +mobly==1.12.2 # via -r requirements.all.txt -msgpack==1.0.4 +msgpack==1.0.8 # via cachecontrol mypy==0.971 # via -r requirements.all.txt @@ -136,50 +144,48 @@ mypy-extensions==1.0.0 # via mypy mypy-protobuf==3.5.0 # via -r requirements.all.txt -numpy==1.26.4 +numpy==2.0.0 # via pandas -packaging==23.0 +packaging==24.1 # via # build # fastcore # ghapi # idf-component-manager # west -pandas==2.1.4 ; platform_machine != "aarch64" and platform_machine != "arm64" +pandas==2.2.2 ; platform_machine != "aarch64" and platform_machine != "arm64" # via -r requirements.memory.txt -parso==0.8.3 +parso==0.8.4 # via jedi -pep517==0.13.0 +pep517==0.13.1 # via build -pexpect==4.8.0 +pexpect==4.9.0 # via ipython pgi==0.0.11.2 ; sys_platform == "linux" # via -r requirements.all.txt -pickleshare==0.7.5 - # via ipython -pip-tools==7.0.0 +pip-tools==7.3.0 # via -r requirements.all.txt -platformdirs==3.0.0 +platformdirs==4.2.2 # via virtualenv -portpicker==1.5.2 +portpicker==1.6.0 # via # -r requirements.all.txt # mobly -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.47 # via ipython protobuf==4.24.4 # via # -r requirements.all.txt # mypy-protobuf -psutil==5.9.4 +psutil==5.9.8 # via portpicker ptyprocess==0.7.0 # via pexpect pure-eval==0.2.2 # via stack-data -pycparser==2.21 +pycparser==2.22 # via cffi -pyelftools==0.30 +pyelftools==0.31 # via # -c constraints.esp32.txt # esp-idf-monitor @@ -187,7 +193,7 @@ pygdbmi==0.9.0.2 # via # -r requirements.esp32.txt # esp-coredump -pygments==2.14.0 +pygments==2.18.0 # via ipython pykwalify==1.8.0 # via west @@ -195,14 +201,12 @@ pyparsing==3.0.9 # via # -r requirements.esp32.txt # idf-component-manager -pyrsistent==0.19.3 - # via jsonschema pyserial==3.5 # via # -c constraints.esp32.txt # esp-idf-monitor # esptool -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # pandas # pykwalify @@ -210,7 +214,7 @@ python-engineio==3.14.2 # via python-socketio python-socketio==4.6.1 # via -r requirements.esp32.txt -pytz==2022.7.1 +pytz==2024.1 # via pandas pyyaml==6.0.1 # via @@ -222,7 +226,11 @@ reedsolo==1.5.4 # via # -r requirements.esp32.txt # esptool -requests==2.28.2 +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 # via # -r requirements.cirque.txt # cachecontrol @@ -231,10 +239,16 @@ requests==2.28.2 # requests-toolbelt requests-file==1.5.1 # via idf-component-manager -requests-toolbelt==0.10.1 +requests-toolbelt==1.0.0 # via idf-component-manager -ruamel-yaml==0.17.21 +rpds-py==0.18.1 + # via + # jsonschema + # referencing +ruamel-yaml==0.18.6 # via pykwalify +ruamel-yaml-clib==0.2.8 + # via ruamel-yaml schema==0.7.5 # via idf-component-manager six==1.16.0 @@ -247,17 +261,23 @@ six==1.16.0 # python-engineio # python-socketio # requests-file -stack-data==0.6.2 +stack-data==0.6.3 # via ipython stringcase==1.2.0 # via -r requirements.build.txt tabulate==0.9.0 # via -r requirements.memory.txt -tornado==6.2 +tomli==2.0.1 + # via + # build + # mypy + # pep517 + # pip-tools +tornado==6.4.1 # via -r requirements.all.txt -tqdm==4.64.1 +tqdm==4.66.4 # via idf-component-manager -traitlets==5.9.0 +traitlets==5.14.3 # via # ipython # matplotlib-inline @@ -266,24 +286,26 @@ types-protobuf==4.24.0.2 # -r requirements.all.txt # mypy-protobuf typing-extensions==4.12.2 - # via mypy + # via + # ipython + # mypy tzdata==2024.1 # via pandas -urllib3==1.26.14 +urllib3==1.26.19 # via # idf-component-manager # requests -virtualenv==20.21.1 +virtualenv==20.26.2 # via -r requirements.all.txt -watchdog==2.3.1 +watchdog==4.0.1 # via -r requirements.all.txt -wcwidth==0.2.6 +wcwidth==0.2.13 # via prompt-toolkit -websockets==10.4 +websockets==12.0 # via -r requirements.all.txt -west==1.0.0 +west==1.2.0 # via -r requirements.zephyr.txt -wheel==0.38.4 ; sys_platform == "linux" +wheel==0.43.0 ; sys_platform == "linux" # via # -r requirements.all.txt # pip-tools @@ -291,7 +313,6 @@ wheel==0.38.4 ; sys_platform == "linux" # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via - # fastcore # ghapi # pip-tools setuptools==70.0.0 From 882ba5bdd787bc84a3b54e3502035e79622059f5 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 19 Jun 2024 09:51:39 +0200 Subject: [PATCH 23/46] Remove bugprone-casting-through-void check from .clang-tidy --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index fcb62d5d505d32..ab3f0c0715694b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -12,6 +12,7 @@ Checks: > readability-redundant-string-init, -bugprone-assignment-in-if-condition, -bugprone-branch-clone, + -bugprone-casting-through-void, #TODO remove this check after fixing issues in source code -bugprone-copy-constructor-init, -bugprone-easily-swappable-parameters, -bugprone-forward-declaration-namespace, From 6bf6bf3647912efdb8024b3fe71fe0182f753075 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 20 Jun 2024 10:16:18 +0200 Subject: [PATCH 24/46] Add manual constrainst to fix proto conflict issue --- scripts/setup/constraints.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 7b88c127911211..653fb02a212795 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -319,3 +319,8 @@ setuptools==70.0.0 # via # pip-tools # west +# Manual edits: + +# Higher versions depend on proto-plus, which break +# nanopb code generation (due to name conflict of the 'proto' module) +google-api-core==2.17.0 From c17dce5d01f1fc0a594c392e0bd45cc528fcb22f Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 20 Jun 2024 11:14:46 +0200 Subject: [PATCH 25/46] Update telink requirements --- scripts/setup/requirements.telink.txt | 2 +- scripts/tools/telink/requirements.txt | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/setup/requirements.telink.txt b/scripts/setup/requirements.telink.txt index ee46087e46533e..64a2bc05b378a4 100644 --- a/scripts/setup/requirements.telink.txt +++ b/scripts/setup/requirements.telink.txt @@ -1,3 +1,3 @@ -future==0.18.3 +future==1.0.0 pypng==0.0.21 PyQRCode==1.2.1 diff --git a/scripts/tools/telink/requirements.txt b/scripts/tools/telink/requirements.txt index bb4359b5319da3..0c2c636f71ecb8 100644 --- a/scripts/tools/telink/requirements.txt +++ b/scripts/tools/telink/requirements.txt @@ -1,6 +1,6 @@ -cryptography==41.0.4 -cffi==1.15.0 -future==0.18.3 -pycparser==2.21 +cryptography==42.0.8 +cffi==1.16.0 +future==1.0.0 +pycparser==2.22 pypng==0.0.21 -PyQRCode==1.2.1 \ No newline at end of file +PyQRCode==1.2.1 From cfd4d91110efe1746e5d7ff06260e79ef65e8862 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 20 Jun 2024 13:59:08 +0200 Subject: [PATCH 26/46] Use version of python generated by script --- src/pybindings/pycontroller/BUILD.gn | 7 ++++--- src/pybindings/pycontroller/python-version.py | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/pybindings/pycontroller/python-version.py diff --git a/src/pybindings/pycontroller/BUILD.gn b/src/pybindings/pycontroller/BUILD.gn index 032d3bc5a94810..571051fd8a8f03 100644 --- a/src/pybindings/pycontroller/BUILD.gn +++ b/src/pybindings/pycontroller/BUILD.gn @@ -43,12 +43,13 @@ shared_library("CHIPController") { output_dir = "${target_out_dir}/pychip" # TODO: Update to use GN tools to get actual paths + python_version = exec_script("python-version.py", [], "trim string") include_dirs = [ "${chip_root}/third_party/pybind11/repo/include" ] if (current_os == "mac") { include_dirs += - [ "${chip_root}/.environment/cipd/packages/python/include/python3.9" ] + [ "${chip_root}/.environment/cipd/packages/python/include/python" + python_version ] } else if (current_os == "linux") { - include_dirs += [ "/usr/include/python3.9" ] + include_dirs += [ "/usr/include/python" + python_version ] } else { assert(false, "OS not supported.") } @@ -86,7 +87,7 @@ shared_library("CHIPController") { ] } if (current_os == "linux") { - libs = [ "python3.9" ] + libs = [ "python" + python_version ] } } diff --git a/src/pybindings/pycontroller/python-version.py b/src/pybindings/pycontroller/python-version.py new file mode 100644 index 00000000000000..5ffe7aa6391be8 --- /dev/null +++ b/src/pybindings/pycontroller/python-version.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python3 + +import sys +print(f"{sys.version_info.major}.{sys.version_info.minor}") From e3c969af17330f0dbf3b42a5f0c6b44042b5f937 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Fri, 21 Jun 2024 10:24:29 +0200 Subject: [PATCH 27/46] Update images to latest one --- .clang-format | 1 - .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +++++----- .github/workflows/chef.yaml | 8 ++++---- .github/workflows/cirque.yaml | 2 +- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 ++-- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .github/workflows/examples-linux-standalone.yaml | 2 +- .github/workflows/examples-linux-tv-casting-app.yaml | 2 +- .github/workflows/examples-mbed.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-nuttx.yaml | 2 +- .github/workflows/examples-nxp.yaml | 2 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-rw61x.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 4 ++-- .github/workflows/qemu.yaml | 4 ++-- .github/workflows/release_artifacts.yaml | 4 ++-- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 ++-- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- 41 files changed, 52 insertions(+), 53 deletions(-) diff --git a/.clang-format b/.clang-format index 4fb95466896aeb..a1c292ac4afefa 100644 --- a/.clang-format +++ b/.clang-format @@ -106,7 +106,6 @@ SpacesInSquareBrackets: false Standard: Cpp11 TabWidth: 8 UseTab: Never -InsertNewlineAtEOF: true --- Language: ObjC BasedOnStyle: WebKit diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 07d41905ae29ad..0f2c46a2d75d66 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c76a2c576cdef4..692b3973bf80bf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -281,7 +281,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -342,7 +342,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -451,7 +451,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 1130e88615deec..870b71b8bab033 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 options: --user root steps: @@ -56,7 +56,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:55 + image: ghcr.io/project-chip/chip-build-esp32:60 options: --user root steps: @@ -77,7 +77,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:55 + image: ghcr.io/project-chip/chip-build-nrf-platform:60 options: --user root steps: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:55 + image: ghcr.io/project-chip/chip-build-telink:60 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index fe70b7655b2720..72d3b3554f7efc 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -42,7 +42,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: ghcr.io/project-chip/chip-build-cirque:55 + # image: ghcr.io/project-chip/chip-build-cirque:60 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 8516c1a2a10227..67213dc8622948 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:55 + image: ghcr.io/project-chip/chip-build-doxygen:60 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 3ff4baabc2d3ae..a69a09cc0c1799 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:55 + image: ghcr.io/project-chip/chip-build-ameba:60 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 6d2e7ddb290b99..3733a263a8d2ff 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:55 + image: ghcr.io/project-chip/chip-build-asr:60 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index cda0d8b4274e0c..60bbbaed6b371e 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:55 + image: ghcr.io/project-chip/chip-build-bouffalolab:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index 8c8ce164cdeb00..a7a22de5fd118d 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:55 + image: ghcr.io/project-chip/chip-build-ti:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 90684128ce30b0..13d4101017ba6e 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:55 + image: ghcr.io/project-chip/chip-build-ti:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 846057a6722928..0fcfe45d22c0cd 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:55 + image: ghcr.io/project-chip/chip-build-efr32:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index c92f3eaa9400e3..06d1efb5f529b5 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:55 + image: ghcr.io/project-chip/chip-build-esp32:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -126,7 +126,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:55 + image: ghcr.io/project-chip/chip-build-esp32:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 1ecb390c5dbece..586c501794d925 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:55 + image: ghcr.io/project-chip/chip-build-infineon:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index c97db570039e14..18ab9e12983dea 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:55 + image: ghcr.io/project-chip/chip-build-crosscompile:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 1362a6de5a7720..b382bb52a97ead 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:55 + image: ghcr.io/project-chip/chip-build-imx:60 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 45aa7d174c1bbe..5f0207d4d11910 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index b1d28276034868..352136be325bb4 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 steps: - name: Checkout diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 7b2a9f2aee20c8..861cfb63359360 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-mbed-os:55 + image: ghcr.io/project-chip/chip-build-mbed-os:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 28be41e1e4718f..528886aa22de22 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index e9a2b6714786ef..2ce5101f05334a 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:55 + image: ghcr.io/project-chip/chip-build-nrf-platform:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index d2c342d29e5655..e17f81c6990e41 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:55 + image: ghcr.io/project-chip/chip-build-nuttx:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index fe284e9787289e..dc48606a13db05 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:55 + image: ghcr.io/project-chip/chip-build-k32w:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index a34c65b9940f2a..fc311fdd5ad55f 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:55 + image: ghcr.io/project-chip/chip-build-openiotsdk:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 52a582ac3dbaba..e2d8d04aa530a5 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-rw61x.yaml b/.github/workflows/examples-rw61x.yaml index 92049d56524291..b689bdc8b33ec5 100644 --- a/.github/workflows/examples-rw61x.yaml +++ b/.github/workflows/examples-rw61x.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-rw61x:55 + image: ghcr.io/project-chip/chip-build-rw61x:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index dc0d17cc7e1aad..f136acb16305bc 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index b6dc889dc95d8d..0b9b6f5c3721c1 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:55 + image: ghcr.io/project-chip/chip-build-telink:60 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 27d676251dbf66..d1d908cb1e10d0 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:55 + image: ghcr.io/project-chip/chip-build-tizen:60 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index ea5372afe7ddaa..41e819f88f6dd8 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:55 + image: ghcr.io/project-chip/chip-build-android:60 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index af5947d4e9c7d6..c0eada49379b62 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index 7b492c72c9e6bf..59fe0e291ffb82 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:55 + image: ghcr.io/project-chip/chip-build-java:60 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5fe9414e4d2d1c..afe435a3cae19d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index bf0f1e53793cac..0f65a7e26fa3a3 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:55 + image: ghcr.io/project-chip/chip-build-minimal:60 steps: - name: Checkout @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:55 + image: ghcr.io/project-chip/chip-build-minimal:60 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index a35eeca7dc8fab..eff25b1c58f37e 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:55 + image: ghcr.io/project-chip/chip-build-esp32-qemu:60 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -78,7 +78,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:55 + image: ghcr.io/project-chip/chip-build-tizen-qemu:60 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 71f1171492446b..42a34299df6a73 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:55 + image: ghcr.io/project-chip/chip-build-esp32:60 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:55 + image: ghcr.io/project-chip/chip-build-efr32:60 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 7ad40985dd1bb4..78f1549e8ca0c8 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:55 + image: ghcr.io/project-chip/chip-build-android:60 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a66faab2e036b8..99231d5d7379c7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -441,7 +441,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 73331409cc7078..ff27813384b55a 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 8d17559e99b32c..949ea994d9a7a7 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index d8a3073d0f3283..b70ab5112b1522 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:55 + image: ghcr.io/project-chip/chip-build:60 defaults: run: shell: sh From 9d24ceddae380d8505e9cca677026029a2089724 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Fri, 21 Jun 2024 11:59:19 +0200 Subject: [PATCH 28/46] Update darwin version --- .github/workflows/build.yaml | 2 +- .github/workflows/darwin-tests.yaml | 2 +- .github/workflows/darwin.yaml | 4 ++-- .github/workflows/example-tv-casting-darwin.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/tests.yaml | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 692b3973bf80bf..b0f667f37ee85e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -371,7 +371,7 @@ jobs: build_darwin: name: Build on Darwin (clang, python_lib, simulated) - runs-on: macos-13 + runs-on: macos-14 if: github.actor != 'restyled-io[bot]' steps: diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index a916250572bb6e..f929451f614fc1 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -51,7 +51,7 @@ jobs: LSAN_OPTIONS: detect_leaks=1 malloc_context_size=40 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt if: github.actor != 'restyled-io[bot]' - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index ba9c0f1d9f02c3..002f317b276aac 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -36,7 +36,7 @@ jobs: framework: name: Build framework if: github.actor != 'restyled-io[bot]' - runs-on: macos-13 + runs-on: macos-14 strategy: matrix: options: # We don't need a full matrix @@ -73,7 +73,7 @@ jobs: name: Run framework tests if: github.actor != 'restyled-io[bot]' needs: [framework] # serialize to avoid running to many parallel macos runners - runs-on: macos-13 + runs-on: macos-14 strategy: matrix: options: # We don't need a full matrix diff --git a/.github/workflows/example-tv-casting-darwin.yaml b/.github/workflows/example-tv-casting-darwin.yaml index d9d9ef8f37cee9..d8b7b7895e250e 100644 --- a/.github/workflows/example-tv-casting-darwin.yaml +++ b/.github/workflows/example-tv-casting-darwin.yaml @@ -36,7 +36,7 @@ jobs: tv-casting-bridge: name: Build TV Casting Bridge example if: github.actor != 'restyled-io[bot]' - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index c0eada49379b62..04ec100b09cdb9 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -68,7 +68,7 @@ jobs: build_darwin_fuzzing: name: Build on Darwin - runs-on: macos-13 + runs-on: macos-14 if: github.actor != 'restyled-io[bot]' steps: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index bce58ef00e3310..9a3ed3cad8b7cc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -332,7 +332,7 @@ jobs: LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt if: github.actor != 'restyled-io[bot]' - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout @@ -604,7 +604,7 @@ jobs: TSAN_OPTIONS: "halt_on_error=1" if: github.actor != 'restyled-io[bot]' && false - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout From 2831fb4a9de238a62acc826a7dc5ecc02489c8e2 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Sun, 23 Jun 2024 17:48:32 +0200 Subject: [PATCH 29/46] Update python version for macos --- scripts/setup/python.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup/python.json b/scripts/setup/python.json index 0df6cc494ab40a..4780e23b1ffe17 100644 --- a/scripts/setup/python.json +++ b/scripts/setup/python.json @@ -3,7 +3,7 @@ { "path": "infra/3pp/tools/cpython3/${platform}", "platforms": ["mac-amd64", "windows-amd64"], - "tags": ["version:2@3.9.5.chromium.19"] + "tags": ["version:2@3.11.9.chromium.35"] } ] } From 3cbca9729f856cf4807e84ce2c8f64666ee6229d Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 08:13:06 +0200 Subject: [PATCH 30/46] Hardcode darwin python version --- src/pybindings/pycontroller/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybindings/pycontroller/BUILD.gn b/src/pybindings/pycontroller/BUILD.gn index 571051fd8a8f03..e1da21f41827ca 100644 --- a/src/pybindings/pycontroller/BUILD.gn +++ b/src/pybindings/pycontroller/BUILD.gn @@ -47,7 +47,7 @@ shared_library("CHIPController") { include_dirs = [ "${chip_root}/third_party/pybind11/repo/include" ] if (current_os == "mac") { include_dirs += - [ "${chip_root}/.environment/cipd/packages/python/include/python" + python_version ] + [ "${chip_root}/.environment/cipd/packages/python/include/python3.11"] } else if (current_os == "linux") { include_dirs += [ "/usr/include/python" + python_version ] } else { From d0c654df3464c75c504608ff1b3b76c61a4cc40f Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 08:16:12 +0200 Subject: [PATCH 31/46] Change darwin architecture --- .github/workflows/build.yaml | 7 ---- .github/workflows/darwin-tests.yaml | 44 ++++++++++++------------ .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/tests.yaml | 50 ++++++++++++++-------------- 4 files changed, 48 insertions(+), 55 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b0f667f37ee85e..2d4f555c8ab6ff 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -404,13 +404,6 @@ jobs: run: | for BUILD_TYPE in default python_lib; do case $BUILD_TYPE in - # We want to build various standalone example apps - # (similar to what examples-linux-standalone.yaml - # does), so use target_os="all" to get those picked - # up as part of the "unified" build. But then to - # save CI resources we want to exclude the - # "host clang" build, which uses the pigweed - # clang. "default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';; "python_lib") GN_ARGS='enable_rtti=true enable_pylib=true';; esac diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index f929451f614fc1..b6ca5908a9ee0b 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -85,16 +85,16 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL} \ - --target darwin-x64-all-clusters-${BUILD_VARIANT} \ - --target darwin-x64-lock-${BUILD_VARIANT} \ - --target darwin-x64-ota-provider-${BUILD_VARIANT} \ - --target darwin-x64-ota-requestor-${BUILD_VARIANT} \ - --target darwin-x64-tv-app-${BUILD_VARIANT} \ - --target darwin-x64-bridge-${BUILD_VARIANT} \ - --target darwin-x64-lit-icd-${BUILD_VARIANT} \ - --target darwin-x64-microwave-oven-${BUILD_VARIANT} \ - --target darwin-x64-rvc-${BUILD_VARIANT} \ + --target darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL} \ + --target darwin-arm64-all-clusters-${BUILD_VARIANT} \ + --target darwin-arm64-lock-${BUILD_VARIANT} \ + --target darwin-arm64-ota-provider-${BUILD_VARIANT} \ + --target darwin-arm64-ota-requestor-${BUILD_VARIANT} \ + --target darwin-arm64-tv-app-${BUILD_VARIANT} \ + --target darwin-arm64-bridge-${BUILD_VARIANT} \ + --target darwin-arm64-lit-icd-${BUILD_VARIANT} \ + --target darwin-arm64-microwave-oven-${BUILD_VARIANT} \ + --target darwin-arm64-rvc-${BUILD_VARIANT} \ build \ --copy-artifacts-to objdir-clone \ " @@ -103,27 +103,27 @@ jobs: ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ --runner darwin_framework_tool_python \ - --chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ + --chip-tool ./out/darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ --target-skip-glob '{TestAccessControlConstraints}' \ run \ --iterations 1 \ --test-timeout-seconds 120 \ - --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ - --microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ - --rvc-app ./out/darwin-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ + --all-clusters-app ./out/darwin-arm64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/darwin-arm64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/darwin-arm64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/darwin-arm64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/darwin-arm64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + --bridge-app ./out/darwin-arm64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --microwave-oven-app ./out/darwin-arm64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ + --rvc-app ./out/darwin-arm64-rvc-${BUILD_VARIANT}/chip-rvc-app \ " - name: Run OTA Test run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_darwin_framework_ota_test.py \ run \ - --darwin-framework-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ - --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --darwin-framework-tool ./out/darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ + --ota-requestor-app ./out/darwin-arm64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ --ota-data-file /tmp/rawImage \ --ota-image-file /tmp/otaImage \ --ota-destination-file /tmp/downloadedImage \ @@ -148,7 +148,7 @@ jobs: if: ${{ failure() && !env.ACT }} with: name: framework-build-log-darwin-${BUILD_VARIANT_FRAMEWORK_TOOL} - path: out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin_framework_build.log + path: out/darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin_framework_build.log - name: Uploading objdir for debugging uses: actions/upload-artifact@v4 if: ${{ failure() && !env.ACT }} diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 04ec100b09cdb9..f9741592134b80 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -87,7 +87,7 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-x64-all-clusters-no-ble-asan-libfuzzer-clang \ + --target darwin-arm64-all-clusters-no-ble-asan-libfuzzer-clang \ build \ --copy-artifacts-to objdir-clone \ " diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9a3ed3cad8b7cc..1d38bab22cd032 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -353,21 +353,20 @@ jobs: platform: darwin bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - - name: Build Apps run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ - --target darwin-x64-all-clusters-${BUILD_VARIANT} \ - --target darwin-x64-lock-${BUILD_VARIANT} \ - --target darwin-x64-ota-provider-${BUILD_VARIANT} \ - --target darwin-x64-ota-requestor-${BUILD_VARIANT} \ - --target darwin-x64-tv-app-${BUILD_VARIANT} \ - --target darwin-x64-bridge-${BUILD_VARIANT} \ - --target darwin-x64-lit-icd-${BUILD_VARIANT} \ - --target darwin-x64-microwave-oven-${BUILD_VARIANT} \ - --target darwin-x64-rvc-${BUILD_VARIANT} \ + --target darwin-arm64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ + --target darwin-arm64-all-clusters-${BUILD_VARIANT} \ + --target darwin-arm64-lock-${BUILD_VARIANT} \ + --target darwin-arm64-ota-provider-${BUILD_VARIANT} \ + --target darwin-arm64-ota-requestor-${BUILD_VARIANT} \ + --target darwin-arm64-tv-app-${BUILD_VARIANT} \ + --target darwin-arm64-bridge-${BUILD_VARIANT} \ + --target darwin-arm64-lit-icd-${BUILD_VARIANT} \ + --target darwin-arm64-microwave-oven-${BUILD_VARIANT} \ + --target darwin-arm64-rvc-${BUILD_VARIANT} \ build \ --copy-artifacts-to objdir-clone \ " @@ -377,20 +376,20 @@ jobs: ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ --runner chip_tool_python \ - --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ + --chip-tool ./out/darwin-arm64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ --target-skip-glob '{Test_TC_DGTHREAD_2_1,Test_TC_DGTHREAD_2_2,Test_TC_DGTHREAD_2_3,Test_TC_DGTHREAD_2_4}' \ run \ --iterations 1 \ --test-timeout-seconds 120 \ - --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ - --lit-icd-app ./out/darwin-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ - --microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ - --rvc-app ./out/darwin-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ + --all-clusters-app ./out/darwin-arm64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/darwin-arm64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/darwin-arm64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/darwin-arm64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/darwin-arm64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + --bridge-app ./out/darwin-arm64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/darwin-arm64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ + --microwave-oven-app ./out/darwin-arm64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ + --rvc-app ./out/darwin-arm64-rvc-${BUILD_VARIANT}/chip-rvc-app \ " - name: Run purposeful failure tests using the python parser sending commands to chip-tool @@ -399,13 +398,13 @@ jobs: "./scripts/tests/run_test_suite.py \ --runner chip_tool_python \ --include-tags PURPOSEFUL_FAILURE \ - --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ + --chip-tool ./out/darwin-arm64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ run \ --iterations 1 \ --expected-failures 3 \ --keep-going \ --test-timeout-seconds 120 \ - --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --all-clusters-app ./out/darwin-arm64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ " - name: Uploading core files @@ -630,13 +629,13 @@ jobs: scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-x64-all-clusters-${BUILD_VARIANT}-test \ + --target darwin-arm64-all-clusters-${BUILD_VARIANT}-test \ build \ --copy-artifacts-to objdir-clone \ " - name: Run Tests run: | - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/darwin-arm64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - name: Uploading core files uses: actions/upload-artifact@v4 if: ${{ failure() && !env.ACT }} @@ -666,3 +665,4 @@ jobs: path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5 + \ No newline at end of file From 164641245de2309938e807b13e0cae83920a789a Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 09:48:21 +0200 Subject: [PATCH 32/46] Update bitarray --- scripts/setup/constraints.txt | 14 +++++++------- scripts/setup/requirements.bouffalolab.txt | 2 +- scripts/setup/requirements.esp32.txt | 2 +- scripts/setup/requirements.nrfconnect.txt | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 653fb02a212795..2b3ddb5016154a 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -16,7 +16,7 @@ attrs==23.2.0 # via # jsonschema # referencing -bitarray==2.6.0 +bitarray==2.9.2 # via -r requirements.esp32.txt bitstring==3.1.9 # via @@ -92,9 +92,9 @@ exceptiongroup==1.2.1 # via ipython executing==2.0.1 # via stack-data -fastcore==1.5.46 +fastcore==1.5.48 # via ghapi -filelock==3.15.1 +filelock==3.15.4 # via # cachecontrol # virtualenv @@ -177,7 +177,7 @@ protobuf==4.24.4 # via # -r requirements.all.txt # mypy-protobuf -psutil==5.9.8 +psutil==6.0.0 # via portpicker ptyprocess==0.7.0 # via pexpect @@ -295,7 +295,7 @@ urllib3==1.26.19 # via # idf-component-manager # requests -virtualenv==20.26.2 +virtualenv==20.26.3 # via -r requirements.all.txt watchdog==4.0.1 # via -r requirements.all.txt @@ -311,11 +311,11 @@ wheel==0.43.0 ; sys_platform == "linux" # pip-tools # The following packages are considered to be unsafe in a requirements file: -pip==24.0 +pip==24.1 # via # ghapi # pip-tools -setuptools==70.0.0 +setuptools==70.1.0 # via # pip-tools # west diff --git a/scripts/setup/requirements.bouffalolab.txt b/scripts/setup/requirements.bouffalolab.txt index a66a47943e913a..ad644380ceb114 100644 --- a/scripts/setup/requirements.bouffalolab.txt +++ b/scripts/setup/requirements.bouffalolab.txt @@ -3,5 +3,5 @@ jsonschema>=4.4.0 cbor2>=5.4.3 ecdsa>=0.18.0 qrcode==7.4.2 -bitarray==2.6.0 +bitarray>=2.8.1 python_stdnum==1.18 diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index b2584bbac08803..80d412e73ce1d0 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -6,7 +6,7 @@ pyparsing>=3.0.3,<3.1 idf-component-manager pygdbmi<=0.9.0.2 reedsolo>=1.5.3,<=1.5.4 -bitarray==2.6.0 +bitarray>=2.8.1 bitstring>=3.1.6,<4 ecdsa>=0.16.0 construct>=2.10.70 diff --git a/scripts/setup/requirements.nrfconnect.txt b/scripts/setup/requirements.nrfconnect.txt index c0c3c285441136..3574a22ac23a73 100644 --- a/scripts/setup/requirements.nrfconnect.txt +++ b/scripts/setup/requirements.nrfconnect.txt @@ -2,5 +2,5 @@ jsonschema>=4.4.0 cbor2>=5.4.3 ecdsa>=0.18.0 qrcode==7.4.2 -bitarray==2.6.0 +bitarray>=2.8.1 python_stdnum==1.18 From c000b55ed86d5b5df3bf1e7588acb96f47319eed Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 11:03:11 +0200 Subject: [PATCH 33/46] Revert mac to old version but update python only --- .github/workflows/build.yaml | 3 +- .github/workflows/darwin-tests.yaml | 47 ++++++++-------- .github/workflows/darwin.yaml | 6 ++- .../workflows/example-tv-casting-darwin.yaml | 3 +- .github/workflows/fuzzing-build.yaml | 5 +- .github/workflows/tests.yaml | 54 ++++++++++--------- src/pybindings/pycontroller/BUILD.gn | 4 +- 7 files changed, 65 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9ec5bad18e87c6..a51e4739187841 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -371,7 +371,8 @@ jobs: build_darwin: name: Build on Darwin (clang, python_lib, simulated) - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' if: github.actor != 'restyled-io[bot]' steps: diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index b6ca5908a9ee0b..dce1a33527128d 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -51,7 +51,8 @@ jobs: LSAN_OPTIONS: detect_leaks=1 malloc_context_size=40 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt if: github.actor != 'restyled-io[bot]' - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout @@ -85,16 +86,16 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL} \ - --target darwin-arm64-all-clusters-${BUILD_VARIANT} \ - --target darwin-arm64-lock-${BUILD_VARIANT} \ - --target darwin-arm64-ota-provider-${BUILD_VARIANT} \ - --target darwin-arm64-ota-requestor-${BUILD_VARIANT} \ - --target darwin-arm64-tv-app-${BUILD_VARIANT} \ - --target darwin-arm64-bridge-${BUILD_VARIANT} \ - --target darwin-arm64-lit-icd-${BUILD_VARIANT} \ - --target darwin-arm64-microwave-oven-${BUILD_VARIANT} \ - --target darwin-arm64-rvc-${BUILD_VARIANT} \ + --target darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL} \ + --target darwin-x64-all-clusters-${BUILD_VARIANT} \ + --target darwin-x64-lock-${BUILD_VARIANT} \ + --target darwin-x64-ota-provider-${BUILD_VARIANT} \ + --target darwin-x64-ota-requestor-${BUILD_VARIANT} \ + --target darwin-x64-tv-app-${BUILD_VARIANT} \ + --target darwin-x64-bridge-${BUILD_VARIANT} \ + --target darwin-x64-lit-icd-${BUILD_VARIANT} \ + --target darwin-x64-microwave-oven-${BUILD_VARIANT} \ + --target darwin-x64-rvc-${BUILD_VARIANT} \ build \ --copy-artifacts-to objdir-clone \ " @@ -103,27 +104,27 @@ jobs: ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ --runner darwin_framework_tool_python \ - --chip-tool ./out/darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ + --chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ --target-skip-glob '{TestAccessControlConstraints}' \ run \ --iterations 1 \ --test-timeout-seconds 120 \ - --all-clusters-app ./out/darwin-arm64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/darwin-arm64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/darwin-arm64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/darwin-arm64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/darwin-arm64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/darwin-arm64-bridge-${BUILD_VARIANT}/chip-bridge-app \ - --microwave-oven-app ./out/darwin-arm64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ - --rvc-app ./out/darwin-arm64-rvc-${BUILD_VARIANT}/chip-rvc-app \ + --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ + --rvc-app ./out/darwin-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ " - name: Run OTA Test run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_darwin_framework_ota_test.py \ run \ - --darwin-framework-tool ./out/darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ - --ota-requestor-app ./out/darwin-arm64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --darwin-framework-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin-framework-tool \ + --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ --ota-data-file /tmp/rawImage \ --ota-image-file /tmp/otaImage \ --ota-destination-file /tmp/downloadedImage \ @@ -148,7 +149,7 @@ jobs: if: ${{ failure() && !env.ACT }} with: name: framework-build-log-darwin-${BUILD_VARIANT_FRAMEWORK_TOOL} - path: out/darwin-arm64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin_framework_build.log + path: out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin_framework_build.log - name: Uploading objdir for debugging uses: actions/upload-artifact@v4 if: ${{ failure() && !env.ACT }} diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 002f317b276aac..cc402b5920633d 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -36,7 +36,8 @@ jobs: framework: name: Build framework if: github.actor != 'restyled-io[bot]' - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' strategy: matrix: options: # We don't need a full matrix @@ -73,7 +74,8 @@ jobs: name: Run framework tests if: github.actor != 'restyled-io[bot]' needs: [framework] # serialize to avoid running to many parallel macos runners - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' strategy: matrix: options: # We don't need a full matrix diff --git a/.github/workflows/example-tv-casting-darwin.yaml b/.github/workflows/example-tv-casting-darwin.yaml index d8b7b7895e250e..748340c872d624 100644 --- a/.github/workflows/example-tv-casting-darwin.yaml +++ b/.github/workflows/example-tv-casting-darwin.yaml @@ -36,7 +36,8 @@ jobs: tv-casting-bridge: name: Build TV Casting Bridge example if: github.actor != 'restyled-io[bot]' - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index f9741592134b80..c761eee78f30ba 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -68,7 +68,8 @@ jobs: build_darwin_fuzzing: name: Build on Darwin - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' if: github.actor != 'restyled-io[bot]' steps: @@ -87,7 +88,7 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-arm64-all-clusters-no-ble-asan-libfuzzer-clang \ + --target darwin-x64-all-clusters-no-ble-asan-libfuzzer-clang \ build \ --copy-artifacts-to objdir-clone \ " diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ff7926b1043789..f3f28030498661 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -332,7 +332,8 @@ jobs: LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt if: github.actor != 'restyled-io[bot]' - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout @@ -357,16 +358,16 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-arm64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ - --target darwin-arm64-all-clusters-${BUILD_VARIANT} \ - --target darwin-arm64-lock-${BUILD_VARIANT} \ - --target darwin-arm64-ota-provider-${BUILD_VARIANT} \ - --target darwin-arm64-ota-requestor-${BUILD_VARIANT} \ - --target darwin-arm64-tv-app-${BUILD_VARIANT} \ - --target darwin-arm64-bridge-${BUILD_VARIANT} \ - --target darwin-arm64-lit-icd-${BUILD_VARIANT} \ - --target darwin-arm64-microwave-oven-${BUILD_VARIANT} \ - --target darwin-arm64-rvc-${BUILD_VARIANT} \ + --target darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ + --target darwin-x64-all-clusters-${BUILD_VARIANT} \ + --target darwin-x64-lock-${BUILD_VARIANT} \ + --target darwin-x64-ota-provider-${BUILD_VARIANT} \ + --target darwin-x64-ota-requestor-${BUILD_VARIANT} \ + --target darwin-x64-tv-app-${BUILD_VARIANT} \ + --target darwin-x64-bridge-${BUILD_VARIANT} \ + --target darwin-x64-lit-icd-${BUILD_VARIANT} \ + --target darwin-x64-microwave-oven-${BUILD_VARIANT} \ + --target darwin-x64-rvc-${BUILD_VARIANT} \ build \ --copy-artifacts-to objdir-clone \ " @@ -376,20 +377,20 @@ jobs: ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ --runner chip_tool_python \ - --chip-tool ./out/darwin-arm64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ + --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ --target-skip-glob '{Test_TC_DGTHREAD_2_1,Test_TC_DGTHREAD_2_2,Test_TC_DGTHREAD_2_3,Test_TC_DGTHREAD_2_4}' \ run \ --iterations 1 \ --test-timeout-seconds 120 \ - --all-clusters-app ./out/darwin-arm64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/darwin-arm64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/darwin-arm64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/darwin-arm64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/darwin-arm64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/darwin-arm64-bridge-${BUILD_VARIANT}/chip-bridge-app \ - --lit-icd-app ./out/darwin-arm64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ - --microwave-oven-app ./out/darwin-arm64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ - --rvc-app ./out/darwin-arm64-rvc-${BUILD_VARIANT}/chip-rvc-app \ + --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/darwin-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ + --microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ + --rvc-app ./out/darwin-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ " - name: Run purposeful failure tests using the python parser sending commands to chip-tool @@ -398,13 +399,13 @@ jobs: "./scripts/tests/run_test_suite.py \ --runner chip_tool_python \ --include-tags PURPOSEFUL_FAILURE \ - --chip-tool ./out/darwin-arm64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ + --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ run \ --iterations 1 \ --expected-failures 3 \ --keep-going \ --test-timeout-seconds 120 \ - --all-clusters-app ./out/darwin-arm64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ " - name: Uploading core files @@ -603,7 +604,8 @@ jobs: TSAN_OPTIONS: "halt_on_error=1" if: github.actor != 'restyled-io[bot]' && false - runs-on: macos-14 + runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout @@ -629,13 +631,13 @@ jobs: scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target darwin-arm64-all-clusters-${BUILD_VARIANT}-test \ + --target darwin-x64-all-clusters-${BUILD_VARIANT}-test \ build \ --copy-artifacts-to objdir-clone \ " - name: Run Tests run: | - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/darwin-arm64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - name: Uploading core files uses: actions/upload-artifact@v4 if: ${{ failure() && !env.ACT }} diff --git a/src/pybindings/pycontroller/BUILD.gn b/src/pybindings/pycontroller/BUILD.gn index e1da21f41827ca..76629a4656242a 100644 --- a/src/pybindings/pycontroller/BUILD.gn +++ b/src/pybindings/pycontroller/BUILD.gn @@ -43,11 +43,11 @@ shared_library("CHIPController") { output_dir = "${target_out_dir}/pychip" # TODO: Update to use GN tools to get actual paths - python_version = exec_script("python-version.py", [], "trim string") include_dirs = [ "${chip_root}/third_party/pybind11/repo/include" ] + python_version = exec_script("python-version.py", [], "trim string") if (current_os == "mac") { include_dirs += - [ "${chip_root}/.environment/cipd/packages/python/include/python3.11"] + [ "${chip_root}/.environment/cipd/packages/python/include/python" + python_version ] } else if (current_os == "linux") { include_dirs += [ "/usr/include/python" + python_version ] } else { From 88f8d6efbc546346a65d1891adf43a15c0e97e94 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 14:49:57 +0200 Subject: [PATCH 34/46] Update python version on macos --- config/python/python_config.gni | 17 +++++++++++++ config/python/python_config.py | 37 ++++++++++++++++++++++++++++ scripts/setup/python.json | 2 +- src/pybindings/pycontroller/BUILD.gn | 10 +++++--- 4 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 config/python/python_config.gni create mode 100755 config/python/python_config.py diff --git a/config/python/python_config.gni b/config/python/python_config.gni new file mode 100644 index 00000000000000..9c5f04e966ae68 --- /dev/null +++ b/config/python/python_config.gni @@ -0,0 +1,17 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +python_config_script = get_path_info("python_config.py", "abspath") + +python_config = exec_script(python_config_script, [], "json") diff --git a/config/python/python_config.py b/config/python/python_config.py new file mode 100755 index 00000000000000..f919c32875cd9a --- /dev/null +++ b/config/python/python_config.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +import os +import json +import subprocess +import shutil + + +class Config: + def __init__(self): + cipd_install_dir = os.getenv("PW_PYTHON_CIPD_INSTALL_DIR") + self.python_exe = os.path.join(cipd_install_dir, "bin", "python3") + if not os.path.exists(self.python_exe): + self.python_exe = shutil.which("python3") + if not self.python_exe: + raise FileNotFoundError("Python3 not found") + + def get_version(self): + out = subprocess.check_output( + [self.python_exe, "-c", "import sys; print(sys.version_info.major, sys.version_info.minor)"], text=True + ) + return out.strip().split(" ") + + +if __name__ == "__main__": + config = Config() + version = config.get_version() + print( + json.dumps( + { + "version": { + "major": version[0], + "minor": version[1], + } + } + ) + ) diff --git a/scripts/setup/python.json b/scripts/setup/python.json index 0df6cc494ab40a..4780e23b1ffe17 100644 --- a/scripts/setup/python.json +++ b/scripts/setup/python.json @@ -3,7 +3,7 @@ { "path": "infra/3pp/tools/cpython3/${platform}", "platforms": ["mac-amd64", "windows-amd64"], - "tags": ["version:2@3.9.5.chromium.19"] + "tags": ["version:2@3.11.9.chromium.35"] } ] } diff --git a/src/pybindings/pycontroller/BUILD.gn b/src/pybindings/pycontroller/BUILD.gn index 032d3bc5a94810..2ad30a1560cc86 100644 --- a/src/pybindings/pycontroller/BUILD.gn +++ b/src/pybindings/pycontroller/BUILD.gn @@ -17,6 +17,7 @@ import("//build_overrides/pigweed.gni") import("$dir_pw_build/python.gni") +import("${chip_root}/config/python/python_config.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/src/platform/device.gni") import("${dir_pw_unit_test}/test.gni") @@ -44,11 +45,14 @@ shared_library("CHIPController") { # TODO: Update to use GN tools to get actual paths include_dirs = [ "${chip_root}/third_party/pybind11/repo/include" ] + version = python_config.version if (current_os == "mac") { include_dirs += - [ "${chip_root}/.environment/cipd/packages/python/include/python3.9" ] + [ "${chip_root}/.environment/cipd/packages/python/include/python" + + version.major + "." + version.minor ] } else if (current_os == "linux") { - include_dirs += [ "/usr/include/python3.9" ] + include_dirs += + [ "/usr/include/python" + version.major + "." + version.minor ] } else { assert(false, "OS not supported.") } @@ -86,7 +90,7 @@ shared_library("CHIPController") { ] } if (current_os == "linux") { - libs = [ "python3.9" ] + libs = [ "python" + version.major + "." + version.minor ] } } From 1cedc8f4d66d44d1b35d2fa197d012094c6c66e8 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 14:49:57 +0200 Subject: [PATCH 35/46] Update python version on macos --- config/python/python_config.gni | 17 +++++++++++++ config/python/python_config.py | 37 ++++++++++++++++++++++++++++ scripts/setup/python.json | 2 +- src/pybindings/pycontroller/BUILD.gn | 10 +++++--- 4 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 config/python/python_config.gni create mode 100755 config/python/python_config.py diff --git a/config/python/python_config.gni b/config/python/python_config.gni new file mode 100644 index 00000000000000..9c5f04e966ae68 --- /dev/null +++ b/config/python/python_config.gni @@ -0,0 +1,17 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +python_config_script = get_path_info("python_config.py", "abspath") + +python_config = exec_script(python_config_script, [], "json") diff --git a/config/python/python_config.py b/config/python/python_config.py new file mode 100755 index 00000000000000..f919c32875cd9a --- /dev/null +++ b/config/python/python_config.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +import os +import json +import subprocess +import shutil + + +class Config: + def __init__(self): + cipd_install_dir = os.getenv("PW_PYTHON_CIPD_INSTALL_DIR") + self.python_exe = os.path.join(cipd_install_dir, "bin", "python3") + if not os.path.exists(self.python_exe): + self.python_exe = shutil.which("python3") + if not self.python_exe: + raise FileNotFoundError("Python3 not found") + + def get_version(self): + out = subprocess.check_output( + [self.python_exe, "-c", "import sys; print(sys.version_info.major, sys.version_info.minor)"], text=True + ) + return out.strip().split(" ") + + +if __name__ == "__main__": + config = Config() + version = config.get_version() + print( + json.dumps( + { + "version": { + "major": version[0], + "minor": version[1], + } + } + ) + ) diff --git a/scripts/setup/python.json b/scripts/setup/python.json index 0df6cc494ab40a..4780e23b1ffe17 100644 --- a/scripts/setup/python.json +++ b/scripts/setup/python.json @@ -3,7 +3,7 @@ { "path": "infra/3pp/tools/cpython3/${platform}", "platforms": ["mac-amd64", "windows-amd64"], - "tags": ["version:2@3.9.5.chromium.19"] + "tags": ["version:2@3.11.9.chromium.35"] } ] } diff --git a/src/pybindings/pycontroller/BUILD.gn b/src/pybindings/pycontroller/BUILD.gn index 032d3bc5a94810..2ad30a1560cc86 100644 --- a/src/pybindings/pycontroller/BUILD.gn +++ b/src/pybindings/pycontroller/BUILD.gn @@ -17,6 +17,7 @@ import("//build_overrides/pigweed.gni") import("$dir_pw_build/python.gni") +import("${chip_root}/config/python/python_config.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/src/platform/device.gni") import("${dir_pw_unit_test}/test.gni") @@ -44,11 +45,14 @@ shared_library("CHIPController") { # TODO: Update to use GN tools to get actual paths include_dirs = [ "${chip_root}/third_party/pybind11/repo/include" ] + version = python_config.version if (current_os == "mac") { include_dirs += - [ "${chip_root}/.environment/cipd/packages/python/include/python3.9" ] + [ "${chip_root}/.environment/cipd/packages/python/include/python" + + version.major + "." + version.minor ] } else if (current_os == "linux") { - include_dirs += [ "/usr/include/python3.9" ] + include_dirs += + [ "/usr/include/python" + version.major + "." + version.minor ] } else { assert(false, "OS not supported.") } @@ -86,7 +90,7 @@ shared_library("CHIPController") { ] } if (current_os == "linux") { - libs = [ "python3.9" ] + libs = [ "python" + version.major + "." + version.minor ] } } From d21008200b5695c803ee7b8f8a51b59527dab6bc Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 15:23:59 +0200 Subject: [PATCH 36/46] Update system python --- .github/workflows/build.yaml | 1 + .github/workflows/darwin-tests.yaml | 1 + .github/workflows/darwin.yaml | 2 ++ .github/workflows/example-tv-casting-darwin.yaml | 1 + .github/workflows/fuzzing-build.yaml | 1 + .github/workflows/tests.yaml | 2 ++ 6 files changed, 8 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c1073d90678ed2..5d3e9351852c55 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -372,6 +372,7 @@ jobs: build_darwin: name: Build on Darwin (clang, python_lib, simulated) runs-on: macos-13 + python-version: '3.11' if: github.actor != 'restyled-io[bot]' steps: diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index a916250572bb6e..dce1a33527128d 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -52,6 +52,7 @@ jobs: if: github.actor != 'restyled-io[bot]' runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index ba9c0f1d9f02c3..cc402b5920633d 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -37,6 +37,7 @@ jobs: name: Build framework if: github.actor != 'restyled-io[bot]' runs-on: macos-13 + python-version: '3.11' strategy: matrix: options: # We don't need a full matrix @@ -74,6 +75,7 @@ jobs: if: github.actor != 'restyled-io[bot]' needs: [framework] # serialize to avoid running to many parallel macos runners runs-on: macos-13 + python-version: '3.11' strategy: matrix: options: # We don't need a full matrix diff --git a/.github/workflows/example-tv-casting-darwin.yaml b/.github/workflows/example-tv-casting-darwin.yaml index d9d9ef8f37cee9..748340c872d624 100644 --- a/.github/workflows/example-tv-casting-darwin.yaml +++ b/.github/workflows/example-tv-casting-darwin.yaml @@ -37,6 +37,7 @@ jobs: name: Build TV Casting Bridge example if: github.actor != 'restyled-io[bot]' runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 30b697c5f1f6ce..59de8593aeb8ef 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -69,6 +69,7 @@ jobs: build_darwin_fuzzing: name: Build on Darwin runs-on: macos-13 + python-version: '3.11' if: github.actor != 'restyled-io[bot]' steps: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ad54b57a515568..8463fbbf574e3e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -333,6 +333,7 @@ jobs: if: github.actor != 'restyled-io[bot]' runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout @@ -605,6 +606,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && false runs-on: macos-13 + python-version: '3.11' steps: - name: Checkout From d37d4a677f01a66a7f9d5177c41c05134c385b69 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 15:34:28 +0200 Subject: [PATCH 37/46] Update license --- config/python/python_config.gni | 2 +- config/python/python_config.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config/python/python_config.gni b/config/python/python_config.gni index 9c5f04e966ae68..2f6e12b0e30ee9 100644 --- a/config/python/python_config.gni +++ b/config/python/python_config.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Project CHIP Authors +# Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/config/python/python_config.py b/config/python/python_config.py index f919c32875cd9a..ab032e92f4b96e 100755 --- a/config/python/python_config.py +++ b/config/python/python_config.py @@ -1,5 +1,19 @@ #!/usr/bin/env python3 +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os import json import subprocess From 0eacd5b3f81f9af592b1fab74ef2cc93dac04053 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 24 Jun 2024 15:40:36 +0200 Subject: [PATCH 38/46] restyle --- config/python/python_config.py | 4 ++-- src/pybindings/pycontroller/BUILD.gn | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/python/python_config.py b/config/python/python_config.py index ab032e92f4b96e..95bc96e2766173 100755 --- a/config/python/python_config.py +++ b/config/python/python_config.py @@ -14,10 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os import json -import subprocess +import os import shutil +import subprocess class Config: diff --git a/src/pybindings/pycontroller/BUILD.gn b/src/pybindings/pycontroller/BUILD.gn index 2ad30a1560cc86..fdde77497e79af 100644 --- a/src/pybindings/pycontroller/BUILD.gn +++ b/src/pybindings/pycontroller/BUILD.gn @@ -17,8 +17,8 @@ import("//build_overrides/pigweed.gni") import("$dir_pw_build/python.gni") -import("${chip_root}/config/python/python_config.gni") import("${chip_root}/build/chip/tools.gni") +import("${chip_root}/config/python/python_config.gni") import("${chip_root}/src/platform/device.gni") import("${dir_pw_unit_test}/test.gni") From dbab8f09517ea8fa907fdb114246f8664d45af4c Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 5 Aug 2024 18:27:59 +0200 Subject: [PATCH 39/46] Restore changes --- .github/workflows/lint.yml | 1 - .vscode/settings.json | 3 +-- src/pybindings/pycontroller/python-version.py | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 src/pybindings/pycontroller/python-version.py diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d48cb14c0afc6..6694decc421372 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -98,7 +98,6 @@ jobs: --known-failure controller/ExamplePersistentStorage.cpp \ --known-failure controller/ExamplePersistentStorage.h \ --known-failure app/AttributeAccessToken.h \ - --known-failure app/CommandHandlerInterface.h \ --known-failure app/CommandResponseSender.h \ --known-failure app/CommandSenderLegacyCallback.h \ --known-failure app/ReadHandler.h \ diff --git a/.vscode/settings.json b/.vscode/settings.json index 44207562e061fd..33bdd5e9f63d6f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -194,6 +194,5 @@ "[python]": { "editor.defaultFormatter": "ms-python.autopep8" }, - "autopep8.args": ["--max-line-length", "132"], - "git.detectSubmodules": false, + "autopep8.args": ["--max-line-length", "132"] } diff --git a/src/pybindings/pycontroller/python-version.py b/src/pybindings/pycontroller/python-version.py deleted file mode 100644 index 5ffe7aa6391be8..00000000000000 --- a/src/pybindings/pycontroller/python-version.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python3 - -import sys -print(f"{sys.version_info.major}.{sys.version_info.minor}") From 3fb707be1913d82a81459145aff4f3640cde243e Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 5 Aug 2024 19:17:48 +0200 Subject: [PATCH 40/46] Restore original requirements --- scripts/setup/constraints.txt | 200 +++++++++------------ scripts/setup/python.json | 2 +- scripts/setup/requirements.bouffalolab.txt | 2 +- scripts/setup/requirements.esp32.txt | 2 +- scripts/setup/requirements.telink.txt | 2 +- scripts/tools/telink/requirements.txt | 10 +- 6 files changed, 95 insertions(+), 123 deletions(-) diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 6027994f40b63c..a5af1b462fb335 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -1,23 +1,21 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile --allow-unsafe --output-file=constraints.txt --strip-extras requirements.all.txt # -anytree==2.12.1 +anytree==2.8.0 # via -r requirements.memory.txt appdirs==1.4.4 # via -r requirements.all.txt -appnope==0.1.4 +appnope==0.1.3 # via -r requirements.all.txt -asttokens==2.4.1 +asttokens==2.2.1 # via stack-data -attrs==23.2.0 - # via - # jsonschema - # referencing -bitarray==2.9.2 - # via -r requirements.esp32.txt +attrs==22.2.0 + # via jsonschema +backcall==0.2.0 + # via ipython bitstring==3.1.9 # via # -r requirements.esp32.txt @@ -26,21 +24,19 @@ build==0.8.0 # via # -r requirements.all.txt # pip-tools -cachecontrol==0.14.0 - # via - # cachecontrol - # idf-component-manager +cachecontrol==0.12.11 + # via idf-component-manager cbor==1.0.0 # via -r requirements.zephyr.txt -cbor2==5.6.4 +cbor2==5.4.6 # via -r requirements.zephyr.txt -certifi==2024.6.2 +certifi==2022.12.7 # via requests -cffi==1.16.0 +cffi==1.15.1 # via cryptography -charset-normalizer==3.3.2 +charset-normalizer==3.0.1 # via requests -click==8.1.7 +click==8.1.3 # via # -r requirements.build.txt # -r requirements.esp32.txt @@ -61,7 +57,7 @@ contextlib2==21.6.0 # via # idf-component-manager # schema -cryptography==42.0.8 +cryptography==39.0.2 # via # -c constraints.esp32.txt # -r requirements.all.txt @@ -70,73 +66,67 @@ cxxfilt==0.3.0 # via -r requirements.memory.txt decorator==5.1.1 # via ipython -diskcache==5.6.3 +diskcache==5.4.0 # via -r requirements.all.txt -distlib==0.3.8 +distlib==0.3.6 # via virtualenv docopt==0.6.2 # via pykwalify -ecdsa==0.19.0 +ecdsa==0.18.0 # via # -r requirements.esp32.txt # esptool -esp-coredump==1.11.0 +esp-coredump==1.7.0 # via esp-idf-monitor esp-idf-kconfig==1.2.0 # via -r requirements.esp32.txt esp-idf-monitor==1.1.1 # via -r requirements.esp32.txt -esptool==4.7.0 +esptool==4.6.2 # via esp-coredump -exceptiongroup==1.2.1 - # via ipython -executing==2.0.1 +executing==1.2.0 # via stack-data -fastcore==1.5.48 +fastcore==1.5.28 # via ghapi -filelock==3.15.4 +filelock==3.9.0 + # via virtualenv +future==0.18.3 # via - # cachecontrol - # virtualenv -future==1.0.0 - # via -r requirements.esp32.txt -ghapi==1.0.5 + # -r requirements.esp32.txt + # idf-component-manager +ghapi==1.0.3 # via -r requirements.memory.txt humanfriendly==10.0 # via coloredlogs -idf-component-manager==1.5.3 +idf-component-manager==1.5.2 # via -r requirements.esp32.txt -idna==3.7 +idna==3.4 # via requests intelhex==2.3.0 - # via - # -r requirements.zephyr.txt - # esptool -ipython==8.25.0 + # via -r requirements.zephyr.txt +ipython==8.11.0 # via -r requirements.all.txt -itsdangerous==2.0.1 ; python_version < "3.11" - # via -r requirements.esp32.txt -jedi==0.19.1 +jedi==0.18.2 # via ipython -jinja2==3.1.4 +jinja2==3.0.3 # via -r requirements.build.txt -jsonschema==4.22.0 +jsonschema==4.17.3 # via -r requirements.zephyr.txt -jsonschema-specifications==2023.12.1 - # via jsonschema -kconfiglib==14.1.0 +kconfiglib==13.7.1 # via esp-idf-kconfig -lark==1.1.9 +lark==1.1.5 # via # -r requirements.all.txt # -r requirements.build.txt -markupsafe==2.1.5 +lockfile==0.12.2 + # via cachecontrol +markupsafe==2.1.2 # via jinja2 -matplotlib-inline==0.1.7 +matplotlib-inline==0.1.6 # via ipython -mobly==1.12.2 +mobly==1.12.1 # via -r requirements.all.txt -msgpack==1.0.8 +msgpack==1.0.4 # via cachecontrol mypy==1.10.1 # via -r requirements.all.txt @@ -144,48 +134,50 @@ mypy-extensions==1.0.0 # via mypy mypy-protobuf==3.5.0 # via -r requirements.all.txt -numpy==2.0.0 +numpy==1.26.4 # via pandas -packaging==24.1 +packaging==23.0 # via # build # fastcore # ghapi # idf-component-manager # west -pandas==2.2.2 ; platform_machine != "aarch64" and platform_machine != "arm64" +pandas==2.1.4 ; platform_machine != "aarch64" and platform_machine != "arm64" # via -r requirements.memory.txt -parso==0.8.4 +parso==0.8.3 # via jedi -pep517==0.13.1 +pep517==0.13.0 # via build -pexpect==4.9.0 +pexpect==4.8.0 # via ipython pgi==0.0.11.2 ; sys_platform == "linux" # via -r requirements.all.txt -pip-tools==7.3.0 +pickleshare==0.7.5 + # via ipython +pip-tools==7.0.0 # via -r requirements.all.txt -platformdirs==4.2.2 +platformdirs==3.0.0 # via virtualenv -portpicker==1.6.0 +portpicker==1.5.2 # via # -r requirements.all.txt # mobly -prompt-toolkit==3.0.47 +prompt-toolkit==3.0.43 # via ipython protobuf==4.24.4 # via # -r requirements.all.txt # mypy-protobuf -psutil==6.0.0 +psutil==5.9.4 # via portpicker ptyprocess==0.7.0 # via pexpect pure-eval==0.2.2 # via stack-data -pycparser==2.22 +pycparser==2.21 # via cffi -pyelftools==0.31 +pyelftools==0.30 # via # -c constraints.esp32.txt # esp-idf-monitor @@ -193,20 +185,20 @@ pygdbmi==0.9.0.2 # via # -r requirements.esp32.txt # esp-coredump -pygments==2.18.0 +pygments==2.14.0 # via ipython pykwalify==1.8.0 # via west pyparsing==3.0.9 - # via - # -r requirements.esp32.txt - # idf-component-manager + # via -r requirements.esp32.txt +pyrsistent==0.19.3 + # via jsonschema pyserial==3.5 # via # -c constraints.esp32.txt # esp-idf-monitor # esptool -python-dateutil==2.9.0.post0 +python-dateutil==2.8.2 # via # pandas # pykwalify @@ -214,7 +206,7 @@ python-engineio==3.14.2 # via python-socketio python-socketio==4.6.1 # via -r requirements.esp32.txt -pytz==2024.1 +pytz==2022.7.1 # via pandas pyyaml==6.0.1 # via @@ -226,11 +218,7 @@ reedsolo==1.5.4 # via # -r requirements.esp32.txt # esptool -referencing==0.35.1 - # via - # jsonschema - # jsonschema-specifications -requests==2.32.3 +requests==2.28.2 # via # -r requirements.cirque.txt # cachecontrol @@ -239,16 +227,10 @@ requests==2.32.3 # requests-toolbelt requests-file==1.5.1 # via idf-component-manager -requests-toolbelt==1.0.0 +requests-toolbelt==0.10.1 # via idf-component-manager -rpds-py==0.18.1 - # via - # jsonschema - # referencing -ruamel-yaml==0.18.6 +ruamel-yaml==0.17.21 # via pykwalify -ruamel-yaml-clib==0.2.8 - # via ruamel-yaml schema==0.7.5 # via idf-component-manager six==1.16.0 @@ -261,23 +243,17 @@ six==1.16.0 # python-engineio # python-socketio # requests-file -stack-data==0.6.3 +stack-data==0.6.2 # via ipython stringcase==1.2.0 # via -r requirements.build.txt tabulate==0.9.0 # via -r requirements.memory.txt -tomli==2.0.1 - # via - # build - # mypy - # pep517 - # pip-tools -tornado==6.4.1 +tornado==6.2 # via -r requirements.all.txt -tqdm==4.66.4 +tqdm==4.64.1 # via idf-component-manager -traitlets==5.14.3 +traitlets==5.9.0 # via # ipython # matplotlib-inline @@ -285,40 +261,36 @@ types-protobuf==4.24.0.2 # via # -r requirements.all.txt # mypy-protobuf -typing-extensions==4.12.2 - # via - # ipython - # mypy -tzdata==2024.1 - # via pandas -urllib3==1.26.19 - # via - # idf-component-manager - # requests -virtualenv==20.26.3 +typing-extensions==4.6.0 + # via mypy +urllib3==1.26.14 + # via requests +virtualenv==20.20.0 # via -r requirements.all.txt -watchdog==4.0.1 +watchdog==2.3.1 # via -r requirements.all.txt -wcwidth==0.2.13 +wcwidth==0.2.6 # via prompt-toolkit -websockets==12.0 +websockets==10.4 # via -r requirements.all.txt -west==1.2.0 +west==1.0.0 # via -r requirements.zephyr.txt -wheel==0.43.0 ; sys_platform == "linux" +wheel==0.38.4 ; sys_platform == "linux" # via # -r requirements.all.txt # pip-tools # The following packages are considered to be unsafe in a requirements file: -pip==24.1 +pip==23.2.1 # via + # fastcore # ghapi # pip-tools -setuptools==70.1.0 +setuptools==68.0.0 # via # pip-tools # west + # Manual edits: # Higher versions depend on proto-plus, which break diff --git a/scripts/setup/python.json b/scripts/setup/python.json index 4780e23b1ffe17..0df6cc494ab40a 100644 --- a/scripts/setup/python.json +++ b/scripts/setup/python.json @@ -3,7 +3,7 @@ { "path": "infra/3pp/tools/cpython3/${platform}", "platforms": ["mac-amd64", "windows-amd64"], - "tags": ["version:2@3.11.9.chromium.35"] + "tags": ["version:2@3.9.5.chromium.19"] } ] } diff --git a/scripts/setup/requirements.bouffalolab.txt b/scripts/setup/requirements.bouffalolab.txt index ad644380ceb114..a66a47943e913a 100644 --- a/scripts/setup/requirements.bouffalolab.txt +++ b/scripts/setup/requirements.bouffalolab.txt @@ -3,5 +3,5 @@ jsonschema>=4.4.0 cbor2>=5.4.3 ecdsa>=0.18.0 qrcode==7.4.2 -bitarray>=2.8.1 +bitarray==2.6.0 python_stdnum==1.18 diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index 80d412e73ce1d0..b2584bbac08803 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -6,7 +6,7 @@ pyparsing>=3.0.3,<3.1 idf-component-manager pygdbmi<=0.9.0.2 reedsolo>=1.5.3,<=1.5.4 -bitarray>=2.8.1 +bitarray==2.6.0 bitstring>=3.1.6,<4 ecdsa>=0.16.0 construct>=2.10.70 diff --git a/scripts/setup/requirements.telink.txt b/scripts/setup/requirements.telink.txt index 64a2bc05b378a4..ee46087e46533e 100644 --- a/scripts/setup/requirements.telink.txt +++ b/scripts/setup/requirements.telink.txt @@ -1,3 +1,3 @@ -future==1.0.0 +future==0.18.3 pypng==0.0.21 PyQRCode==1.2.1 diff --git a/scripts/tools/telink/requirements.txt b/scripts/tools/telink/requirements.txt index 0c2c636f71ecb8..bb4359b5319da3 100644 --- a/scripts/tools/telink/requirements.txt +++ b/scripts/tools/telink/requirements.txt @@ -1,6 +1,6 @@ -cryptography==42.0.8 -cffi==1.16.0 -future==1.0.0 -pycparser==2.22 +cryptography==41.0.4 +cffi==1.15.0 +future==0.18.3 +pycparser==2.21 pypng==0.0.21 -PyQRCode==1.2.1 +PyQRCode==1.2.1 \ No newline at end of file From 66e5529e7b6e3123b9277ec376b61717f693cfa3 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 7 Aug 2024 13:58:33 +0200 Subject: [PATCH 41/46] Add qemu-ubuntu config removed during merge --- .github/workflows/qemu.yaml | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index be2320f975beae..cdfdecf6e72358 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -102,3 +102,69 @@ jobs: --target tizen-arm-tests-no-ble-no-thread \ build " + " + + qemu-linux: + name: ubuntu + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-linux-qemu:55 + volumes: + - "/tmp/log_output:/tmp/test_logs" + # Required for using KVM + options: --privileged + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Build Apps + run: | + scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-chip-tool \ + --target linux-x64-all-clusters \ + build \ + --copy-artifacts-to objdir-clone \ + " + # There is no enough space for running the test withouth cleaning the environment + - name: Clean up + run: | + rm -rf out/*/obj + rm -rf out/*/lib + rm -rf out/*/*.map + rm -rf $PW_ENVIRONMENT_ROOT + git clean -fdx --exclude out + # Without all required apps paths provided as argument, script starts to search for them in the current directory and it takes a lot of time. + - name: Run ble commission test using the python parser sending commands to chip-tool + run: | + ./scripts/run_in_vm.sh \ + "scripts/run_in_build_env.sh 'pip3 install -r scripts/setup/requirements.ble-wifi-testing.txt' && \ + ./scripts/run_in_build_env.sh \ + \"./scripts/tests/run_test_suite.py \ + --runner chip_tool_python \ + --target TestCommissionerNodeId \ + --chip-tool ./out/linux-x64-chip-tool/chip-tool \ + run \ + --iterations 1 \ + --test-timeout-seconds 120 \ + --all-clusters-app ./out/linux-x64-all-clusters/chip-all-clusters-app \ + --lock-app ./out/linux-x64-lock/chip-lock-app \ + --ota-provider-app ./out/linux-x64-ota-provider/chip-ota-provider-app \ + --ota-requestor-app ./out/linux-x64-ota-requestor/chip-ota-requestor-app \ + --tv-app ./out/linux-x64-tv-app/chip-tv-app \ + --bridge-app ./out/linux-x64-bridge/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd/lit-icd-app \ + --microwave-oven-app .out/linux-x64-microwave-oven/chip-microwave-oven-app \ + --rvc-app .out/linux-x64-rvc/chip-rvc-app \ + --ble-wifi \ + \" \ + " From 40d4f8fa3dc77a6b10a35b07cd9864806750bba3 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 21 Aug 2024 14:16:42 +0200 Subject: [PATCH 42/46] Restore submodules --- examples/common/m5stack-tft/repo | 2 +- third_party/openthread/ot-nxp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/common/m5stack-tft/repo b/examples/common/m5stack-tft/repo index d99f5ef8df180a..a6299b6c7c0b2e 160000 --- a/examples/common/m5stack-tft/repo +++ b/examples/common/m5stack-tft/repo @@ -1 +1 @@ -Subproject commit d99f5ef8df180ab34b3d9fff6888d5bede7665c5 +Subproject commit a6299b6c7c0b2e3eb62fa08ee4bf7155c39bad1f diff --git a/third_party/openthread/ot-nxp b/third_party/openthread/ot-nxp index b8471857ab7b2c..f45fe4dd8687f0 160000 --- a/third_party/openthread/ot-nxp +++ b/third_party/openthread/ot-nxp @@ -1 +1 @@ -Subproject commit b8471857ab7b2c843c9ec5bc5d7e7711b2cd30a4 +Subproject commit f45fe4dd8687f0feddf063a33214c2196b463d3e From 3a5c39dd71fb1f373761363789a29e2bf31dc617 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 21 Aug 2024 14:55:31 +0200 Subject: [PATCH 43/46] Update qemu image --- .github/workflows/qemu.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 663c808038f760..b6fee9b76a12bd 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -106,7 +106,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-linux-qemu:55 + image: ghcr.io/project-chip/chip-build-linux-qemu:74 volumes: - "/tmp/log_output:/tmp/test_logs" # Required for using KVM From 13f2d73e9f707cb7c0f76375efc3f33fda090bb7 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 22 Aug 2024 14:13:52 +0200 Subject: [PATCH 44/46] Remove ble_wifi arg from shutdown namespace Related interfaces will be removed after removing of specific namespaces --- scripts/tests/chiptest/linux.py | 13 +++---------- scripts/tests/run_test_suite.py | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/scripts/tests/chiptest/linux.py b/scripts/tests/chiptest/linux.py index b0730447b81138..0cb97ff40b2589 100644 --- a/scripts/tests/chiptest/linux.py +++ b/scripts/tests/chiptest/linux.py @@ -144,7 +144,7 @@ def CreateNamespacesForAppTest(ble_wifi: bool = False): logging.warn("Some addresses look to still be tentative") -def RemoveNamespaceForAppTest(ble_wifi: bool = False): +def RemoveNamespaceForAppTest(): """ Removes namespaces for a tool and app binaries previously created to simulate an isolated network. This tears down what was created in CreateNamespacesForAppTest. @@ -165,13 +165,6 @@ def RemoveNamespaceForAppTest(ble_wifi: bool = False): "ip netns del app", ] - if not ble_wifi: - COMMANDS += [ - "ip link set dev eth-app-direct down", - "ip link set dev eth-tool-direct down", - "ip link delete eth-tool-direct", - ] - for command in COMMANDS: logging.debug("Executing '%s'" % command) if os.system(command) != 0: @@ -189,8 +182,8 @@ def PrepareNamespacesForTestExecution(in_unshare: bool, ble_wifi: bool = False): CreateNamespacesForAppTest(ble_wifi) -def ShutdownNamespaceForTestExecution(ble_wifi: bool = False): - RemoveNamespaceForAppTest(ble_wifi) +def ShutdownNamespaceForTestExecution(): + RemoveNamespaceForAppTest() class DbusTest: diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index ffba2825c3db18..37c31bd80593bf 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -406,7 +406,7 @@ def cleanup(): virt_wifi.stop() virt_ble.stop() dbus.stop() - chiptest.linux.ShutdownNamespaceForTestExecution(ble_wifi) + chiptest.linux.ShutdownNamespaceForTestExecution() for i in range(iterations): logging.info("Starting iteration %d" % (i + 1)) From 361b07f5a4ec19b2067e5736585b92a0c302ab06 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 22 Aug 2024 14:43:32 +0200 Subject: [PATCH 45/46] Zap regenerate --- .../chip-tool/zap-generated/cluster/logging/EntryToText.cpp | 2 +- .../chip-tool/zap-generated/cluster/logging/EntryToText.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp index c97ff2590fa60b..c75f9a7a096612 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -6697,4 +6697,4 @@ char const * GeneratedCommandIdToText(chip::ClusterId cluster, chip::CommandId i default: return "Unknown"; } -} +} \ No newline at end of file diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.h index 27fa6512fbdd01..f310593ba9e3e2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.h @@ -27,4 +27,4 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id); char const * AcceptedCommandIdToText(chip::ClusterId cluster, chip::CommandId id); -char const * GeneratedCommandIdToText(chip::ClusterId cluster, chip::CommandId id); +char const * GeneratedCommandIdToText(chip::ClusterId cluster, chip::CommandId id); \ No newline at end of file From 18d38f5a92332e094db81f700299fa953009ce0f Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 22 Aug 2024 16:29:45 +0200 Subject: [PATCH 46/46] Fix script issue --- .github/workflows/qemu.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index b6fee9b76a12bd..9156d022e5667b 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -97,7 +97,6 @@ jobs: --target tizen-arm-tests-no-ble-no-thread \ build " - " qemu-linux: name: ubuntu