From 2884161328fc2ed1e83ce1a638d5817da498e6c8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 11 Oct 2022 16:48:19 -0400 Subject: [PATCH] Fix K32W build rules (ToT CI failure) (#23126) * Use Dict type instead of dict for more python compatibility * Add se05x and no-ble variants to k32w builds, make use of it in CI since otherwise we run out of flash --- .github/workflows/examples-k32w.yaml | 2 +- scripts/build/build/target.py | 4 ++-- scripts/build/build/targets.py | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index d9142d73d72583..a2603519e0ae95 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -71,7 +71,7 @@ jobs: run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ - --target k32w-light \ + --target k32w-light-no-ble-se05x \ --target k32w-light-no-ota \ --target k32w-lock-low-power-nologs \ --target k32w-contact-low-power-nologs \ diff --git a/scripts/build/build/target.py b/scripts/build/build/target.py index 9d7be75afceef3..1b7ca1626b66c6 100644 --- a/scripts/build/build/target.py +++ b/scripts/build/build/target.py @@ -45,7 +45,7 @@ from collections.abc import Iterable from dataclasses import dataclass -from typing import Any, Optional +from typing import Any, Dict, Optional @dataclass(init=False) @@ -54,7 +54,7 @@ class TargetPart: name: str # The build arguments to apply to a builder if this part is active - build_arguments: dict[str, Any] + build_arguments: Dict[str, Any] # Part should be included if and only if the final string MATCHES the # given regular expression diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 48021ff270a395..7916a1089d3b1f 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -350,6 +350,8 @@ def BuildK32WTarget(): TargetPart('contact', app=K32WApp.CONTACT, release=True), ]) + target.AppendModifier(name="se05x", se05x=True) + target.AppendModifier(name="no-ble", disable_ble=True) target.AppendModifier(name="no-ota", disable_ota=True) target.AppendModifier(name="low-power", low_power=True).OnlyIfRe("-nologs") target.AppendModifier(name="nologs", disable_logs=True)