Merge branch 'ci/add_idf_target_env_var_while_building' into 'master'

ci: add IDF_TARGET env var while building

Closes IDFCI-1957

See merge request espressif/esp-idf!28506
pull/13090/head
Lu Ai Jun 2024-01-18 10:29:20 +08:00
commit b982b43e9a
1 zmienionych plików z 12 dodań i 3 usunięć

Wyświetl plik

@ -1,18 +1,27 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import os
import sys import sys
import typing as t import typing as t
from typing import Literal from typing import Literal
from idf_build_apps import App, CMakeApp, json_to_app from idf_build_apps import App
from idf_ci.uploader import AppUploader, get_app_uploader from idf_build_apps import CMakeApp
from idf_build_apps import json_to_app
from idf_ci.uploader import AppUploader
from idf_ci.uploader import get_app_uploader
class IdfCMakeApp(CMakeApp): class IdfCMakeApp(CMakeApp):
uploader: t.ClassVar[t.Optional['AppUploader']] = get_app_uploader() uploader: t.ClassVar[t.Optional['AppUploader']] = get_app_uploader()
build_system: Literal['idf_cmake'] = 'idf_cmake' build_system: Literal['idf_cmake'] = 'idf_cmake'
def _initialize_hook(self, **kwargs: t.Any) -> None:
# ensure this env var exists
os.environ['IDF_TARGET'] = self.target
super()._initialize_hook(**kwargs)
def _post_build(self) -> None: def _post_build(self) -> None:
super()._post_build() super()._post_build()