From bfdd868a86dd568b3cea9dbf5969c5c60cfc38d7 Mon Sep 17 00:00:00 2001 From: Michael Rupp Date: Wed, 10 Jul 2024 17:06:37 +0000 Subject: [PATCH 01/15] Pull request #1: add slc config includes with include guards Merge in WMN_TOOLS/matter_sdk from add_slc_configs to develop Squashed commit of the following: commit cf32a89311ea24b9ddc46a688ef5e54513909241 Author: Michael Rupp Date: Wed Jul 10 11:23:31 2024 -0400 add slc config includes with include guards --- examples/platform/silabs/OTAConfig.h | 4 ++++ src/platform/silabs/CHIPPlatformConfig.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/platform/silabs/OTAConfig.h b/examples/platform/silabs/OTAConfig.h index 2b7ed9a45f..c97202e401 100644 --- a/examples/platform/silabs/OTAConfig.h +++ b/examples/platform/silabs/OTAConfig.h @@ -29,6 +29,10 @@ #include #endif +#if (SL_MATTER_GN_BUILD == 0) +#include "sl_matter_ota_config.h" +#endif + class OTAConfig { public: diff --git a/src/platform/silabs/CHIPPlatformConfig.h b/src/platform/silabs/CHIPPlatformConfig.h index 93faf6b791..6a389c599b 100644 --- a/src/platform/silabs/CHIPPlatformConfig.h +++ b/src/platform/silabs/CHIPPlatformConfig.h @@ -26,6 +26,10 @@ #include +#if (SL_MATTER_GN_BUILD == 0) && SL_ICD_ENABLED +#include "sl_matter_icd_config.h" +#endif + // ==================== General Platform Adaptations ==================== #define CHIP_CONFIG_ABORT() abort() From 3e31b6ee98eb83df0aac9d2c53bb7f6a81cfc3fa Mon Sep 17 00:00:00 2001 From: Michael Rupp <95718139+mykrupp@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:53:23 -0400 Subject: [PATCH 02/15] [SILABS] Minor fixes for LWIP usage (#34393) * Changes necessary for WiFi SDK lwip component usage vs. source/header file reference * Restyled by clang-format * Update src/platform/silabs/PlatformManagerImpl.cpp Co-authored-by: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> * remove extraneous FreeRTOS includes --------- Co-authored-by: Curtis Rahman Co-authored-by: Restyled.io Co-authored-by: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> --- src/platform/silabs/PlatformManagerImpl.cpp | 9 +++++---- src/platform/silabs/PlatformManagerImpl.h | 3 ++- src/platform/silabs/SiWx917/wifi/wfx_host_events.h | 1 - src/platform/silabs/efr32/wifi/wfx_host_events.h | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/platform/silabs/PlatformManagerImpl.cpp b/src/platform/silabs/PlatformManagerImpl.cpp index 741a0b6b86..14dd4f78f2 100644 --- a/src/platform/silabs/PlatformManagerImpl.cpp +++ b/src/platform/silabs/PlatformManagerImpl.cpp @@ -47,13 +47,13 @@ namespace DeviceLayer { PlatformManagerImpl PlatformManagerImpl::sInstance; #if defined(SL_MBEDTLS_USE_TINYCRYPT) -sys_mutex_t PlatformManagerImpl::rngMutexHandle = NULL; +osMutexId_t PlatformManagerImpl::rngMutexHandle = nullptr; int PlatformManagerImpl::uECC_RNG_Function(uint8_t * dest, unsigned int size) { - sys_mutex_lock(&rngMutexHandle); + osMutexAcquire(rngMutexHandle, osWaitForever); int res = (chip::Crypto::DRBG_get_bytes(dest, size) == CHIP_NO_ERROR) ? size : 0; - sys_mutex_unlock(&rngMutexHandle); + osMutexRelease(rngMutexHandle); return res; } @@ -97,7 +97,8 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) ReturnErrorOnFailure(chip::Crypto::add_entropy_source(app_entropy_source, NULL, 16)); #endif // !SLI_SI91X_MCU_INTERFACE /* Set RNG function for tinycrypt operations. */ - VerifyOrExit(sys_mutex_new(&rngMutexHandle) == ERR_OK, err = CHIP_ERROR_NO_MEMORY); + rngMutexHandle = osMutexNew(nullptr); + VerifyOrExit((&rngMutexHandle != nullptr), err = CHIP_ERROR_NO_MEMORY); uECC_set_rng(PlatformManagerImpl::uECC_RNG_Function); #endif // SL_MBEDTLS_USE_TINYCRYPT diff --git a/src/platform/silabs/PlatformManagerImpl.h b/src/platform/silabs/PlatformManagerImpl.h index b44fbadbfa..25813afb48 100644 --- a/src/platform/silabs/PlatformManagerImpl.h +++ b/src/platform/silabs/PlatformManagerImpl.h @@ -28,6 +28,7 @@ #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION #include "wfx_host_events.h" #endif +#include namespace chip { namespace DeviceLayer { @@ -45,7 +46,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener // Since the RNG callback will be called from multiple threads, // use this mutex to lock/unlock the call to Matter RNG API, which // uses some global variables. - static sys_mutex_t rngMutexHandle; + static osMutexId_t rngMutexHandle; // Callback used by tinycrypt to generate random numbers. // It must be set before calling any sign operations, diff --git a/src/platform/silabs/SiWx917/wifi/wfx_host_events.h b/src/platform/silabs/SiWx917/wifi/wfx_host_events.h index e3f923894c..21f8fe1f26 100644 --- a/src/platform/silabs/SiWx917/wifi/wfx_host_events.h +++ b/src/platform/silabs/SiWx917/wifi/wfx_host_events.h @@ -23,7 +23,6 @@ #include "wfx_msgs.h" /* LwIP includes. */ -#include "lwip/apps/httpd.h" #include "lwip/ip_addr.h" #include "lwip/netif.h" #include "lwip/netifapi.h" diff --git a/src/platform/silabs/efr32/wifi/wfx_host_events.h b/src/platform/silabs/efr32/wifi/wfx_host_events.h index a7a2dc2ac3..246936fd78 100644 --- a/src/platform/silabs/efr32/wifi/wfx_host_events.h +++ b/src/platform/silabs/efr32/wifi/wfx_host_events.h @@ -119,7 +119,6 @@ typedef struct __attribute__((__packed__)) sl_wfx_mib_req_s #endif /* WF200 */ /* LwIP includes. */ -#include "lwip/apps/httpd.h" #include "lwip/ip_addr.h" #include "lwip/netif.h" #include "lwip/netifapi.h" From ec883279531816e78b525c4a82d7c9dd624e2f61 Mon Sep 17 00:00:00 2001 From: Michael Rupp Date: Fri, 19 Jul 2024 18:43:30 -0400 Subject: [PATCH 03/15] ifdef RAILCb_AssertFailed and HardFaultHandler with SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT for CMP app --- examples/platform/silabs/SoftwareFaultReports.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/platform/silabs/SoftwareFaultReports.cpp b/examples/platform/silabs/SoftwareFaultReports.cpp index fc7b6a9c5e..e62a73e8a5 100644 --- a/examples/platform/silabs/SoftwareFaultReports.cpp +++ b/examples/platform/silabs/SoftwareFaultReports.cpp @@ -125,6 +125,7 @@ extern "C" __attribute__((used)) void debugHardfault(uint32_t * sp) /** * Override default hard-fault handler */ +#ifndef SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT extern "C" __attribute__((naked)) void HardFault_Handler(void) { __asm volatile("tst lr, #4 \n" @@ -135,6 +136,7 @@ extern "C" __attribute__((naked)) void HardFault_Handler(void) "bx r1 \n" "debugHardfault_address: .word debugHardfault \n"); } +#endif // SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT extern "C" void vApplicationMallocFailedHook(void) { @@ -228,6 +230,7 @@ extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBu } #ifndef BRD4325A +#ifndef SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT extern "C" void RAILCb_AssertFailed(RAIL_Handle_t railHandle, uint32_t errorCode) { char faultMessage[kMaxFaultStringLen] = { 0 }; @@ -251,6 +254,7 @@ extern "C" void RAILCb_AssertFailed(RAIL_Handle_t railHandle, uint32_t errorCode chipAbort(); } +#endif // SL_CATALOG_ZIGBEE_STACK_COMMON_PRESENT #endif // BRD4325A #endif // HARD_FAULT_LOG_ENABLE From 3db8017e71be5cdd66da492115e75b2a1b940773 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Tue, 13 Aug 2024 19:14:33 +0000 Subject: [PATCH 04/15] Pull request #9: [SLC-TEMP] Add missing power manager include Merge in WMN_TOOLS/matter_sdk from fix/add_missing_include to develop Squashed commit of the following: commit fefb0651a12222792069b220bbe9e2b3027ba637 Author: Mathieu Kardous Date: Tue Aug 13 15:02:28 2024 -0400 Add missing power manager include --- examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp index bfdedbfe82..4b0f155c22 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp @@ -56,6 +56,9 @@ extern "C" { #include "sl_si91x_m4_ps.h" } +// [SLC-TEMP] Adding power manager include until we update wiseconnect version and upstream the changes +#include "sl_si91x_power_manager.h" + namespace { // TODO: should be removed once we are getting the press interrupt for button 0 with sleep #define BUTTON_PRESSED 1 @@ -687,7 +690,7 @@ static sl_status_t wfx_rsi_do_join(void) case WFX_SEC_WPA3: ap.security = SL_WIFI_WPA3_TRANSITION; #else - ap.security = SL_WIFI_WPA_WPA2_MIXED; + ap.security = SL_WIFI_WPA_WPA2_MIXED; #endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION break; case WFX_SEC_NONE: From 2f27c4a29883d29e788cfa694d7d2d948aa3e6de Mon Sep 17 00:00:00 2001 From: Michael Rupp Date: Tue, 10 Sep 2024 13:24:41 -0400 Subject: [PATCH 05/15] delete CSA actions --- .github/.wordlist.txt | 1628 ----------------- .github/CODEOWNERS | 2 - .github/ISSUE_TEMPLATE/001-bug-report.yaml | 80 - .github/ISSUE_TEMPLATE/002-1.0-issue.yaml | 98 - .github/ISSUE_TEMPLATE/003-1.1-issue.yaml | 98 - .github/ISSUE_TEMPLATE/004-1.2-issue.yaml | 98 - .github/ISSUE_TEMPLATE/005-1.3-issue.yaml | 98 - .github/ISSUE_TEMPLATE/049-trivial-fix.yaml | 93 - .github/ISSUE_TEMPLATE/050-tooling-fix.yaml | 88 - .github/ISSUE_TEMPLATE/060-platform-fix.yaml | 88 - .../ISSUE_TEMPLATE/080-feature-request.yaml | 62 - .github/ISSUE_TEMPLATE/090-sve-issue.yaml | 119 -- .github/ISSUE_TEMPLATE/091-cert-blocker.yaml | 108 -- .../ISSUE_TEMPLATE/097-ci-test-failure.yaml | 59 - .github/ISSUE_TEMPLATE/098-build-issue.yaml | 59 - .../099-github-workflow-issue.yaml | 59 - .../100-documentation-issue.yaml | 58 - .github/ISSUE_TEMPLATE/config.yaml | 1 - .github/PULL_REQUEST_TEMPLATE.md | 12 - .github/actions/bootstrap-cache/action.yaml | 17 - .github/actions/bootstrap/action.yaml | 82 - .../action.yaml | 43 - .../actions/checkout-submodules/action.yaml | 19 - .github/actions/dump-disk-info/action.yaml | 20 - .github/actions/dynamic/action.yaml | 38 - .../actions/git-safe-directory/action.yaml | 9 - .../actions/maximize-runner-disk/action.yaml | 48 - .../perform-codeql-analysis/action.yaml | 34 - .../actions/setup-size-reports/action.yaml | 15 - .../actions/upload-size-reports/action.yaml | 17 - .github/boring-cyborg.yml | 132 -- .github/config.yml | 8 - .github/dependabot.yml | 61 - .github/issue-labeler.yml | 54 - .github/labeler.yml | 333 ---- .github/release.yml | 76 - .github/workflows/artifacts.yaml | 17 - .github/workflows/bloat_check.yaml | 53 - .github/workflows/build-cert-bins.yaml | 21 - .github/workflows/build.yaml | 476 ----- .github/workflows/buildjet-cache-delete.yaml | 17 - .github/workflows/cert_test_checks.yaml | 35 - .../check-data-model-directory-updates.yaml | 31 - .github/workflows/chef.yaml | 117 -- .github/workflows/cherry-picks.yaml | 37 - .github/workflows/cirque.yaml | 136 -- .github/workflows/codeql.yml | 29 - .github/workflows/darwin-tests.yaml | 161 -- .github/workflows/darwin.yaml | 134 -- .github/workflows/docbuild.yaml | 54 - .github/workflows/docker_img.yaml | 171 -- .github/workflows/doxygen.yaml | 107 -- .../workflows/example-tv-casting-darwin.yaml | 49 - .github/workflows/examples-ameba.yaml | 60 - .github/workflows/examples-asr.yaml | 65 - .github/workflows/examples-bouffalolab.yaml | 147 -- .github/workflows/examples-cc13xx_26xx.yaml | 114 -- .github/workflows/examples-cc32xx.yaml | 87 - .github/workflows/examples-efr32.yaml | 148 -- .github/workflows/examples-esp32.yaml | 169 -- .github/workflows/examples-infineon.yaml | 226 --- .github/workflows/examples-linux-arm.yaml | 90 - .github/workflows/examples-linux-imx.yaml | 96 - .../workflows/examples-linux-standalone.yaml | 225 --- .../examples-linux-tv-casting-app.yaml | 89 - .github/workflows/examples-mw320.yaml | 71 - .github/workflows/examples-nrfconnect.yaml | 211 --- .github/workflows/examples-nuttx.yaml | 55 - .github/workflows/examples-nxp.yaml | 287 --- .github/workflows/examples-openiotsdk.yaml | 220 --- .github/workflows/examples-qpg.yaml | 89 - .github/workflows/examples-stm32.yaml | 79 - .github/workflows/examples-telink.yaml | 280 --- .github/workflows/examples-tizen.yaml | 86 - .github/workflows/full-android.yaml | 117 -- .github/workflows/fuzzing-build.yaml | 101 - .../workflows/gradle-wrapper-validation.yml | 20 - .github/workflows/issue-labeler.yaml | 20 - .github/workflows/java-tests.yaml | 308 ---- .github/workflows/kotlin-style.yaml | 70 - .github/workflows/labeler.yaml | 15 - .github/workflows/lint.yml | 347 ---- .github/workflows/minimal-build.yaml | 71 - .github/workflows/protocol_compatibility.yaml | 49 - .github/workflows/qemu.yaml | 99 - .github/workflows/recent_fail_summary.yaml | 58 - .github/workflows/release_artifacts.yaml | 89 - .github/workflows/roll_and_build_docker.yaml | 15 - .github/workflows/silabs_workflow.yaml | 40 + .github/workflows/smoketest-android.yaml | 82 - .github/workflows/spell.yml | 36 - .github/workflows/stale.yaml | 42 - .github/workflows/tag-releases.yaml | 52 - .github/workflows/tests.yaml | 627 ------- .github/workflows/third-party-check.yaml | 39 - .github/workflows/todos.yaml | 38 - .github/workflows/unit_integration_test.yaml | 88 - .github/workflows/zap_regeneration.yaml | 54 - .github/workflows/zap_templates.yaml | 75 - 99 files changed, 40 insertions(+), 10965 deletions(-) delete mode 100644 .github/.wordlist.txt delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/001-bug-report.yaml delete mode 100644 .github/ISSUE_TEMPLATE/002-1.0-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/003-1.1-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/004-1.2-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/005-1.3-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/049-trivial-fix.yaml delete mode 100644 .github/ISSUE_TEMPLATE/050-tooling-fix.yaml delete mode 100644 .github/ISSUE_TEMPLATE/060-platform-fix.yaml delete mode 100644 .github/ISSUE_TEMPLATE/080-feature-request.yaml delete mode 100644 .github/ISSUE_TEMPLATE/090-sve-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/091-cert-blocker.yaml delete mode 100644 .github/ISSUE_TEMPLATE/097-ci-test-failure.yaml delete mode 100644 .github/ISSUE_TEMPLATE/098-build-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/100-documentation-issue.yaml delete mode 100644 .github/ISSUE_TEMPLATE/config.yaml delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/actions/bootstrap-cache/action.yaml delete mode 100644 .github/actions/bootstrap/action.yaml delete mode 100644 .github/actions/checkout-submodules-and-bootstrap/action.yaml delete mode 100644 .github/actions/checkout-submodules/action.yaml delete mode 100644 .github/actions/dump-disk-info/action.yaml delete mode 100644 .github/actions/dynamic/action.yaml delete mode 100644 .github/actions/git-safe-directory/action.yaml delete mode 100644 .github/actions/maximize-runner-disk/action.yaml delete mode 100644 .github/actions/perform-codeql-analysis/action.yaml delete mode 100644 .github/actions/setup-size-reports/action.yaml delete mode 100644 .github/actions/upload-size-reports/action.yaml delete mode 100644 .github/boring-cyborg.yml delete mode 100644 .github/config.yml delete mode 100644 .github/dependabot.yml delete mode 100644 .github/issue-labeler.yml delete mode 100644 .github/labeler.yml delete mode 100644 .github/release.yml delete mode 100644 .github/workflows/artifacts.yaml delete mode 100644 .github/workflows/bloat_check.yaml delete mode 100644 .github/workflows/build-cert-bins.yaml delete mode 100644 .github/workflows/build.yaml delete mode 100644 .github/workflows/buildjet-cache-delete.yaml delete mode 100644 .github/workflows/cert_test_checks.yaml delete mode 100644 .github/workflows/check-data-model-directory-updates.yaml delete mode 100644 .github/workflows/chef.yaml delete mode 100644 .github/workflows/cherry-picks.yaml delete mode 100644 .github/workflows/cirque.yaml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/darwin-tests.yaml delete mode 100644 .github/workflows/darwin.yaml delete mode 100644 .github/workflows/docbuild.yaml delete mode 100644 .github/workflows/docker_img.yaml delete mode 100644 .github/workflows/doxygen.yaml delete mode 100644 .github/workflows/example-tv-casting-darwin.yaml delete mode 100644 .github/workflows/examples-ameba.yaml delete mode 100644 .github/workflows/examples-asr.yaml delete mode 100644 .github/workflows/examples-bouffalolab.yaml delete mode 100644 .github/workflows/examples-cc13xx_26xx.yaml delete mode 100644 .github/workflows/examples-cc32xx.yaml delete mode 100644 .github/workflows/examples-efr32.yaml delete mode 100644 .github/workflows/examples-esp32.yaml delete mode 100644 .github/workflows/examples-infineon.yaml delete mode 100644 .github/workflows/examples-linux-arm.yaml delete mode 100644 .github/workflows/examples-linux-imx.yaml delete mode 100644 .github/workflows/examples-linux-standalone.yaml delete mode 100644 .github/workflows/examples-linux-tv-casting-app.yaml delete mode 100644 .github/workflows/examples-mw320.yaml delete mode 100644 .github/workflows/examples-nrfconnect.yaml delete mode 100644 .github/workflows/examples-nuttx.yaml delete mode 100644 .github/workflows/examples-nxp.yaml delete mode 100644 .github/workflows/examples-openiotsdk.yaml delete mode 100644 .github/workflows/examples-qpg.yaml delete mode 100644 .github/workflows/examples-stm32.yaml delete mode 100644 .github/workflows/examples-telink.yaml delete mode 100644 .github/workflows/examples-tizen.yaml delete mode 100644 .github/workflows/full-android.yaml delete mode 100644 .github/workflows/fuzzing-build.yaml delete mode 100644 .github/workflows/gradle-wrapper-validation.yml delete mode 100644 .github/workflows/issue-labeler.yaml delete mode 100644 .github/workflows/java-tests.yaml delete mode 100644 .github/workflows/kotlin-style.yaml delete mode 100644 .github/workflows/labeler.yaml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/minimal-build.yaml delete mode 100644 .github/workflows/protocol_compatibility.yaml delete mode 100644 .github/workflows/qemu.yaml delete mode 100644 .github/workflows/recent_fail_summary.yaml delete mode 100644 .github/workflows/release_artifacts.yaml delete mode 100644 .github/workflows/roll_and_build_docker.yaml create mode 100644 .github/workflows/silabs_workflow.yaml delete mode 100644 .github/workflows/smoketest-android.yaml delete mode 100644 .github/workflows/spell.yml delete mode 100644 .github/workflows/stale.yaml delete mode 100644 .github/workflows/tag-releases.yaml delete mode 100644 .github/workflows/tests.yaml delete mode 100644 .github/workflows/third-party-check.yaml delete mode 100644 .github/workflows/todos.yaml delete mode 100644 .github/workflows/unit_integration_test.yaml delete mode 100644 .github/workflows/zap_regeneration.yaml delete mode 100644 .github/workflows/zap_templates.yaml diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt deleted file mode 100644 index f317901e45..0000000000 --- a/.github/.wordlist.txt +++ /dev/null @@ -1,1628 +0,0 @@ -14 -15 -16 -17 -18 -19 -20 -21 -22 -AAAA -aarch -abcdef -abfb -ABI -ABIs -ables -accesscontrol -accessor -Accessors -acdbc -ack -ACKed -ACL -ACLs -actdiag -adb -AddNOC -addr -adk -adoc -adr -AdvAutonomous -AdvManagedFlag -AdvOnLink -AdvRouterAddr -AdvSendAdvert -AE -aef -AES -AFL -AIDL -algs -alloc -Ameba -amebad -amebaiot -AmebaZ -amebaz2 -announcementReason -AnnounceOTAProvider -AnnounceOTAProviderRequest -APIs -apk -AppImpl -AppleTV -appliable -applianceeventsandalert -ApplianceIdentification -appliancestatistics -ApplicationId -ApplicationIdentifier -ApplicationLauncher -ApplyUpdate -applyUpdateAction -ApplyUpdateRequest -ApplyUpdateResponse -approver -appspot -appwrite -aps -arg -argc -args -argv -armeabi -armino -ARMmbed -armv -ASAN -asdk -ASR -AssertionError -AST -ASYNC -ATLs -atomics -att -attId -attr -attrib -AttributeAccessInterface -attributeValue -attrListName -attrMask -attSizeBytes -attType -ATW -ATWC -AudioOutput -auth -AuthMode -autoApplyImage -autocompletion -AutoConf -autoconnect -autocrlf -autogenerated -automake -autotools -avahi -avL -AwaitNextAction -AXXXF -AYNJV -babaf -backend -backends -backticks -backtrace -BallastConfiguration -BarrierControl -BasicCHIPRegression -BasicInformation -baudrate -BCM -BD -BDX -BDXDownloader -BeagleBone -befc -BEKEN -betaprogram -BinaryInputBasic -Binfmt -bitbake -bld -BLE -BleApplicationDelegate -BleLayer -BLEManager -BLEManagerImpl -BlePlatformDelegate -Blinls -bloaty -blockdiag -blocklist -blockquote -bluetoothd -bluez -BOOL -booleans -BooleanState -bootable -Bootloader -BorderRouterAP -bouffalolab -BRD -breakpoint -bredr -BridgedDeviceBasicInformation -bringup -BroadcastReceiver -BromateConcentrationMeasurement -BromodichloromethaneConcentrationMeasurement -BromoformConcentrationMeasurement -bt -btmgmt -BTN -BTP -btvirt -BuildKit -buildwithmatter -buildX -burndown -ButtonIsr -BytesMain -bz -bzip -CACACACA -cacerts -CAfile -cancelled -capacitive -CarbonDioxideConcentrationMeasurement -CarbonMonoxideConcentrationMeasurement -CaseAdminNode -CatalogVendorId -CBB -cbd -CBOR -Ccache -ccf -CCMP -CCS -CCSTUDIO -CCXML -CDEEDC -CDVersionNumber -ced -cfg -CFLAGS -cgit -cgroup -changeset -Channel -characterised -CharString -checkmark -ChipBLEMgr -CHIPCirqueTest -CHIPConfig -CHIPCryptoPALHsm -CHIPDeviceController -ChipDeviceCtrl -CHIPDeviceEvent -CHIPDevicePlatformConfig -CHIPDevicePlatformEvent -ChipEchoRequester -ChipEchoResponder -ChipImInitiator -ChipImResponder -ChipLight -ChipMessageLayer -CHIPOBLE -CHIPProjectAppConfig -CHIPProjectConfig -CHIPTest -chiptests -CHIPTool -ChloraminesConcentrationMeasurement -ChlorineConcentrationMeasurement -ChlorodibromomethaneConcentrationMeasurement -ChloroformConcentrationMeasurement -chmod -chown -chrpath -CIPD -CircleCI -cJTAG -CKIT -CLA -clapre -CLI -CLIs -cloudbuild -CLRF -clusterAttrs -ClusterName -ClusterObjectTests -ClusterRevision -ClusterTestGeneration -cmake -CMakeLists -CMD -CMS -CMSIS -CMVH -cn -COAP -codeaurora -codebase -codegen -CodeGenerator -CodeLab -codelabs -ColorControl -Comcast -Commandline -CommandHandlerInterface -CommandName -Commissionable -CommissionableDataProvider -commissionables -commissionee -CommissioningFlow -commondatastorage -CONF -CONFIG -ConfigDescription -configs -configTOTAL -ConfigurationManager -ConfigurationManagerImpl -conformant -connectedhomeip -ConnectionData -ConnectIP -ConnectivityManager -ConnectivityManagerImpl -ConnectNetwork -ConnectNetworkRequest -ConnectNetworkResponse -connstring -conntype -const -ContentApp -ContentApp's -ContentAppPlatform -ContentLaunch -ContentLauncher -contrib -controllee -conv -CopperConcentrationMeasurement -Corstone -cortexa -cp -cpio -cpp -cppreference -CPROTO -cpuapp -cpython -CQM -crypto -cryptographic -CSA -csg -csrrequest -csu -csv -ctl -ctrl -ctypes -CurrentHue -CurrentLevel -CurrentSaturation -customAcl -customizations -cvfJ -cxx -CY -CYW -DAC -DACs -dadbdcdddedf -DAP -DAPLINK -DataFrame -datamodel -DataModelRevision -dataset -datasets -datastore -DataVersion -dbf -DBG -dBm -DBUILD -dbus -dcc -DCHIP -DCL -DCMAKE -DCONF -DCONFIG -debianutils -debugText -decrypt -decrypted -DEDEDEDE -deepnote -DefaultOTAProviders -DefaultOTARequestor -DefaultOTARequestorDriver -DefaultOTARequestorStorage -DefaultSuccess -definedValue -DehumidificationControl -DelayedActionTime -delayedApplyActionTimeSec -delayedQueryActionTimeSec -delayQuery -deliverables -demangle -deployable -depottools -deps -der -desc -descheduled -detokenization -detokenizer -dev -devcontainer -devCtrl -DevelopmentCerts -DeviceAttestationCredentialsProvider -DeviceAttestationCredsExample -DeviceCaCerts -DeviceCert -DeviceCommissioner -DeviceCommon -DeviceController -DeviceId -DeviceInstanceInfoProvider -DeviceLayer -DeviceNetworkProvisioningDelegate -DeviceNetworkProvisioningDelegateImpl -DevicePairingDelegate -DeviceTemperatureConfiguration -DevKitC -DevKitM -devtype -df -dfe -DFILE -dfu -DgDxsfHx -dhclient -DHCP -DHCPC -DHCPv -dhrishi -DiagnosticLogs -dialout -diffstat -diffsyms -dimmable -dirname -dirs -disableNotifyUpdateApplied -disambiguated -discoverable -DispatchEvent -DispatchEventToApplication -DissolvedOxygenConcentrationMeasurement -DISTRO -Distutils -DK -DL -DM -DMG -DMM -DNS -Dnsmasq -dnsmasqd -DNSSD -DNSStubListener -docbuild -Dockerfile -Dockerfiles -Don'ts -DoorLock -DoorState -doru -DOTBR -DOVERLAY -downcasting -DownloadProtocolEnum -Doxygen -dpkg -dropdown -dryrun -DS -duplicative -DUT -DUTS -DUT's -DV -DVK -dynload -eabi -EB -ECC -ECD -ECDH -ECDSA -EchoMessage -EchoRequests -EchoResponse -EchoService -ECW -edaf -edc -EDR -ee -eea -EEE -eef -ef -EFR -efuse -eg -EjQ -elftools -elock -emberAf -emberAfExternalAttributeReadCallback -emberAfExternalAttributeWriteCallback -EmberAfInitializeAttributes -emberAfSetDynamicEndpoint -emsp -EnableNetwork -EnableWiFiNetwork -endian -EndpointId -eno -entrypoint -enum -Enums -env -epochKey -epochStartTime -eq -errorValue -esd -espcoredump -ESPPORT -Espressif -esptool -eth -EthernetNetworkDiagnostics -ethernets -EthyleneConcentrationMeasurement -EthyleneOxideConcentrationMeasurement -EvalCode -EvalCodeWithName -EvalFrameDefault -EV -EVB -EventLogging -evk -EVSE -exceptfds -ExchangeContext -exe -ExecStart -executables -ExtendedPAN -ExtensionEntry -extern -extpanid -FabricId -fabricIdx -fabricIndex -factoryreset -FanControl -fb -fbb -fbd -FC -FCJ -FDDE -fddead -fde -fdx -FECA -FecalColiformAndEColiConcentrationMeasurement -feff -ffaa -ffeebaefa -FFF -fffe -fffff -Fi -filepath -fini -FixedLabel -flashdebug -FlowMeasurement -FluorideConcentrationMeasurement -focusable -forkpty -FOTA -FreeRTOS -FreeRTOSConfig -FS -fsl -fstab -fsync -ftd -fullclean -fuzzer -fuzzers -fuzztest -FW -gbl -gcloud -GDB -gdbgui -gdbserver -GeneralCommissioning -GeneralDiagnostics -generalised -GenericConfigurationManagerImpl -GenericConnectivityManagerImpl -GenericImpl -GenericPlatformManagerImpl -GenericThreadConfigurationManagerImpl -GenericThreadStackManagerImpl -GenericWiFiConfigurationManagerImpl -GetDeviceId -GetDeviceInfo -GetDns -getter -getters -GetInDevelopmentTests -GetIP -getManualTests -GetSafeAttributePersistenceProvider -getstarted -GH -ghcr -ghp -githubusercontent -gitignore -glibc -gn -GND -gni -GNinja -GNUARMEMB -gnueabihf -googleapis -googlesource -GPG -GPIO -GPL -GPLv -Gradle -gradlew -graphviz -Groupcast -GroupId -GroupKeyManagement -groupsettings -gsdk -gtk -GUA -Gv -gz -gzbf -HaloaceticAcidsConcentrationMeasurement -HandleCommand -hardcoded -hardknott -hardwarever -HardwareVersion -HardwareVersionString -hasValue -hci -hciattach -hciconfig -hdlc -HEPA -HKDF -HMAC -hoc -homebrew -HomePod -HomePods -hostapd -hostname -href -HSM -hsm -HTTPS -Humidistat -HW -hwadr -HydrogenConcentrationMeasurement -HydrogenSulphideConcentrationMeasurement -IasAce -IasWd -iaszone -ibb -ICA -ICAC -ICD -ICDs -iCloud -ICMP -IDF -IDL -IDLs -idt -idx -ifconfig -ifdef -ifdefs -IGMP -ihex -Illuminance -IlluminanceMeasurement -IM -imager -imagetool -imageUri -img -Impl -ImplClass -implementers -imx -imxlinux -incomingCommands -indexhtml -Inet -InetLayer -Infineon -ini -init -InitArgs -inlined -InputLoop -installDebug -instantiation -integrations -IntelliSense -InteractionModelEngine -InteractionModelVersion -Interoperable -introvideos -InvokeCommandRequests -InvokeCommandResponse -IoT -ipaddr -iPadOS -ipadr -IPK -ipp -iptables -iputils -IPv -ipykernel -ipynb -IPython -ISCAN -isHexString -isLowerCase -isUpperCase -itemName -iterable -itsfoss -JDK -jinja -JLink -JLinkExe -JLinkRTTClient -JN -jni -jpg -jre -js -json -JTAG -Jupyter -jupyterlab -KA -kAdminister -kbd -kBusy -kCase -Kconfig -kDacPublicKey -KeypadInput -keypair -keyset -kGroup -kInvalidCommandId -KitProg -kManage -kNewButton -kNodeIdNotSpecified -knownissues -kOperate -kPAKEParameterError -kPase -kView -KVS -kWindowNotOpen -LabelList -LabelStruct -launchable -LAUNCHXL -ldflags -LeadConcentrationMeasurement -LEDs -LevelControl -LF -libavahi -libc -libcairo -libCHIP -libdbus -LIBDIR -libegl -libffi -libfuzzer -libgirepository -libglib -libical -libncurses -libreadline -libsdl -libshell -libssl -libstdc -libthread -libtool -libTransportLayer -libudev -libwebkitgtk -lifecycle -lightbulb -lightin -LightingApp -LightingColor -LightingState -LinkSoftwareAndDocumentationPack -lladdr -LocalConfigDisabled -localedef -localhost -LocalizationConfiguration -localstatedir -LockingState -LogEvent -loopback -LowPower -LPC -LSP -LTE -LTS -LwIP -LwIP's -LZMA -macaddr -machineType -MacOS -MacOSX -MacPorts -Makefile -makefiles -MakeTpCall -mandir -ManganeseConcentrationMeasurement -ManualPairingCode -ManualTest -ManufacturingDate -masterkey -matterBuildSrcDir -matterc -MatterCustomTrace -matterd -MatterLock -MatterReportingAttributeChangeCallback -matterSdkSourceBuild -matterSourceBuildAbiFilters -matterUTestLib -maxApplicableSoftwareVersion -MaxInterval -MaxIntervalCeilingSeconds -maxLength -MaxRtrAdvInterval -maxValue -mbed -MbedCommissioning -MbedNewTarget -mbedos -mbedTarget -mbedTLS -MCORE -mcu -MCUboot -mcumgr -MCUs -mcux -MCUXpresso -mdash -MDNS -MediaInput -MediaPlayback -MediaTek -MEI -mem -memdf -MemMonitoring -menuconfig -MeshCoP -MeterIdentification -MfgDeviceCaCerts -MfgSpecificPing -mfrcacerts -mfrcert -MfrDeviceCert -MfrDeviceId -mgmt -microcontroller -microcontrollers -MicroSD -middleware -minApplicableSoftwareVersion -Minicom -MinInterval -MinIntervalFloorSeconds -minLength -MinRtrAdvInterval -minValue -mkdir -mlan -MLD -mmevk -moal -Mobly -ModeSelect -modprobe -Modustoolbox -moveMode -MoveToHue -MoveToLevel -MoveToSaturation -MoveWithOnOff -MPSL -MRP -MTD -MTR -MTU -Multiband -Multicast -multilib -Multiprotocol -multithreaded -mutex -mutexes -mv -MX -mydir -MyPASSWORD -MySSID -NAMESERVER -NAMESPACE -namespaces -namespacing -nano -natively -navpad -nbsp -NCP -ncs -nding -NDK -netcmp -netif -netplan -NetworkCommissioning -networkID -networkname -NewUDPEndPoint -nfds -NitricOxideConcentrationMeasurement -NitrogenDioxideConcentrationMeasurement -nl -nltest -nmcli -nmtui -noc -NodeId -nongnu -nordicsemi -NotAvailable -NotifyUpdateApplied -notValue -npm -nRF -nrfconnect -nrfdks -nrfutil -nrfxlib -NTAG -NTP -nullable -nullptr -NUM -NuttX -NVM -NVS -nwdiag -nwk -NXP -objcopy -OccupancySensing -OctetString -OECORE -OID -ol -Onboarding -onboardingcodes -oneshot -onnetwork -OnOff -OnOffClusterTest -OnOffSwitchConfiguration -OnPlatformEvent -onwards -OO -openiotsdk -openjdk -OpenOCD -OpenSSL -OpenThread -OpenThreadDemo -openweave -OperationalCredentials -operationalDataset -opkg -OPTIGA -optionMask -optionOverride -optionsMask -optionsOverride -orgs -OSS -OTA -OTADownloader -otaDownloadPath -otaImageList -OTAImageProcessorDriver -OTAImageProcessorImpl -OTAImageProcessorInterface -otaissues -OTAProvider -OTAProviderIpAddress -OTAProviderNodeId -otaproviders -OTAProviderSerialPort -OTARequesterImpl -OTARequestorDriver -OTARequestorInterface -OTARequestorSerialPort -OTARequestorStorage -otasoftwareupdateapp -OtaSoftwareUpdateProvider -otasoftwareupdaterequestor -otatesting -otaURL -OTBR -otcli -outform -outgoingCommands -overridable -OxygenConcentrationMeasurement -OzoneConcentrationMeasurement -PAA -PAAs -PacketBuffer -PAI -PairDevice -PAIs -PAKE -palletsprojects -PANID -pankore -param -params -PartNumber -PASE -Passcode -passRetained -passwd -PBKDF -pbuf -pbufs -pbxproj -PCA -pcap -pcaps -PDFs -PDK -PDM -peerAddrStr -peerNodeId -peerSessionId -pem -percentageLiftValue -perfetto -periodicQueryTimeout -pexpect -pickString -PICSCODE -PID -Pigweed -PinCode -pinrequest -PIXIT -PIXITs -pkgconfig -PKI -plaintext -PlatformManager -PlatformManagerImpl -plt -PluginServerCallback -png -Podman -PollControl -pollInterval -polymorphism -POSIX -PosixConfig -postAttributeChangeCallback -PowerConfiguration -PowerProfile -PowerSource -PowerSourceConfiguration -pre -preprocessor -Presetup -PressureMeasurement -prj -ProductID -ProductLabel -ProductName -ProductURL -proto -protobuf -protos -Prover -providerFabricIndex -ProviderLocation -providerNodeId -ProxyConfiguration -ProxyDiscovery -ProxyValid -ProxyView -PRs -PSA -PSCAN -PSECT -PSK -PSoC -PTR -pts -PulseWidthModulation -PumpConfigurationAndControl -pwd -PWM -PXXXF -py -pychip -pycrypto -pycryptodome -PyEval -PyFunction -pylint -PyObject -pypi -PyRun -pytest -QEMU -Qorvo -QPG -QRCode -qrcodetool -QRCodeUrl -QSPI -QueryImage -QueryImageResponse -queryImageStatus -Quickstart -qvCHIP -RADVD -raspberryPi -RasPi -rAv -RCAC -RCP -ReadAttribute -ReadConfigValue -readelf -readfds -README -READMEs -readonly -readthedocs -Reag -rebase -recommand -recommanded -recurse -regen -registerAttributeAccessOverride -RegisterCommandHandler -RelativeHumidityMeasurement -RemainAfterExit -remoteDeviceId -Rendez -RendezvousInformation -RendezvousParameters -RendezVousTest -REPL -repo -repos -req -Requestor -Requestor's -RequestorCanConsent -Requestors -responder -RestrictedEvent -retargeting -reusability -reviwed -rfid -rfids -RGB -riscv -rloc -rmw -rodata -Rollershade -rootfs -RPC -RPCs -RPi -RPi's -RPis -RSA -rsn -RSSI -RST -rsync -RTC -rtd -RTL -rtld -RTOS -RTT -RTX -runArgs -runIf -RUNAS -RunMain -runtime -RVC -rw -RXD -sandboxed -saveAs -saveDataVersschemaionAs -sbin -scalability -scalable -schema -schemas -scm -sco -scp -ScriptBinding -SDB -SDC -SDHC -SDK -SDK's -sdkconfig -SDKs -SDKTARGETSYSROOT -sdl -SecureCertDACProvider -SED -SEGGER -semver -SendButton -SendNewInputEvent -sendto -seqdiag -SERIALDEVICE -serialno -SerialNumber -ServiceId -SetDns -SetImageProcessorDelegate -SetOTADownloader -SetOtaRequestorDriver -setpin -setpoint -SetpointRaiseLower -SetRequestorInstance -SetUpPINCode -SetupQRCode -sexualized -sfv -SHA -ShadeConfiguration -SHAs -showDocumentation -showsdks -shubhamdp -SIGINT -SiLabs -Silabs's -SiliconLabs -SimpleFileExFlags -SimpleLink -SiWx -sizedb -sl -SLAAC -SLTB -SLWSTK -SmartThings -smoketest -SMP -socat -socio -SoCs -SodiumConcentrationMeasurement -softap -SoftDevice -softmmu -SoftwareDiagnostics -SoftwareVersion -softwareVersionStr -SoftwareVersionString -softwareVersionValid -SparkFun -sphinxcontrib -SPI -spiflash -spinel -src -SRP -SRV -SSBL -SSID -startoffset -StartScan -startsWith -StatusCode -stderr -stdout -sterm -stlink -stm -stmicroelectronics -storagepath -str -strcpy -struct -structs -su -Subclassing -subcommand -subcommands -subdirectories -subdirectory -subfolder -submodule -submodules -subnet -subprocess -SubscribeResponse -SubscriptionId -substeps -subtype -sudo -SulfateConcentrationMeasurement -SulfurDioxideConcentrationMeasurement -suppressResponse -svg -SVR -SWD -SWU -symlinks -sysbuild -sysconfdir -SysConfig -sysctl -sysdeps -SYSROOT -systemctl -systemd -systemdsystemunitdir -systemduserunitdir -systime -sysv -TargetNavigator -TBD -tbody -tcl -TCP -teardown -Telink -TemperatureMeasurement -templating -Tera -testability -TestArray -TestCluster -TestConstraints -TestEmptyString -TestEqualities -TestGenExample -TestGroupDemoConfig -TestMultiRead -TestName -TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke -TESTPASSWD -TestPICS -TESTSSID -TestString -TestStruct -TestThreadStackMgr -TestTimedRequestTimeout -TestUint -TestUpdateValue -testws -texinfo -textboxes -TFT -ThermostatUserInterfaceConfiguration -ThIsIsNoTMyReAlGiThUbToKeNSoDoNoTtRy -thread -ThreadNetworkDiagnostics -threadOperationalDataset -ThreadStackManager -ThreadStackManagerImpl -ths -Thunderboard -timedInteractionTimeoutMs -TimeFormatLocalization -timeframe -timeoutMs -TimeSynchronization -tinycrypt -Tizen -TKIP -TLS -tlsr -TLV -tmp -tngvndl -TODO -toJson -tokenization -tokenized -tokenizer -toolchain -toolchains -topologies -tos -TotalColiformBacteriaConcentrationMeasurement -totalTests -TotalTrihalomethanesConcentrationMeasurement -TPK -trackAlloc -trackFree -TransferSession -transitionTime -TransportMgrBase -TriggerEffect -TRNG -trustm -TrustedRootCertificates -tsan -TSG -tsv -TTL -tty -ttyACM -ttyACMx -ttymxc -ttyUSB -TurbidityConcentrationMeasurement -TvCasting -TVOC -tvOS -TXD -txt -uargument -UART -UDC -udcport -udhcpc -UDP -UDPEndPoint -udpPort -ug -ui -uint -ULA -Ultrafast -UNBLUR -uncommissioned -Unencrypted -unfocus -Unicast -UniFlash -UnitLocalization -unpair -unprovisioned -Unsecure -Unselect -untrusted -updateAvailable -updateNotAvailable -UpdateTokens -upstreamed -ureverse -URI -urlrequest -usbmodem -usbserial -USBtoUART -uscif -UserConsentNeeded -userConsentState -userguide -USERINTERFACE -UserLabel -usermod -usr -UTF -util -utils -UUID -ux -validator -valgrind -vcom -VCP -Vectorcall -VendorID -VendorName -vendorpayload -venv -ver -Verifier -Verifiers -VID -vids -virtualenv -visualstudio -vlatest -VLEDs -vm -vn -vnc -vous -VPN -VSC -VSCode -WaitNewInputEvent -WakeOnLan -WantedBy -watchdogTimeout -watchOS -webpage -wf -wg -wget -whde -whitespace -whitespaces -whl -wic -WiFiNetworkDiagnostics -WindowCovering -WindowCoveringGoToLiftPercentage -WiseMCU -wlan -wmm -WPA -wpan -wra -WriteAttribute -writefds -wrover -WS -WSL -WSTK -xa -xAAAA -xab -xaver -xb -xbef -xc -xcd -Xcode -xcodebuild -xcodeproj -xcworkspace -xd -xds -xdsdfu -xEA -xEB -xEC -xed -xef -xF -xFA -xFB -xFC -xFD -xFE -xFF -xFFF -xFFFF -xfffff -xFFFFFFEFFFFFFFFF -xtensa -xvzf -xwayland -xyz -xz -xzvf -yaml -yearday -yml -YNJV -Yocto -yoctoproject -YourFolder -zapt -zaptool -ZCL -zclconfigure -zclread -zclsubscribe -zclwrite -ZephyrConfig -zephyrproject -zhengyaohan -Zigbee -zigbeealliance -zigbeethread diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index b8ab010a1d..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# Current reviewers-XXX teams, who review everything for approval. -* @reviewers-amazon @reviewers-apple @reviewers-comcast @reviewers-google @reviewers-lg @reviewers-nordic @reviewers-samsung @reviewers-silabs @reviewers-tcl diff --git a/.github/ISSUE_TEMPLATE/001-bug-report.yaml b/.github/ISSUE_TEMPLATE/001-bug-report.yaml deleted file mode 100644 index 8944e002c5..0000000000 --- a/.github/ISSUE_TEMPLATE/001-bug-report.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: "\U0001F41B Bug report" -description: Create a report to help Matter -title: "[BUG] " -labels: [bug, "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" - validations: - required: true - - type: input - attributes: - label: GitHub hash of the SDK that was being used - description: Hash of the GitHub SDK used - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf - - python - - raspi - - vscode - - windows - - other - - core - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.0.1, N/A" - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for submitting a bug!" diff --git a/.github/ISSUE_TEMPLATE/002-1.0-issue.yaml b/.github/ISSUE_TEMPLATE/002-1.0-issue.yaml deleted file mode 100644 index 10551fef60..0000000000 --- a/.github/ISSUE_TEMPLATE/002-1.0-issue.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: "\u0030\u20e3 1.0 Issue" -description: Create an issue that is required for Matter 1.0 release -title: "[1.0] " -labels: [bug, "V1.0", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" - validations: - required: true - - type: input - attributes: - label: GitHub hash of the SDK that was being used - description: Hash of the GitHub SDK used - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.0.1, N/A" - - type: dropdown - attributes: - label: Type - description: What type of issue is this? - multiple: true - options: - - Test Improvement - - Common Cluster Logic - - Spec Compliance Issue - - Security Issue - - Platform Issue - - Core SDK Memory Issue - - Core SDK Crash - - Core SDK Performance Improvement - - Core SDK Interopability Issue - validations: - required: true - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping us get to 1.0!" diff --git a/.github/ISSUE_TEMPLATE/003-1.1-issue.yaml b/.github/ISSUE_TEMPLATE/003-1.1-issue.yaml deleted file mode 100644 index 50db3e80a9..0000000000 --- a/.github/ISSUE_TEMPLATE/003-1.1-issue.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: "\u0031\u20e3 1.1 Issue" -description: Create an issue that is required for Matter 1.1 release -title: "[1.1] " -labels: [bug, "V1.1", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" - validations: - required: true - - type: input - attributes: - label: GitHub hash of the SDK that was being used - description: Hash of the GitHub SDK used - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.1, N/A" - - type: dropdown - attributes: - label: Type - description: What type of issue is this? - multiple: true - options: - - Test Improvement - - Common Cluster Logic - - Spec Compliance Issue - - Security Issue - - Platform Issue - - Core SDK Memory Issue - - Core SDK Crash - - Core SDK Performance Improvement - - Core SDK Interopability Issue - validations: - required: true - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping us get to 1.1!" diff --git a/.github/ISSUE_TEMPLATE/004-1.2-issue.yaml b/.github/ISSUE_TEMPLATE/004-1.2-issue.yaml deleted file mode 100644 index 81b641a52e..0000000000 --- a/.github/ISSUE_TEMPLATE/004-1.2-issue.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: "\u0032\u20e3 1.2 Issue" -description: Create an issue that is required for Matter 1.2 release -title: "[1.2] " -labels: [bug, "V1.2", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" - validations: - required: true - - type: input - attributes: - label: GitHub hash of the SDK that was being used - description: Hash of the GitHub SDK used - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.2, N/A" - - type: dropdown - attributes: - label: Type - description: What type of issue is this? - multiple: true - options: - - Test Improvement - - Common Cluster Logic - - Spec Compliance Issue - - Security Issue - - Platform Issue - - Core SDK Memory Issue - - Core SDK Crash - - Core SDK Performance Improvement - - Core SDK Interopability Issue - validations: - required: true - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping us get to 1.2!" diff --git a/.github/ISSUE_TEMPLATE/005-1.3-issue.yaml b/.github/ISSUE_TEMPLATE/005-1.3-issue.yaml deleted file mode 100644 index 5c91f91e75..0000000000 --- a/.github/ISSUE_TEMPLATE/005-1.3-issue.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: "\u0033\u20e3 1.3 Issue" -description: Create an issue that is required for Matter 1.3 release -title: "[1.3] " -labels: [bug, "V1.3", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" - validations: - required: true - - type: input - attributes: - label: GitHub hash of the SDK that was being used - description: Hash of the GitHub SDK used - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.3, N/A" - - type: dropdown - attributes: - label: Type - description: What type of issue is this? - multiple: true - options: - - Test Improvement - - Common Cluster Logic - - Spec Compliance Issue - - Security Issue - - Platform Issue - - Core SDK Memory Issue - - Core SDK Crash - - Core SDK Performance Improvement - - Core SDK Interopability Issue - validations: - required: true - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping us get to 1.3!" diff --git a/.github/ISSUE_TEMPLATE/049-trivial-fix.yaml b/.github/ISSUE_TEMPLATE/049-trivial-fix.yaml deleted file mode 100644 index 7c82d950e9..0000000000 --- a/.github/ISSUE_TEMPLATE/049-trivial-fix.yaml +++ /dev/null @@ -1,93 +0,0 @@ -name: "\U0001F3C3 Trivial Fix" -description: Create an issue for a trivial fix -title: "[Trivial] " -labels: [bug, "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to submit a trivial fix, can you please please help us understand this change in this quick form? - - type: dropdown - attributes: - label: Type - description: What type of trivial fix is this? - multiple: true - options: - - Comment fix - - Typo fix - - Rename - - Other - validations: - required: true - - type: textarea - id: repro - attributes: - label: Explanation - description: "(Optional) If other, why do you think this is trivial?" - validations: - required: false - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - all - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.0.1, N/A" - - type: dropdown - attributes: - label: Testing - description: How was this tested? - multiple: true - options: - - Unit tested - - YAML tested - - Manually tested with SDK - - CI tested - - Hardware validated - - Platform validated - validations: - required: true - - type: textarea - attributes: - label: (Optional) If manually tested please explain why this is only manually tested - description: | - Please explain how you tested it - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about this! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for submitting a trivial issue!" diff --git a/.github/ISSUE_TEMPLATE/050-tooling-fix.yaml b/.github/ISSUE_TEMPLATE/050-tooling-fix.yaml deleted file mode 100644 index 0d775a61ef..0000000000 --- a/.github/ISSUE_TEMPLATE/050-tooling-fix.yaml +++ /dev/null @@ -1,88 +0,0 @@ -name: "\U0001F9F0 Tooling Fix/Feature" -description: Create an issue for a tooling specific fix/feature -title: "[Tooling] " -labels: ["tools", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to submit a an issue for our tooling, can you please please help us understand this change in this quick form? - - type: textarea - id: repro - attributes: - label: Reproduction steps / Feature - description: "How do you trigger this issue and/or can you please explain this new feature? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.0.1, N/A" - - type: dropdown - attributes: - label: Type - description: How was this tested? - multiple: true - options: - - Unit tested - - YAML tested - - Manually tested with SDK - - CI tested - - Hardware validated - - Platform validated - validations: - required: true - - type: textarea - attributes: - label: (Optional) If manually tested please explain why this is only manually tested - description: | - Please explain how you tested it - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about this! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for help our tooling!" diff --git a/.github/ISSUE_TEMPLATE/060-platform-fix.yaml b/.github/ISSUE_TEMPLATE/060-platform-fix.yaml deleted file mode 100644 index fdb8b76d88..0000000000 --- a/.github/ISSUE_TEMPLATE/060-platform-fix.yaml +++ /dev/null @@ -1,88 +0,0 @@ -name: "\U0001F3D7 Platform Fix" -description: Create an issue for a platform specific fix -title: "[Platform] " -labels: ["platform", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to submit a an issue for a platform, can you please please help us understand this change in this quick form? - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this issue? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.0.1, N/A" - - type: dropdown - attributes: - label: Type - description: How was this tested? - multiple: true - options: - - Unit tested - - YAML tested - - Manually tested with SDK - - CI tested - - Hardware validated - - Platform validated - validations: - required: true - - type: textarea - attributes: - label: (Optional) If manually tested please explain why this is only manually tested - description: | - Please explain how you tested it - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about this! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for submitting a platform issue!" diff --git a/.github/ISSUE_TEMPLATE/080-feature-request.yaml b/.github/ISSUE_TEMPLATE/080-feature-request.yaml deleted file mode 100644 index c83b0c22ac..0000000000 --- a/.github/ISSUE_TEMPLATE/080-feature-request.yaml +++ /dev/null @@ -1,62 +0,0 @@ -name: "\U0001F4A1 Feature Request" -description: Create an feature to be considered future release -title: "[Feature] " -labels: ["feature work", "feature request", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for submitting a feature request to the Matter SDK! We need information about the feature to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Feature description - description: "What feature are you looking to add? Please walk us through it!" - value: | - ... - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - all - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.0.1, N/A" - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for submitting a new feature request." diff --git a/.github/ISSUE_TEMPLATE/090-sve-issue.yaml b/.github/ISSUE_TEMPLATE/090-sve-issue.yaml deleted file mode 100644 index 6ea6534123..0000000000 --- a/.github/ISSUE_TEMPLATE/090-sve-issue.yaml +++ /dev/null @@ -1,119 +0,0 @@ -name: "\U0001F9EA SVE Issue" -description: Create an issue that is required for SVE -title: "[SVE] " -labels: [bug, "sve", "request sve", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" - validations: - required: true - - type: input - attributes: - label: GitHub hash of the SDK that was being used - description: Hash of the GitHub SDK used - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - validations: - required: true - - type: input - id: platform-versions - attributes: - label: Platform Version(s) - description: "What platform version(s) are affected [optional]" - placeholder: "eg: 1.0.1, N/A" - - type: dropdown - attributes: - label: Type - description: What type of issue is this? - multiple: true - options: - - Test Improvement - - Common Cluster Logic - - Spec Compliance Issue - - Security Issue - - Platform Issue - - Core SDK Memory Issue - - Core SDK Crash - - Core SDK Performance Improvement - - Core SDK Interopability Issue - validations: - required: true - - type: dropdown - attributes: - label: Testing - description: How was this tested? - multiple: true - options: - - Unit tested - - YAML tested - - Manually tested with SDK - - CI tested - - Hardware validated - - Platform validated - validations: - required: true - - type: textarea - attributes: - label: (Optional) If manually tested please explain why this is only manually tested - description: | - Please explain how you tested it - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping our SVE!" diff --git a/.github/ISSUE_TEMPLATE/091-cert-blocker.yaml b/.github/ISSUE_TEMPLATE/091-cert-blocker.yaml deleted file mode 100644 index 659135117d..0000000000 --- a/.github/ISSUE_TEMPLATE/091-cert-blocker.yaml +++ /dev/null @@ -1,108 +0,0 @@ -name: "\U0001F4DC Test Case Failure / Cert Blocker" -description: Create a report to identify matter certification test failures -title: "[CERT-TEST-FAILURE] " -labels: [bug, "cert blocker", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the cert blocker to follow up, so please help us out by filling out this information. - - type: dropdown - attributes: - label: Feature Area - description: What feature area is the test failing in? - multiple: true - options: - - Area:AirPurifiers - - Area:AirQualitySensor - - Area:ConcentrationMeasurement - - Area:DeviceAppearance - - Area:Dishwashers - - Area:DoorLockEnhancements - - Area:EventList - - Area:ICDPhase2 - - Area:ModeSelect - - Area:OperationalState - - Area:Refrigerators - - Area:RobotVacuums - - Area:RoomAirConditioner - - Area:Scenes - - Area:SmokeCO2 - - Area:TemperatureControlledCabinet - - Area:TimeSync - - Other - validations: - required: true - - type: input - id: testcase - attributes: - label: Test Case - description: "Which test case is failing?" - placeholder: "TC-XXXX" - validations: - required: true - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." - placeholder: | - Please list reproduction steps step by step. - Place shell commands between ```. - Attach logs as files instead of pasting them in. - 1. - 2. - 3. - ... - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" - validations: - required: true - - type: input - attributes: - label: GitHub hash of the SDK that was being used - description: Hash of the GitHub SDK used - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf - - python - - raspi - - vscode - - windows - - other - - core - validations: - required: true - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for submitting a test case/cert blocker!" diff --git a/.github/ISSUE_TEMPLATE/097-ci-test-failure.yaml b/.github/ISSUE_TEMPLATE/097-ci-test-failure.yaml deleted file mode 100644 index a99f5a6361..0000000000 --- a/.github/ISSUE_TEMPLATE/097-ci-test-failure.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: "\U0001F6E0 Test Issue" -description: Test issue -title: "[Test Failed] " -labels: ["build issue", "needs triage", "tests"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK's tests! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Test issue(s) - description: "What are the tests that failed? Please include links to failed jobs if possible." - value: | - 1. - 2. - 3. - ... - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - - all - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping improve our tests" diff --git a/.github/ISSUE_TEMPLATE/098-build-issue.yaml b/.github/ISSUE_TEMPLATE/098-build-issue.yaml deleted file mode 100644 index 5d1adb3554..0000000000 --- a/.github/ISSUE_TEMPLATE/098-build-issue.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: "\U0001F6E0 Build Issue" -description: Build issue -title: "[Build] " -labels: ["build issue", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK's builds! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Build issue(s) - description: "What are the build issues? Please include links to failed jobs if possible." - value: | - 1. - 2. - 3. - ... - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - - all - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping improve our builds" diff --git a/.github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml b/.github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml deleted file mode 100644 index eefa5f0f98..0000000000 --- a/.github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: "\U0001F477 GitHub / CI / Workflow" -description: Create an issue to improve CI / Workflows -title: "[Workflow] " -labels: ["workflows", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK's workflows! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Workflow issues - description: "What updates to the workflows are needed?" - value: | - 1. - 2. - 3. - ... - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - - all - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping improve our development workflows" diff --git a/.github/ISSUE_TEMPLATE/100-documentation-issue.yaml b/.github/ISSUE_TEMPLATE/100-documentation-issue.yaml deleted file mode 100644 index 51971d1d01..0000000000 --- a/.github/ISSUE_TEMPLATE/100-documentation-issue.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: "\U0001F5BA Documentation Issue" -description: Create an issue to improve documentation -title: "[Documentation] " -labels: ["documentation", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. - - type: textarea - id: repro - attributes: - label: Documentation issues - description: "What updates to documentation are needed?" - value: | - 1. - 2. - 3. - ... - validations: - required: true - - type: dropdown - attributes: - label: Platform - description: What platforms are affected? - multiple: true - options: - - ameba - - android - - cc13x2_cc26x2 - - darwin - - efr32 - - esp32 - - freeRTOS - - IMX8 - - k32w - - nrf connect - - nrf - - python - - raspi - - vscode - - windows - - other - - core (please add to version below) - validations: - required: false - - type: textarea - attributes: - label: Anything else? - description: | - Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. - validations: - required: false - - type: markdown - attributes: - value: "Thanks for helping improve our documentation." diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml deleted file mode 100644 index 3ba13e0cec..0000000000 --- a/.github/ISSUE_TEMPLATE/config.yaml +++ /dev/null @@ -1 +0,0 @@ -blank_issues_enabled: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index dad1d2c646..0000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,12 +0,0 @@ -> !!!!!!!!!! Please delete the instructions below and replace with PR description -> -> If you have an issue number, please use a syntax of -> `Fixes #12345` and a brief change description -> -> If you do not have an issue number, please have a good description of -> the problem and the fix. Help the reviewer understand what to expect. -> -> Make sure you delete these instructions (to prove you have read them). -> -> !!!!!!!!!! Instructions end - diff --git a/.github/actions/bootstrap-cache/action.yaml b/.github/actions/bootstrap-cache/action.yaml deleted file mode 100644 index f5ed24ba3f..0000000000 --- a/.github/actions/bootstrap-cache/action.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Bootstrap cache -description: Bootstrap cache (deprecated) -runs: - using: "composite" - steps: - - uses: Wandalen/wretry.action@v1.4.10 - name: Bootstrap cache - continue-on-error: true - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**', '/etc/lsb-release') }} - path: | - .environment - build_overrides/pigweed_environment.gni diff --git a/.github/actions/bootstrap/action.yaml b/.github/actions/bootstrap/action.yaml deleted file mode 100644 index ea06ceed7b..0000000000 --- a/.github/actions/bootstrap/action.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: Bootstrap -description: Bootstrap -inputs: - platform: - description: "Platform name" - required: false - default: none - bootstrap-log-name: - description: "Bootstrap log name" - required: false - default: bootstrap-logs-${{ github.job }} -outputs: - cache-hit: - description: "Bootstrap environment was restored from cache" - value: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit }} # dynamic action returns all outputs in `outputs` - -runs: - using: "composite" - steps: - - name: Determine bootstrap cache configuration - id: prepare - shell: bash - run: | - # Determine bootstrap cache configuration - # In addition to the various setup files, the work directory matters as well, - # because the bootstrapped Pigweed environment contains absolute paths. - echo "Calculating bootstrap cache key for '$PWD'" - FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}" - case "$RUNNER_OS" in - macOS) OS_HASH="$(sw_vers | shasum -a 256 | cut -d' ' -f1)";; - *) OS_HASH="$(shasum -a 256 /etc/lsb-release | cut -d' ' -f1)";; - esac - PYTHON_HASH="$(python --version | shasum -a 256 | cut -d' ' -f1)" - FINAL_HASH="$(echo "$PWD:$FILES_HASH:$OS_HASH:$PYTHON_HASH" | shasum -a 256 | cut -d' ' -f1)" - echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT" - - # Split caches across backends - case "$RUNNER_OS" in - macOS) echo backend=actions;; - *) echo backend=buildjet;; - esac | tee -a "$GITHUB_OUTPUT" - - - name: Bootstrap from cache - id: restore - uses: ./.github/actions/dynamic - continue-on-error: true - with: - action: ${{ steps.prepare.outputs.backend }}/cache/restore@v4 - with: | - key: ${{ steps.prepare.outputs.key }} - path: | - .environment - build_overrides/pigweed_environment.gni - - - name: Run bootstrap - if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }} - env: - PW_NO_CIPD_CACHE_DIR: 1 - PW_ENVSETUP_NO_BANNER: 1 - shell: bash - run: source scripts/bootstrap.sh -p all,${{ inputs.platform }} - - - name: Save bootstrap cache - uses: ./.github/actions/dynamic - if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }} - continue-on-error: true - with: - action: ${{ steps.prepare.outputs.backend }}/cache/save@v4 - with: | - key: ${{ steps.prepare.outputs.key }} - path: | - .environment - build_overrides/pigweed_environment.gni - - - name: Upload bootstrap logs - uses: actions/upload-artifact@v4 - if: ${{ always() && !env.ACT && fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }} - with: - name: ${{ inputs.bootstrap-log-name }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log diff --git a/.github/actions/checkout-submodules-and-bootstrap/action.yaml b/.github/actions/checkout-submodules-and-bootstrap/action.yaml deleted file mode 100644 index df3fdff1e0..0000000000 --- a/.github/actions/checkout-submodules-and-bootstrap/action.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Checkout submodules & Bootstrap -description: Checkout submodules & Bootstrap -inputs: - platform: - description: "Platform name" - required: true - extra-submodule-parameters: - description: "extra submodule parameters" - required: false - default: "" - bootstrap-log-name: - description: "Bootstrap log name" - required: false - default: bootstrap-logs-${{ github.job }} -runs: - using: "composite" - steps: - - name: Maximize runner disk - uses: ./.github/actions/maximize-runner-disk - - name: Dump disk info - uses: ./.github/actions/dump-disk-info - - name: Set git safe directory for local act runs - uses: ./.github/actions/git-safe-directory - - name: Checkout submodules - uses: ./.github/actions/checkout-submodules - with: - platform: ${{ inputs.platform }} - extra-parameters: ${{ inputs.extra-submodule-parameters }} - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - platform: ${{ inputs.platform }} - bootstrap-log-name: ${{ inputs.bootstrap-log-name }} - - name: Dump disk info after checkout submodule & Bootstrap - shell: bash - run: scripts/dump_diskspace_info.sh - - name: Work around TSAN ASLR issues - if: runner.os == 'Linux' && !env.ACT - shell: bash - run: | - # See https://stackoverflow.com/a/77856955/2365113 - if [[ "$UID" == 0 ]]; then function sudo() { "$@"; }; fi - sudo sysctl vm.mmap_rnd_bits=28 diff --git a/.github/actions/checkout-submodules/action.yaml b/.github/actions/checkout-submodules/action.yaml deleted file mode 100644 index e180a8c494..0000000000 --- a/.github/actions/checkout-submodules/action.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Checkout submodules -description: Checkout submodules -inputs: - extra-parameters: - description: "extra parameters" - required: false - default: "" - platform: - description: "Platform name" - required: true -runs: - using: "composite" - steps: - - uses: Wandalen/wretry.action@v1.4.10 - name: Checkout submodules - with: - command: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }} - attempt_limit: 3 - attempt_delay: 2000 diff --git a/.github/actions/dump-disk-info/action.yaml b/.github/actions/dump-disk-info/action.yaml deleted file mode 100644 index 1f6474e54c..0000000000 --- a/.github/actions/dump-disk-info/action.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Dump disk space info -description: Help debug running out of disk space on github CI -runs: - using: "composite" - steps: - - name: Collect disk info - # Unfortunately current syntax for github wrapper actions only work for - # Javascript actions, and Docker container actions, which doesn't make it - # possible to wrap a shell script like the one below. The action below - # essentially wraps the shell commands we want to run into a Javascript - # wrapped action. This allow us to get the disk info usage before a job - # is run and after the job is run regardless if the job succeeds or - # fails. - uses: pyTooling/Actions/with-post-step@v0.4.5 - if: ${{ runner.os == 'Linux' }} - with: - main: |- - exec ./scripts/dump_diskspace_info.sh - post: |- - exec ./scripts/dump_diskspace_info.sh \ No newline at end of file diff --git a/.github/actions/dynamic/action.yaml b/.github/actions/dynamic/action.yaml deleted file mode 100644 index 7cee233c4f..0000000000 --- a/.github/actions/dynamic/action.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Dynamic -description: Dynamically resolves another GitHub action -inputs: - action: - description: Action reference - required: true - with: - description: Action inputs as multi-line YAML string - required: false - default: "" -outputs: - outputs: - description: JSON object of outputs from the action - value: ${{ steps.run.outputs.outputs }} -runs: - using: composite - steps: - - name: Instantiate - shell: bash - run: | - # Dynamically invoke ${{ inputs.action }} - with='${{ inputs.with }}' - [[ -z "$with" ]] || with="$(echo ' with:'; sed -e 's/^/ /' <<<"$with")" - mkdir -p ./.tmp/dynamic-action-instance - cat <./.tmp/dynamic-action-instance/action.yaml - runs: - using: composite - steps: - - id: run - uses: ${{ inputs.action }} - $with - outputs: - outputs: - value: $(echo '$'){{ toJSON(steps.run.outputs) }} - END - - name: Run - id: run - uses: ./.tmp/dynamic-action-instance diff --git a/.github/actions/git-safe-directory/action.yaml b/.github/actions/git-safe-directory/action.yaml deleted file mode 100644 index 1308c4ea1b..0000000000 --- a/.github/actions/git-safe-directory/action.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: Git safe directory -description: For running act with checkout owned by non-root user -runs: - using: "composite" - steps: - - name: Set git safe.directory to "*" - if: ${{ env.ACT }} - shell: bash - run: git config --system --add safe.directory '*' \ No newline at end of file diff --git a/.github/actions/maximize-runner-disk/action.yaml b/.github/actions/maximize-runner-disk/action.yaml deleted file mode 100644 index d71ba3646d..0000000000 --- a/.github/actions/maximize-runner-disk/action.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: Maximize runner disk -description: Free up disk space on the github runner -runs: - using: "composite" - steps: - - name: Free up disk space on the github runner - if: runner.os == 'Linux' && !env.ACT - shell: bash - run: | - # maximize-runner-disk - # Directories to prune to free up space. Candidates: - # 1.6G /usr/share/dotnet - # 1.1G /usr/local/lib/android/sdk/platforms - # 1000M /usr/local/lib/android/sdk/build-tools - # 8.9G /usr/local/lib/android/sdk - # This list can be amended later to change the trade-off between the amount of - # disk space freed up, and how long it takes to do so (deleting many files is slow). - prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools) - - if [[ "$UID" -eq 0 && -d /__w ]]; then - root=/runner-root-volume - if [[ ! -d "$root" ]]; then - echo "Unable to maximize disk space, job is running inside a container and $root is not mounted" - exit 0 - fi - function sudo() { "$@"; } # we're already root (and sudo is probably unavailable) - elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then - root= - else - echo "Unable to maximize disk space, unknown runner environment" - exit 0 - fi - - echo "Freeing up runner disk space on ${root:-/}" - function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; } - function now() { date '+%s'; } - before="$(avail)" start="$(now)" - for dir in "${prune[@]}"; do - if [[ -d "${root}${dir}" ]]; then - echo "- $dir" - # du -sh -- "${root}${dir}" - sudo rm -rf -- "${root}${dir}" - else - echo "- $dir (not found)" - fi - done - after="$(avail)" end="$(now)" - echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds." diff --git a/.github/actions/perform-codeql-analysis/action.yaml b/.github/actions/perform-codeql-analysis/action.yaml deleted file mode 100644 index f1caf10dc3..0000000000 --- a/.github/actions/perform-codeql-analysis/action.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Run CodeQL Analysis -description: Run and upload CodeQL Analysis -inputs: - language: - description: "language for codeql analysis" - required: true -runs: - using: "composite" - steps: - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{ inputs.language }}" - upload: False - output: sarif-results - - name: filter-sarif - uses: advanced-security/filter-sarif@v1 - with: - patterns: | - -**/third_party/** - -**/scripts/** - input: "sarif-results/${{ inputs.language }}.sarif" - output: "sarif-results/${{ inputs.language }}.sarif" - - - name: Upload SARIF - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: "sarif-results/${{ inputs.language }}.sarif" - - name: Upload loc as a Build Artifact - uses: actions/upload-artifact@v4 - with: - name: sarif-results - path: sarif-results - retention-days: 1 diff --git a/.github/actions/setup-size-reports/action.yaml b/.github/actions/setup-size-reports/action.yaml deleted file mode 100644 index 511a434242..0000000000 --- a/.github/actions/setup-size-reports/action.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: Setup size reports -description: Setup size reports -inputs: - gh-context: - description: "GH Context" - required: true - -runs: - using: "composite" - steps: - - name: Set up environment for size reports - shell: bash - env: - GH_CONTEXT: ${{ inputs.gh-context }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" diff --git a/.github/actions/upload-size-reports/action.yaml b/.github/actions/upload-size-reports/action.yaml deleted file mode 100644 index 41fe8c820c..0000000000 --- a/.github/actions/upload-size-reports/action.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: upload-size-reports -description: upload-size-reports -inputs: - platform-name: - description: "Platform name Name" - required: true - -runs: - using: "composite" - steps: - - name: Uploading Size Reports - uses: actions/upload-artifact@v4 - if: ${{ !env.ACT }} - with: - name: Size,${{ inputs.platform-name }}-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml deleted file mode 100644 index c6fa9bcf94..0000000000 --- a/.github/boring-cyborg.yml +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright (c) 2020 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. -labelPRBasedOnFilePath: - ############################################################ - # Top Level Labels - ############################################################ - repo: - - ./* - - ############################################################ - # Examples - ############################################################ - examples: - - examples/* - - ############################################################ - # Documentation - ############################################################ - documentation: - - docs/* - - ############################################################ - # Tools + Development Items - ############################################################ - scripts: - - scripts/* - - integrations: - - integrations/* - - vscode: - - .vscode - - .devcontainer - - gn: - - gn/* - - github: - - .github - - workflows: - - .github/workflows/* - - tools: - - tools/* - - ############################################################ - # Source Code - ############################################################ - qr code: - - src/qrcode/* - - lwip: - - src/lwip/* - - inet: - - src/inet/* - - config: - - config/* - - lib: - - src/lib/* - - crypto: - - src/crypto/* - - controller: - - src/controller/* - - ble: - - src/ble/* - - app: - - src/app/* - - transport: - - src/transport/* - - system: - - src/system/* - - setup payload: - - src/setup_payload/* - - ############################################################ - # Platforms - ############################################################ - platform: - - src/platform/* - - darwin: - - src/platform/Darwin/* - - src/darwin/* - - efr32: - - src/platform/silabs/* - - esp32: - - src/platform/ESP32/* - - freeRTOS: - - src/platform/FreeRTOS/* - - k32w: - - src/platform/K32W/* - - linux: - - src/platform/Linux/* - - nrf connect: - - src/platform/nrfconnect/* - - openthread: - - src/platform/openthread/* - - zephyr: - - src/platform/Zephyr/* - - telink: - - src/platform/telink/* diff --git a/.github/config.yml b/.github/config.yml deleted file mode 100644 index 027b4dc4e4..0000000000 --- a/.github/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -todo: - keyword: ["@todo", "TODO", "TODO:"] # string|string[] - bodyKeyword: ["@body", "BODY", "BODY:"] # string|string[] - blobLines: 10 # number|boolean, 0 or false to disable - autoAssign: true # string|string[]|boolean - label: ["todo"] # boolean|string|string[] - reopenClosed: true # boolean - exclude: ".*lint\\.yaml|.*/(zzz_generated|zap-generated)/.*" # string diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8c618416fb..0000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,61 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "gradle" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "gitsubmodule" - directory: "/" - schedule: - interval: "weekly" - allow: - - dependency-name: "third_party/pigweed/repo" - - dependency-name: "third_party/mbedtls/repo" - - dependency-name: "third_party/openthread/repo" - - - dependency-name: "third_party/ameba/repo" - - dependency-name: "third_party/android_deps/repo" - - dependency-name: "third_party/asr/repo" - - dependency-name: "third_party/boringssl/repo" - - dependency-name: "third_party/bouffalolab/repo" - - dependency-name: "third_party/cirque/repo" - - dependency-name: "third_party/editline/repo" - - dependency-name: "third_party/freertos/repo" - - dependency-name: "third_party/imgui/repo" - - dependency-name: "third_party/infineon/repo" - - dependency-name: "third_party/inipp/repo" - - dependency-name: "third_party/java_deps/repo" - - dependency-name: "third_party/jlink/repo" - - dependency-name: "third_party/jsoncpp/repo" - - dependency-name: "third_party/libwebsockets/repo" - - dependency-name: "third_party/lwip/repo" - - dependency-name: "third_party/mbed-mcu-boot/repo" - - dependency-name: "third_party/mbed-os-cypress-capsense-button/repo" - - dependency-name: "third_party/mbed-os-posix-socket/repo" - - dependency-name: "third_party/mbedtls/repo" - - dependency-name: "third_party/mt793x_sdk/repo" - - dependency-name: "third_party/mynewt-core/repo" - - dependency-name: "third_party/nanopb/repo" - - dependency-name: "third_party/nlassert/repo" - - dependency-name: "third_party/nlfaultinjection/repo" - - dependency-name: "third_party/nlio/repo" - - dependency-name: "third_party/nxp/repo" - - dependency-name: "third_party/open-iot-sdk/repo" - - dependency-name: "third_party/ot-br-posix/repo" - - dependency-name: "third_party/perfetto/repo" - - dependency-name: "third_party/qpg_sdk/repo" - - dependency-name: "third_party/silabs/repo" - - dependency-name: "third_party/simw-top-mini/repo" - - dependency-name: "third_party/ti_simplelink_sdk/repo" - - dependency-name: "third_party/tizen/repo" diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml deleted file mode 100644 index 909ef045c0..0000000000 --- a/.github/issue-labeler.yml +++ /dev/null @@ -1,54 +0,0 @@ -darwin: - # Make sure we don't match random words that contain "mac" inside. - # - # Make sure we don't match random words that contain "ios" inside - # (like "kiosk" or whatnot), but do allow matching "ios8" and things - # like that. - # - # Make sure we don't trigger for the string "MAC", which almost - # certainly has nothing to do with Darwin. - # - # \\b means "word boundary" - # (?![a-z]) means "there is no next char in the range a-z". - - "/(\\b[Ii][Oo][Ss](?![a-zA-Z])|[Hh][Oo][Mm][Ee][Pp][Oo][Dd]|[Dd][Aa][Rr][Ww][Ii][Nn]|\\bm[Aa][Cc]\\b|\\bMa[Cc]\\b|\\bM[Aa]c\\b|[Mm][Aa][Cc][Oo][Ss])/" - -linux: - - "/(linux)/i" - -# Special Keywords for Cert Blockers -air purifiers: - - "(Area:AirPurifiers)" -air quality sensors: - - "(Area:AirQualitySensor)" -concentration measurement: - - "(Area:ConcentrationMeasurement)" -device appearance: - - "(Area:DeviceAppearance)" -dishwashers: - - "(Area:Dishwashers)" -door lock enhancements: - - "(Area:DoorLockEnhancements)" -event list: - - "(Area;EventList)" -icd: - - "(Area:ICDPhase2)" -icd phase 2: - - "(Area:ICDPhase2)" -mode select: - - "(Area:ModeSelect)" -operational state: - - "(Area:OperationalState)" -refrigerators: - - "(Area:Refrigerators)" -robot vacuums: - - "(Area:RobotVacuums)" -room air conditioners: - - "(Area:RoomAirConditioner)" -scenes: - - "(Area:Scenes)" -smoke & c02: - - "(Area:SmokeCO2)" -temperature controlled cabinet: - - "(Area:TemperatureControlledCabinet)" -time sync: - - "(Area:TimeSync)" diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 7e02fe6d36..0000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,333 +0,0 @@ -# Copyright (c) 2020 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. - -############################################################ -# Top Level Labels -############################################################ -repo: - - changed-files: - - any-glob-to-any-file: - - './*' - -############################################################ -# Examples -############################################################ -examples: - - changed-files: - - any-glob-to-any-file: - - examples/* - - examples/**/* - -############################################################ -# Documentation -############################################################ -documentation: - - changed-files: - - any-glob-to-any-file: - - docs/* - - docs/**/* - - "*.md" - -############################################################ -# Tools + Development Items -############################################################ -scripts: - - changed-files: - - any-glob-to-any-file: - - scripts/* - - scripts/**/* - -integrations: - - changed-files: - - any-glob-to-any-file: - - integrations/* - - integrations/**/* - -docker: - - changed-files: - - any-glob-to-any-file: - - integrations/docker/* - - integrations/docker/**/* - -vscode: - - changed-files: - - any-glob-to-any-file: - - .vscode/* - - .vscode/**/* - - .devcontainer/* - - .devcontainer/**/* - -gn: - - changed-files: - - any-glob-to-any-file: - - build/* - - build/**/* - - build_overrides/* - - build_overrides/**/* - - .gn - - "*.gn" - - "*.gni" - -github: - - changed-files: - - any-glob-to-any-file: - - .github - - .github/* - - .github/**/* - -workflows: - - changed-files: - - any-glob-to-any-file: - - .github/workflows/* - - .github/workflows/**/* - -tools: - - changed-files: - - any-glob-to-any-file: - - src/tools/* - - src/tools/**/* - - tools/* - - tools/**/* - - examples/chip-tool/* - - examples/chip-tool/**/* - -############################################################ -# Tests -############################################################ -tests: - - changed-files: - - any-glob-to-any-file: - - src/python_testing/* - - src/python_testing/**/* - - src/app/tests/* - - src/app/tests/**/* - -test driver: - - changed-files: - - any-glob-to-any-file: - - src/test_driver/* - - src/test_driver/**/* - -# Cert tests touched: add current milestone delta-tracking label. -# TODO: Change after Aug 15, 2024 -matter-1.4-te2-script-change: - - changed-files: - - any-glob-to-any-file: - - src/python_testing/* - - src/python_testing/**/* - - src/app/tests/suites/certification/* - -############################################################ -# Source Code -############################################################ -qr code: - - changed-files: - - any-glob-to-any-file: - - src/qrcode/* - - src/qrcode/**/* - - src/qrcodetool/* - - src/qrcodetool/**/* - -lwip: - - changed-files: - - any-glob-to-any-file: - - src/lwip/* - - src/lwip/**/* - -inet: - - changed-files: - - any-glob-to-any-file: - - src/inet/* - - src/inet/**/* - -config: - - changed-files: - - any-glob-to-any-file: - - config/* - - config/**/* - -lib: - - changed-files: - - any-glob-to-any-file: - - src/lib/* - - src/lib/**/* - -core: - - changed-files: - - any-glob-to-any-file: - - src/lib/core/* - - src/lib/core/**/* - -protocols: - - changed-files: - - any-glob-to-any-file: - - src/lib/protocols/* - - src/lib/protocols/**/* - - src/protocols/* - - src/protocols/**/* - -messaging: - - changed-files: - - any-glob-to-any-file: - - src/messaging/* - - src/messaging/**/* - -shell: - - changed-files: - - any-glob-to-any-file: - - src/lib/shell/* - - src/lib/shell/**/* - -support: - - changed-files: - - any-glob-to-any-file: - - src/lib/support/* - - src/lib/support/**/* - -crypto: - - changed-files: - - any-glob-to-any-file: - - src/crypto/* - - src/crypto/**/* - -controller: - - changed-files: - - any-glob-to-any-file: - - src/controller/* - - src/controller/**/* - -ble: - - changed-files: - - any-glob-to-any-file: - - src/ble/* - - src/ble/**/* - -app: - - changed-files: - - any-glob-to-any-file: - - src/app/* - - src/app/**/* - -icd: - - changed-files: - - any-glob-to-any-file: - - src/app/icd/* - - src/app/icd/**/* - -transport: - - changed-files: - - any-glob-to-any-file: - - src/transport/* - - src/transport/**/* - -system: - - changed-files: - - any-glob-to-any-file: - - src/system/* - - src/system/**/* - -setup payload: - - changed-files: - - any-glob-to-any-file: - - src/setup_payload/* - - src/setup_payload/**/* - -############################################################ -# Platforms -############################################################ -platform: - - changed-files: - - any-glob-to-any-file: - - src/platform/* - - src/platform/**/* - - config/tizen/chip-gn/platform/* - - config/tizen/chip-gn/platform/**/* - - examples/platform/* - - examples/platform/**/* - - scripts/tools/memory/platform/* - - scripts/tools/memory/platform/**/* - - src/include/platform/* - - src/include/platform/**/* - - src/lib/dnssd/platform/* - - src/lib/dnssd/platform/**/* - -darwin: - - changed-files: - - any-glob-to-any-file: - - src/platform/Darwin/* - - src/platform/Darwin/**/* - - src/darwin/* - - src/darwin/**/* - - examples/darwin-framework-tool/* - - examples/darwin-framework-tool/**/* - -silabs: - - changed-files: - - any-glob-to-any-file: - - src/platform/silabs/* - - src/platform/silabs/**/* - -esp32: - - changed-files: - - any-glob-to-any-file: - - src/platform/ESP32/* - - src/platform/ESP32/**/* - -freeRTOS: - - changed-files: - - any-glob-to-any-file: - - src/platform/FreeRTOS/* - - src/platform/FreeRTOS/**/* - -k32w: - - changed-files: - - any-glob-to-any-file: - - src/platform/K32W/* - - src/platform/K32W/**/* - -linux: - - changed-files: - - any-glob-to-any-file: - - src/platform/Linux/* - - src/platform/Linux/**/* - -nrf connect: - - changed-files: - - any-glob-to-any-file: - - src/platform/nrfconnect/* - - src/platform/nrfconnect/**/* - -openthread: - - changed-files: - - any-glob-to-any-file: - - src/platform/openthread/* - - src/platform/openthread/**/* - -zephyr: - - changed-files: - - any-glob-to-any-file: - - src/platform/Zephyr/* - - src/platform/Zephyr/**/* - -telink: - - changed-files: - - any-glob-to-any-file: - - src/platform/telink/* - - src/platform/telink/**/* - -tizen: - - changed-files: - - any-glob-to-any-file: - - src/platform/Tizen/* - - src/platform/Tizen/**/* diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index d33d2a3e6d..0000000000 --- a/.github/release.yml +++ /dev/null @@ -1,76 +0,0 @@ -# .github/release.yml - -changelog: - exclude: - labels: - - scripts - - external dependency - - submodules - - integrations - - documentation - authors: - - restyled-io - - octocat - - pullapprove - - jira - - issue-label-bot - - github-actions - - github-labels - - buildjet - categories: - - title: Highlighted Fixes - labels: - - release note - - title: Security Fixes - labels: - - security - - title: Bug Fixes - labels: - - bug - - title: Bluetooth Related Changes - labels: - - ble - - title: Spec Alignment Changes - labels: - - spec - - title: Transport/Messaging Layer Changes - labels: - - inet - - transport - - messaging - - protocols - - lwip - - title: Crypto Changes - labels: - - crypto - - title: Core Library Changes - labels: - - lib - - title: Core Changes - labels: - - core - - title: Controller Changes - labels: - - controller - - title: System Level Changes - labels: - - system - - attestation - - title: App Level Changes - labels: - - app - - title: Platform Changes - labels: - - platform - - darwin - - android - - title: Example App Changes - labels: - - examples - - title: Test Changes - labels: - - tests - - title: Build Related Changes - labels: - - gn - - build diff --git a/.github/workflows/artifacts.yaml b/.github/workflows/artifacts.yaml deleted file mode 100644 index 002d945ebc..0000000000 --- a/.github/workflows/artifacts.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: 'Delete old artifacts' -on: - schedule: - - cron: '0 * * * *' # every hour - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -jobs: - delete-artifacts: - runs-on: ubuntu-latest - steps: - - uses: kolpav/purge-artifacts-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - expire-in: 14days diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml deleted file mode 100644 index 870c5f379e..0000000000 --- a/.github/workflows/bloat_check.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2020 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. - -name: Bloat Check -on: - workflow_dispatch: - schedule: - - cron: "*/5 * * * *" - -concurrency: - group: ${{ github.workflow }} - # Don't cancel an already-running bloat check just because it took more - # than 5 minutes to run and our cron job is trying to schedule a new one. - cancel-in-progress: false - -jobs: - pull_request_update: - name: Report on pull requests - - # Don't run on forked repos - if: github.repository_owner == 'project-chip' - - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build:74 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Report - run: | - scripts/tools/memory/gh_report.py \ - --verbose \ - --report-increases 0.2 \ - --report-pr \ - --github-comment \ - --github-limit-artifact-pages 50 \ - --github-limit-artifacts 500 \ - --github-limit-comments 20 \ - --github-repository project-chip/connectedhomeip \ - --github-api-token "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/build-cert-bins.yaml b/.github/workflows/build-cert-bins.yaml deleted file mode 100644 index 52c274193b..0000000000 --- a/.github/workflows/build-cert-bins.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Build Certification Image -on: - workflow_call: - workflow_dispatch: -jobs: - build-cert-bin: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - with: - name: ghcr.io/project-chip/chip-cert-bins - tags: latest - dockerfile: ./integrations/docker/images/chip-cert-bins/Dockerfile - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - platforms: linux/amd64,linux/arm64,linux/arm diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 83ecc7e00a..0000000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,476 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Builds - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - workflow_call: - inputs: - run-codeql: - required: false - type: boolean - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - build_linux_gcc_debug: - name: Build on Linux (gcc_debug) - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/:/runner-root-volume" - - "/tmp/log_output:/tmp/test_logs" - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJSON(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Dump Concurrency context - env: - CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - run: echo "$CONCURRENCY_CONTEXT" - - name: Checkout - uses: actions/checkout@v4 - - name: Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - name: Initialize CodeQL - if: ${{ inputs.run-codeql }} - uses: github/codeql-action/init@v3 - with: - languages: "cpp" - - name: Setup Build - run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false chip_data_model_check_die_on_failure=true" - - name: Run Build - run: scripts/run_in_build_env.sh "ninja -C ./out" - - name: Run Tests - run: scripts/tests/gn_tests.sh - # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 - # TODO https://github.com/project-chip/connectedhomeip/issues/1512 - # - name: Run Code Coverage - # if: ${{ contains('main', env.BUILD_TYPE) }} - # run: scripts/tools/codecoverage.sh - # - name: Upload Code Coverage - # if: ${{ contains('main', env.BUILD_TYPE) }} - # run: bash <(curl -s https://codecov.io/bash) - - name: Set up Build Without Detail Logging - run: scripts/build/gn_gen.sh --args="chip_detail_logging=false" - - name: Run Build Without Detail Logging - run: scripts/run_in_build_env.sh "ninja -C ./out" - - name: Set up Build Without Progress Logging - run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false" - - name: Run Build Without Progress Logging - run: scripts/run_in_build_env.sh "ninja -C ./out" - - name: Set up Build Without Error Logging - run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false chip_error_logging=false" - - name: Run Build Without Error Logging - run: scripts/run_in_build_env.sh "ninja -C ./out" - - name: Set up Build Without Logging - run: scripts/build/gn_gen.sh --args="chip_logging=false" - - name: Run Build Without Logging - run: scripts/run_in_build_env.sh "ninja -C ./out" - - name: Uploading core files - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-core-linux-gcc-debug - path: /tmp/cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Perform CodeQL Analysis - if: ${{ inputs.run-codeql }} - uses: ./.github/actions/perform-codeql-analysis - with: - language: cpp - # OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually - # having the job timeout. - # - # If re-enabling, some subset of this should be picked - # - # - name: Uploading objdir for debugging - # uses: actions/upload-artifact@v4 - # if: ${{ failure() && !env.ACT }} - # with: - # name: crash-objdir-linux-gcc-debug - # path: out/ - # # objdirs are big; don't hold on to them too long. - # retention-days: 5 - - build_linux: - name: Build on Linux (fake, gcc_release, clang, simulated) - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/:/runner-root-volume" - - "/tmp/log_output:/tmp/test_logs" - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJSON(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Dump Concurrency context - env: - CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - run: echo "$CONCURRENCY_CONTEXT" - - name: Checkout - uses: actions/checkout@v4 - - name: Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - name: Initialize CodeQL - if: ${{ inputs.run-codeql }} - uses: github/codeql-action/init@v3 - with: - languages: "cpp" - - name: Setup and Build Simulated Device - run: | - BUILD_TYPE=simulated - GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' - CHIP_ROOT_PATH=examples/placeholder/linux - CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" - scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - - name: Setup Build, Run Build and Run Tests - run: | - BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false chip_data_model_check_die_on_failure=true" - scripts/run_in_build_env.sh "ninja -C ./out/gcc_release" - BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh - - name: Clean output - run: rm -rf ./out - - name: Run Tests with sanitizers - env: - LSAN_OPTIONS: detect_leaks=1 - run: | - for BUILD_TYPE in asan tsan ubsan; do - case $BUILD_TYPE in - "asan") GN_ARGS='is_clang=true is_asan=true';; - "msan") GN_ARGS='is_clang=true is_msan=true';; - "tsan") GN_ARGS='is_clang=true is_tsan=true chip_enable_wifi=false';; - "ubsan") GN_ARGS='is_clang=true is_ubsan=true';; - esac - - rm -rf ./out/sanitizers - BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands - BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh - done - - name: Ensure codegen is done for sanitize - run: | - ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/sanitizers" - - name: Clang-tidy validation - # NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check. - # See https://github.com/llvm/llvm-project/issues/97426 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/run-clang-tidy-on-compile-commands.py \ - --compile-database out/sanitizers/compile_commands.json \ - --file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|-ReadImpl|-InvokeSubscribeImpl|CodegenDataModel_Write|QuieterReporting' \ - check \ - " - - name: Clean output - run: rm -rf ./out - - name: Build using build_examples.py - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-minmdns-ipv6only-clang \ - --target linux-x64-rpc-console \ - build \ - " - - name: Create a pre-generate directory and ensure compile-time codegen would fail - run: | - ./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated" - mv scripts/codegen.py scripts/codegen.py.renamed - mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed - - name: Clean output - run: rm -rf ./out - - name: Build using build_examples.py (pregen) - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-all-clusters-ipv6only-clang \ - --target linux-x64-chip-tool-ipv6only-clang \ - --pregen-dir ./zzz_pregenerated \ - build \ - " - - name: Undo code pre-generation changes (make compile time codegen work again) - run: | - rm -rf ./zzz_pregenerated - mv scripts/codegen.py.renamed scripts/codegen.py - mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py - - name: Run fake linux tests with build_examples - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target linux-fake-tests build" - - name: Perform CodeQL Analysis - if: ${{ inputs.run-codeql }} - uses: ./.github/actions/perform-codeql-analysis - with: - language: cpp - - - name: Uploading core files - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-core-linux - path: /tmp/cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - # OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually - # having the job timeout. - # - # If re-enabling, some subset of this should be picked - # - # - name: Uploading objdir for debugging - # uses: actions/upload-artifact@v4 - # if: ${{ failure() && !env.ACT }} - # with: - # name: crash-objdir-linux - # path: out/ - # # objdirs are big; don't hold on to them too long. - # retention-days: 5 - - build_linux_python_lib: - name: Build on Linux (python_lib) - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/:/runner-root-volume" - - "/tmp/log_output:/tmp/test_logs" - options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJSON(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Dump Concurrency context - env: - CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - run: echo "$CONCURRENCY_CONTEXT" - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Setup Build, Run Build and Run Tests - run: | - scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false chip_data_model_check_die_on_failure=true" - scripts/run_in_build_env.sh "ninja -C ./out" - scripts/tests/gn_tests.sh - - name: Setup test python environment - shell: bash - run: | - scripts/run_in_build_env.sh 'virtualenv pyenv' - source pyenv/bin/activate - python -m ensurepip --upgrade - python -m pip install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl - python -m pip install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl - python -m pip install ./out/controller/python/chip_repl-0.0-py3-none-any.whl - - - name: Run Python tests - shell: bash - run: | - source pyenv/bin/activate - cd src/controller/python/test/unit_tests/ - python3 -m unittest -v - - name: Clean previous outputs - run: rm -rf out pyenv - - name: Run Python Setup Payload Generator Test - shell: bash - run: | - scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/' - scripts/run_in_build_env.sh 'virtualenv pyenv' - source pyenv/bin/activate - python -m ensurepip --upgrade - python -m pip install -r scripts/setup/requirements.setuppayload.txt - python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool - - build_linux_python_lighting_device: - name: Build on Linux (python lighting-app) - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/:/runner-root-volume" - - "/tmp/log_output:/tmp/test_logs" - options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJSON(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Dump Concurrency context - env: - CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - run: echo "$CONCURRENCY_CONTEXT" - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Setup Build - run: | - scripts/build_python_device.sh --chip_detail_logging true - - build_darwin: - name: Build on Darwin (clang, python_lib, simulated) - runs-on: macos-13 - if: github.actor != 'restyled-io[bot]' - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: darwin - - name: Try to ensure the directory for diagnostic log collection exists - run: | - mkdir -p ~/Library/Logs/DiagnosticReports || true - - name: Initialize CodeQL - if: ${{ inputs.run-codeql }} - uses: github/codeql-action/init@v3 - with: - languages: "cpp" - - - name: Setup and Build Simulated Device - run: | - BUILD_TYPE=simulated - GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' - CHIP_ROOT_PATH=examples/placeholder/linux - CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" - scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - - name: Setup Build, Run Build and Run Tests - # We can't enable leak checking here in LSAN_OPTIONS, because on - # Darwin that's only supported with a new enough clang, and we're - # not building with the pigweed clang here. - 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';; - esac - BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands - scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh - done - - name: Ensure codegen is done for sanitize - run: | - ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/default" - - name: Clang-tidy validation - # NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check. - # See https://github.com/llvm/llvm-project/issues/97426 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/run-clang-tidy-on-compile-commands.py \ - --compile-database out/default/compile_commands.json \ - --file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|CodegenDataModel_Write|QuieterReporting' \ - check \ - " - - name: Uploading diagnostic logs - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-log-darwin - path: ~/Library/Logs/DiagnosticReports/ - - - name: Perform CodeQL Analysis - if: ${{ inputs.run-codeql }} - uses: ./.github/actions/perform-codeql-analysis - with: - language: cpp - - # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 - # TODO https://github.com/project-chip/connectedhomeip/issues/1512 - - build_linux_gcc_coverage: - name: Build on Linux (coverage) - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/:/runner-root-volume" - - "/tmp/log_output:/tmp/test_logs" - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Run Build Coverage - run: ./scripts/build_coverage.sh diff --git a/.github/workflows/buildjet-cache-delete.yaml b/.github/workflows/buildjet-cache-delete.yaml deleted file mode 100644 index f5c4e0668b..0000000000 --- a/.github/workflows/buildjet-cache-delete.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Manually Delete BuildJet Cache -on: - workflow_dispatch: - inputs: - cache_key: - description: 'BuildJet Cache Key to Delete' - required: true - type: string -jobs: - manually-delete-buildjet-cache: - runs-on: buildjet-2vcpu-ubuntu-2204 - steps: - - name: Checkout - uses: actions/checkout@v4 - - uses: buildjet/cache-delete@v1 - with: - cache_key: ${{ inputs.cache_key }} \ No newline at end of file diff --git a/.github/workflows/cert_test_checks.yaml b/.github/workflows/cert_test_checks.yaml deleted file mode 100644 index 44d545a663..0000000000 --- a/.github/workflows/cert_test_checks.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -name: Certification test checks - -on: - pull_request: - paths: - - "src/app/tests/suites/certification/**" - -jobs: - check-certification-tests: - name: Check for common problems in certification tests - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Run checks - run: | - python3 scripts/tests/matter_yaml_linter.py diff --git a/.github/workflows/check-data-model-directory-updates.yaml b/.github/workflows/check-data-model-directory-updates.yaml deleted file mode 100644 index 305da81d9d..0000000000 --- a/.github/workflows/check-data-model-directory-updates.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# 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. - -name: Check for changes to data_model directory without a sha update - -on: - pull_request: - paths: - - "data_model/**" - -jobs: - check-submodule-update-label: - name: Check for changes to data_model directory without a sha update - runs-on: ubuntu-latest - if: "git diff --name-only HEAD^..HEAD data_model/ | grep -q spec_sha" - steps: - - name: Error Message - run: echo This pull request attempts to update data_model directory, but is missing updates to spec_sha file with the latest version of the sha. Files in the data_model directory are generated automatically and should not be updated manually. - - name: Fail Job - run: exit 1 diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml deleted file mode 100644 index 642cdb6cf8..0000000000 --- a/.github/workflows/chef.yaml +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build Chef CI examples on all platforms - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - chef_linux: - name: Chef - Linux CI Examples - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - options: --user root - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - name: CI Examples Linux - shell: bash - run: | - ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t linux" - - chef_esp32: - name: Chef - ESP32 CI Examples - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-esp32:74 - options: --user root - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: esp32 - - name: CI Examples ESP32 - shell: bash - run: | - ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t esp32" - - chef_nrfconnect: - name: Chef - NRFConnect CI Examples - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nrf-platform:74 - options: --user root - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nrfconnect - - name: CI Examples NRFConnect - shell: bash - run: | - ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect" - - chef_telink: - name: Chef - Telink CI Examples - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-telink:74 - options: --user root - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: telink - # - name: Update Zephyr to specific revision (for developers purpose) - # shell: bash - # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8" - - name: CI Examples Telink - shell: bash - run: | - ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t telink" diff --git a/.github/workflows/cherry-picks.yaml b/.github/workflows/cherry-picks.yaml deleted file mode 100644 index a062aa5fcf..0000000000 --- a/.github/workflows/cherry-picks.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Cherry-Pick Merges - -on: - pull_request_target: - branches: - - master - types: ["closed"] - -jobs: - cherry_pick_release_v1_0: - runs-on: ubuntu-latest - name: Cherry-Pick into SVE - if: | - (github.event.pull_request.merged == true) - && ( - (contains(github.event.pull_request.labels.*.name, 'sve')) - || (contains(github.event.pull_request.labels.*.name, 'request sve')) - || (contains(github.event.pull_request.labels.*.name, 'cert blocker')) - ) - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Cherry-Pick into sve branch - uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 - with: - token: ${{ secrets.MATTER_PAT }} - branch: 1.3-sve - labels: | - sve cherry pick - reviewers: | - woody-apple - andy31415 - raju-apple -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml deleted file mode 100644 index 6fe17c3558..0000000000 --- a/.github/workflows/cirque.yaml +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright (c) 2020-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. - -name: Cirque - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - cirque: - name: Cirque - - env: - GITHUB_CACHE_PATH: /tmp/cirque-cache - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - # 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: - # volumes: - # - "/tmp:/tmp" - # - "/dev/pts:/dev/pts" - # env: - # LOG_DIR: /tmp/cirque_test_output/ - # CLEANUP_DOCKER_FOR_CI: 1 - # options: "--privileged" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules - uses: ./.github/actions/checkout-submodules - with: - platform: linux - - # TODO: Is what's being cached here actually compatible with a regular bootstrap? - - name: Bootstrap Cache - uses: ./.github/actions/bootstrap-cache - - name: Bootstrap Cirque - run: | - integrations/docker/images/stage-2/chip-build-cirque/run.sh \ - -- sh -c " \ - git config --global --add safe.directory '*' \ - && bash scripts/bootstrap.sh \ - && chown -R $(id -u):$(id -g) .environment \ - " - - - name: Get Cirque Bootstrap cache key - id: cirque-bootstrap-cache-key - run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT - - uses: Wandalen/wretry.action@v1.4.10 - name: Cirque Bootstrap cache - if: ${{ !env.ACT }} - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-cirque-${{ steps.cirque-bootstrap-cache-key.outputs.val }} - restore-keys: ${{ runner.os }}-cirque- - path: ${{ env.GITHUB_CACHE_PATH }} - - name: Cirque Bootstrap - run: | - integrations/docker/images/stage-2/chip-build-cirque/run.sh \ - --env GITHUB_ACTION_RUN=1 \ - --env GITHUB_CACHE_PATH=${{ env.GITHUB_CACHE_PATH }} \ - --volume /tmp:/tmp \ - -- sh -c " \ - git config --global --add safe.directory '*' \ - && scripts/tests/cirque_tests.sh bootstrap \ - " - - - name: Artifact suffix - id: outsuffix - uses: haya14busa/action-cond@v1 - if: ${{ !env.ACT }} - with: - cond: ${{ github.event.pull_request.number == '' }} - if_true: "${{ github.sha }}" - if_false: "pull-${{ github.event.pull_request.number }}" - - name: Build Binaries - run: | - integrations/docker/images/stage-2/chip-build-cirque/run.sh \ - -- sh -c " \ - git config --global --add safe.directory '*' \ - && scripts/build/gn_gen_cirque.sh \ - " - - name: Run Tests - run: | - integrations/docker/images/stage-2/chip-build-cirque/run.sh \ - --env LOG_DIR=/tmp/cirque_test_output \ - --env CLEANUP_DOCKER_FOR_CI=1 \ - --env GITHUB_ACTION_RUN=1 \ - --privileged \ - --volume /tmp:/tmp \ - --volume /dev/pts:/dev/pts \ - -- sh -c " \ - git config --global --add safe.directory '*' \ - && scripts/tests/cirque_tests.sh run_all_tests \ - " - - - - name: Uploading Binaries - uses: actions/upload-artifact@v4 - if: ${{ always() && !env.ACT }} - with: - name: cirque_log-${{steps.outsuffix.outputs.value}}-logs - path: /tmp/cirque_test_output/ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 6b15039778..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2020-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. -name: "CodeQL" - -on: - workflow_dispatch: -# push: -# branches: [ "master", "sve*", "test_event_*", "v1.*" ] -# pull_request: - schedule: - - cron: '0 5 * * *' - -jobs: - analyze: - uses: project-chip/connectedhomeip/.github/workflows/build.yaml@master - with: - run-codeql: true - diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml deleted file mode 100644 index 815293204b..0000000000 --- a/.github/workflows/darwin-tests.yaml +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright (c) 2022 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. - -name: Darwin Tests - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - test_suites_chip_tool_darwin: - name: Test Suites - Darwin - - strategy: - matrix: - build_variant: [no-ble-asan-clang] - env: - BUILD_VARIANT: ${{matrix.build_variant}} - - # We can't use the pigweed clang to build the Darwin framework once we start using - # Swift, because it does not handle CLANG_ENABLE_MODULES correctly. - # - # But the Xcode clang does not handle LSan correctly. Since we can't easily apply - # LSAN_OPTIONS to just everything except darwin-framework-tool, instead disable asan for - # it. - BUILD_VARIANT_FRAMEWORK_TOOL: no-ble - 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 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Environment - # coreutils for stdbuf - run: brew install coreutils - - name: - Try to ensure the directories for core dumping and diagnostic - log collection exist and we can write them. - run: | - sudo chown ${USER} /cores || true - mkdir -p ~/Library/Logs/DiagnosticReports || true - mkdir objdir-clone || true - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: darwin - bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }} - - - name: Run macOS Darwin Framework Tool Build Debug - working-directory: src/darwin/Framework - run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug - - name: Delete Defaults - run: defaults delete com.apple.dt.xctest.tool - continue-on-error: true - - name: Clean Build - run: xcodebuild clean - working-directory: src/darwin/Framework - - name: Build Apps - 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-x64-network-manager-${BUILD_VARIANT} \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Run Tests - run: | - ./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 \ - --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 \ - --network-manager-app ./out/darwin-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-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 \ - --ota-data-file /tmp/rawImage \ - --ota-image-file /tmp/otaImage \ - --ota-destination-file /tmp/downloadedImage \ - --ota-candidate-file /tmp/otaCandidateJSON \ - " - - name: Uploading core files - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-core-darwin-${{ matrix.build_variant }} - path: /cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading diagnostic logs - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-log-darwin-${{ matrix.build_variant }} - path: ~/Library/Logs/DiagnosticReports/ - - name: Uploading framework build log - uses: actions/upload-artifact@v4 - 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 - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-objdir-darwin-${{ matrix.build_variant }} - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml deleted file mode 100644 index 9eeac9118e..0000000000 --- a/.github/workflows/darwin.yaml +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Darwin - -on: - push: - branches-ignore: - - "dependabot/**" - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: - ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - framework: - name: Build framework - if: github.actor != 'restyled-io[bot]' - runs-on: macos-13 - strategy: - matrix: - options: # We don't need a full matrix - - flavor: macos-release - arguments: -sdk macosx -configuration Release - - flavor: ios-release - arguments: -sdk iphoneos -configuration Release - - flavor: tvos-debug - arguments: -sdk appletvos -configuration Debug - - flavor: watchos-debug - arguments: -sdk watchos -configuration Debug - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: darwin - bootstrap-log-name: - bootstrap-logs-framework-${{ matrix.options.flavor }} - - name: Block zap-cli from being used - env: - PW_ENVSETUP_NO_BANNER: 1 - run: | - # Framework builds are NOT expected to require zap-cli - scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"' - # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli - scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0' - - name: Build - working-directory: src/darwin/Framework - run: xcodebuild -target "Matter" ${{ matrix.options.arguments }} - - tests: - 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 - strategy: - matrix: - options: # We don't need a full matrix - - flavor: asan - arguments: - -enableAddressSanitizer YES - -enableUndefinedBehaviorSanitizer YES - - flavor: tsan - arguments: -enableThreadSanitizer YES - # "leaks" does not seem to be very compatible with asan or tsan - - flavor: leaks - defines: ENABLE_LEAK_DETECTION=1 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: darwin - bootstrap-log-name: - bootstrap-logs-framework-${{ matrix.options.flavor }} - - name: Build example All Clusters Server - run: | - scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/all-clusters-app chip_config_network_layer_ble=false - - name: Build example OTA Provider - run: | - scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug/ota-provider-app chip_config_network_layer_ble=false - - name: Build example OTA Requestor - run: | - scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 - - name: Run Framework Tests - # We want to ensure that our log upload runs on timeout, so use a timeout here shorter - # than the 6-hour overall job timeout. 4.5 hours should be plenty. - timeout-minutes: 270 - working-directory: src/darwin/Framework - run: | - mkdir -p /tmp/darwin/framework-tests - echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt - ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & - - export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 - - # Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI. - xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx ${{ matrix.options.arguments }} \ - CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \ - > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2) - - name: Collect crash logs - if: failure() && !env.ACT - run: | - mkdir -p /tmp/darwin/framework-tests - find ~/Library/Developer/Xcode/DerivedData /Library/Logs/DiagnosticReports -name '*.ips' -print0 | xargs -0 -J % cp % /tmp/darwin/framework-tests - - name: Uploading log files - uses: actions/upload-artifact@v4 - if: failure() && !env.ACT - with: - name: darwin-framework-test-logs-${{ matrix.options.flavor }} - path: /tmp/darwin/framework-tests - retention-days: 5 diff --git a/.github/workflows/docbuild.yaml b/.github/workflows/docbuild.yaml deleted file mode 100644 index 2d28a2a537..0000000000 --- a/.github/workflows/docbuild.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: Documentation Build - -on: - pull_request: - types: [opened, synchronize, reopened] - branches: - - master - paths: - - '.github/workflows/docbuild.yaml' - - '**.md' - - 'docs/**' - push: - branches: - - master - -permissions: - contents: write - -jobs: - build-and-publish: - runs-on: ubuntu-latest - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - with: - path: matter - fetch-depth: 0 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - cache-dependency-path: matter/docs/requirements.txt - cache: pip - - name: Install base dependencies - working-directory: matter - run: | - sudo pip3 install -U pip - pip3 install -r docs/requirements.txt - - name: Build documentation - working-directory: matter/docs - run: | - mkdir -p _build/src - make html - touch _build/html/.nojekyll - - name: Deploy to gh-pages - if: github.repository == 'project-chip/connectedhomeip' && github.event_name == 'push' && github.ref_name == 'master' - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }} - external_repository: project-chip/connectedhomeip-doc - publish_dir: matter/docs/_build/html - # Keep only the latest version of the documentation - force_orphan: true diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml deleted file mode 100644 index 05594606a6..0000000000 --- a/.github/workflows/docker_img.yaml +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Docker CHIP images - -on: - workflow_call: - inputs: - push_images: - required: false - type: boolean - default: false - push: - paths: - - "integrations/docker/**" - pull_request: - paths: - - "integrations/docker/**" - workflow_dispatch: - inputs: - push_images: - required: false - type: boolean - default: false - -jobs: - build_images_base: - name: Build Docker CHIP Build images - base - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - strategy: - fail-fast: false - matrix: - img: - - "" - - "-minimal" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build & Push images using project bash script - if: ${{ inputs.push_images == true }} - run: | - cd integrations/docker/images/base/chip-build${{ matrix.img }} - ./build.sh --latest --push - - name: Build images using project bash script - if: ${{ inputs.push_images == false }} - run: | - cd integrations/docker/images/base/chip-build${{ matrix.img }} - ./build.sh --latest - build_images_stage_1: - needs: [build_images_base] - name: Build Docker CHIP Build images - stage 1 - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - strategy: - fail-fast: false - matrix: - img: - - "-crosscompile" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build & Push images using project bash script - if: ${{ inputs.push_images == true }} - run: | - cd integrations/docker/images/stage-1/chip-build${{ matrix.img }} - ./build.sh --latest --push - - name: Build images using project bash script - if: ${{ inputs.push_images == false }} - run: | - cd integrations/docker/images/stage-1/chip-build${{ matrix.img }} - ./build.sh --latest - build_images_stage_2: - needs: [build_images_base, build_images_stage_1] - name: Build Docker CHIP Build images - stage 2 - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - strategy: - fail-fast: false - matrix: - img: - - "-ameba" - - "-asr" - - "-bouffalolab" - - "-doxygen" - - "-efr32" - - "-esp32" - - "-infineon" - # NOTE: imx image requires too much space for GitHub-hosted runners. It fails with: - # ApplyLayer exit status 1 stdout: stderr: write /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/opt/ltp/testcases/bin/fanotify15: no space left on device - # - "-imx" - - "-java" - - "-k32w" - - "-nrf-platform" - - "-telink" - - "-ti" - - "-tizen" - - "-openiotsdk" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build & Push images using project bash script - if: ${{ inputs.push_images == true }} - run: | - cd integrations/docker/images/stage-2/chip-build${{ matrix.img }} - ./build.sh --latest --push - - name: Build images using project bash script - if: ${{ inputs.push_images == false }} - run: | - cd integrations/docker/images/stage-2/chip-build${{ matrix.img }} - ./build.sh --latest - - build_images_stage_3: - needs: [build_images_base, build_images_stage_1, build_images_stage_2] - name: Build Docker CHIP Build images - stage 3 - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - strategy: - fail-fast: false - matrix: - img: - - "-android" - - "-esp32-qemu" - - "-tizen-qemu" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build & Push images using project bash script - if: ${{ inputs.push_images == true }} - run: | - cd integrations/docker/images/stage-3/chip-build${{ matrix.img }} - ./build.sh --latest --push - - name: Build images using project bash script - if: ${{ inputs.push_images == false }} - run: | - cd integrations/docker/images/stage-3/chip-build${{ matrix.img }} - ./build.sh --latest - build_images_vscode: - needs: [build_images_base, build_images_stage_1, build_images_stage_2, build_images_stage_3] - name: Build Docker CHIP Build images - vscode - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' && false - strategy: - fail-fast: false - matrix: - img: - - "-vscode" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build & Push images using project bash script - if: ${{ inputs.push_images == true }} - run: | - cd integrations/docker/images/vscode/chip-build${{ matrix.img }} - ./build.sh --latest --push - - name: Build images using project bash script - if: ${{ inputs.push_images == false }} - run: | - cd integrations/docker/images/vscode-3/chip-build${{ matrix.img }} - ./build.sh --latest diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml deleted file mode 100644 index d29b620c37..0000000000 --- a/.github/workflows/doxygen.yaml +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (c) 2020 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. - -name: Doxygen - -on: - push: - paths: - - "**.do[xc]" - - "**.c[cs]?" - - "**.cxx" - - "**.cpp" - - "**.c\\+\\+" - - "**.ii" - - "**.ixx" - - "**.ipp" - - "**.i\\+\\+" - - "**.inl" - - "**.[hH]" - - "**.hh" - - "**.HH" - - "**.hxx" - - "**.hpp" - - "**.h\\+\\+" - - "**.mm" - - "**.txt" - - "**.[ido]dl" - - "**.java" - - "**.d" - - "**.php[45]?" - - "**.inc" - - "**.phtml" - - "**.[mM]" - pull_request: - paths: - - "**.do[xc]" - - "**.c[cs]?" - - "**.cxx" - - "**.cpp" - - "**.c\\+\\+" - - "**.ii" - - "**.ixx" - - "**.ipp" - - "**.i\\+\\+" - - "**.inl" - - "**.[hH]" - - "**.hh" - - "**.HH" - - "**.hxx" - - "**.hpp" - - "**.h\\+\\+" - - "**.mm" - - "**.txt" - - "**.[ido]dl" - - "**.java" - - "**.d" - - "**.php[45]?" - - "**.inc" - - "**.phtml" - - "**.[mM]" - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - doxygen: - name: Build Doxygen - - runs-on: ubuntu-latest - container: - image: ghcr.io/project-chip/chip-build-doxygen:74 - - if: github.actor != 'restyled-io[bot]' - - steps: - - name: "Print Actor" - run: echo ${{github.actor}} - - name: Checkout - uses: actions/checkout@v4 - - name: Generate - run: scripts/helpers/doxygen.sh - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" - id: extract_branch - - name: Deploy if master - if: steps.extract_branch.outputs.branch == 'master' && github.repository == 'project-chip/connectedhomeip' - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }} - external_repository: project-chip/connectedhomeip-doc - publish_dir: ./docs/html - # Keep only the latest version of the documentation - force_orphan: true diff --git a/.github/workflows/example-tv-casting-darwin.yaml b/.github/workflows/example-tv-casting-darwin.yaml deleted file mode 100644 index d9d9ef8f37..0000000000 --- a/.github/workflows/example-tv-casting-darwin.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: TV Casting Example - Darwin - -on: - push: - branches-ignore: - - "dependabot/**" - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: - ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - tv-casting-bridge: - name: Build TV Casting Bridge example - if: github.actor != 'restyled-io[bot]' - runs-on: macos-13 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: darwin - - name: Build - working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge - run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml deleted file mode 100644 index 62a3bf5511..0000000000 --- a/.github/workflows/examples-ameba.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build example - Ameba - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - ameba: - name: Ameba - env: - BUILD_TYPE: ameba - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-ameba:74 - options: --user root - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: ameba - - name: Build example Ameba All Clusters App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target ameba-amebad-all-clusters \ - --target ameba-amebad-all-clusters-minimal \ - --target ameba-amebad-light \ - --target ameba-amebad-pigweed \ - build \ - " diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml deleted file mode 100644 index 840811d13d..0000000000 --- a/.github/workflows/examples-asr.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# 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. - -name: Build example - ASR - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - asr: - name: ASR - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-asr:74 - options: --user root - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: asr - - name: Build all ASR582X examples - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target asr-asr582x-all-clusters \ - --target asr-asr582x-all-clusters-minimal \ - --target asr-asr582x-lighting-ota \ - --target asr-asr582x-light-switch-shell \ - --target asr-asr582x-lock-no_logging \ - --target asr-asr582x-ota-requestor \ - --target asr-asr582x-bridge-factory \ - --target asr-asr582x-temperature-measurement-rotating_id \ - --target asr-asr582x-thermostat-rio \ - --target asr-asr582x-dishwasher \ - --target asr-asr582x-refrigerator \ - build \ - " diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml deleted file mode 100644 index af20a4c5b0..0000000000 --- a/.github/workflows/examples-bouffalolab.yaml +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (c) 2020 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. - -name: Build example - BouffaloLab - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - bouffalolab: - name: Bouffalo Lab - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-bouffalolab:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: bouffalolab - extra-submodule-parameters: " --recursive" - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - name: Build example BL602 Lighting App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target bouffalolab-bl602-night-light-light \ - --target bouffalolab-bl602-night-light-light-mfd \ - --target bouffalolab-bl602-iot-matter-v1-light-115200-rpc \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare some bloat report from the previous builds - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl602 bl602 lighting-app \ - out/artifacts/bouffalolab-bl602-night-light-light/chip-bl602-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl602 bl602+mfd lighting-app \ - out/artifacts/bouffalolab-bl602-night-light-light-mfd/chip-bl602-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl602 bl602+rpc lighting-app \ - out/artifacts/bouffalolab-bl602-iot-matter-v1-light-115200-rpc/chip-bl602-lighting-example.out \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - - name: Build example BL702 Lighting App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target bouffalolab-bl706-night-light-light \ - --target bouffalolab-bl706-night-light-light-mfd \ - --target bouffalolab-bl706dk-light-ethernet \ - --target bouffalolab-bl706dk-light-wifi-fp \ - --target bouffalolab-xt-zb6-devkit-light-115200-rpc \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare some bloat report from the previous builds - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl702 lighting-app \ - out/artifacts/bouffalolab-bl706-night-light-light/chip-bl702-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl702+mfd lighting-app \ - out/artifacts/bouffalolab-bl706-night-light-light-mfd/chip-bl702-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl706-eth lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-ethernet/chip-bl702-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl706-wifi lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-wifi-fp/chip-bl702-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl702+rpc lighting-app \ - out/artifacts/bouffalolab-xt-zb6-devkit-light-115200-rpc/chip-bl702-lighting-example.out \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - - name: Build example BL702L Lighting App - timeout-minutes: 30 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target bouffalolab-bl704ldk-light \ - --target bouffalolab-bl704ldk-light-mfd \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare some bloat report from the previous builds - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702l bl702l lighting-app \ - out/artifacts/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702l bl702l+mfd lighting-app \ - out/artifacts/bouffalolab-bl704ldk-light-mfd/chip-bl702l-lighting-example.out \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: BouffaloLab diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml deleted file mode 100644 index 53c813d0b4..0000000000 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build example - TI CC13XX_26XX - -on: - workflow_dispatch: - # Temporarely disabled: - # - TI CI runs out of disk space - # - Image should be updated to an Ubuntu 24.04 or higher based one (move from :54 version) - # push: - # branches-ignore: - # - 'dependabot/**' - # pull_request: - # merge_group: - -concurrency: - group: - ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - cc13xx_26xx: - name: cc13xx_26xx - - env: - BUILD_TYPE: gn_cc13xx_26xx - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-ti:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: cc13xx_26xx - extra-submodule-parameters: " --recursive" - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build examples - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target ti-cc13x4_26x4-lighting-ftd \ - --target ti-cc13x4_26x4-lighting-mtd \ - --target ti-cc13x4_26x4-lock-ftd \ - --target ti-cc13x4_26x4-lock-mtd \ - --target ti-cc13x4_26x4-pump-mtd \ - --target ti-cc13x4_26x4-pump-ftd \ - --target ti-cc13x4_26x4-pump-controller-mtd \ - --target ti-cc13x4_26x4-pump-controller-ftd \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get lock FTD size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x4_26x4 LP_EM_CC1354P10_6 lock-ftd \ - out/artifacts/ti-cc13x4_26x4-lock-ftd/chip-LP_EM_CC1354P10_6-lock-example.out \ - /tmp/bloat_reports/ - - name: Get lock MTD size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x4_26x4 LP_EM_CC1354P10_6 lock-mtd \ - out/artifacts/ti-cc13x4_26x4-lock-mtd/chip-LP_EM_CC1354P10_6-lock-example.out \ - /tmp/bloat_reports/ - - name: Get Pump App size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x4_26x4 LP_EM_CC1354P10_6 pump-app \ - out/artifacts/ti-cc13x4_26x4-pump-mtd/chip-LP_EM_CC1354P10_6-pump-example.out \ - /tmp/bloat_reports/ - - name: Get Pump Controller MTD size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x4_26x4 LP_EM_CC1354P10_6 pump-controller-app \ - out/artifacts/ti-cc13x4_26x4-pump-controller-mtd/chip-LP_EM_CC1354P10_6-pump-controller-example.out \ - /tmp/bloat_reports/ - - name: Get Lighting FTD size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \ - out/artifacts/ti-cc13x4_26x4-lighting-ftd/chip-LP_EM_CC1354P10_6-lighting-example.out \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: cc13x4_26x4 diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml deleted file mode 100644 index 091a5eeabc..0000000000 --- a/.github/workflows/examples-cc32xx.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build example - TI CC32XX - -on: - workflow_dispatch: - # Temporarely disabled: - # - TI CI runs out of disk space - # - Image should be updated to an Ubuntu 24.04 or higher based one (move from :54 version) - # push: - # branches-ignore: - # - 'dependabot/**' - # pull_request: - # merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - cc32xx: - name: cc32xx - - env: - BUILD_TYPE: gn_cc32xx - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-ti:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: cc32xx - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build examples - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target cc32xx-lock --target cc32xx-air-purifier build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get lock app size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc32xx CC3235SF_LAUNCHXL lock \ - out/artifacts/cc32xx-lock/chip-CC3235SF_LAUNCHXL-lock-example.out \ - /tmp/bloat_reports/ - - - name: Get air purifier app size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc32xx CC3235SF_LAUNCHXL air-purifier \ - out/artifacts/cc32xx-air-purifier/chip-CC3235SF_LAUNCHXL-air-purifier-example.out \ - /tmp/bloat_reports/ - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: cc32xx diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml deleted file mode 100644 index c236b4ca3d..0000000000 --- a/.github/workflows/examples-efr32.yaml +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright (c) 2020 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. - -name: Build example - EFR32 - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - efr32: - name: EFR32 - - env: - SILABS_BOARD: BRD4187C - BUILD_TYPE: gn_efr32 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-efr32:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: silabs_docker - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Test SLC gen - timeout-minutes: 30 - run: | - scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker - rm -rf ./out/ - - name: Build some BRD4187C variants (1) - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target efr32-brd4187c-thermostat-openthread-mtd \ - --target efr32-brd4187c-switch-shell-use-ot-coap-lib \ - --target efr32-brd4187c-unit-test \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Clean out build output - run: rm -rf ./out - - name: Build some BRD4187C variants (2) - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target efr32-brd4187c-light-use-ot-lib \ - --target efr32-brd4187c-pump \ - --target efr32-brd4187c-lock-shell-heap-monitoring \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Clean out build output - run: rm -rf ./out - - name: Build BRD4187C variants (3) - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target efr32-brd4187c-window-covering-additional-data-advertising \ - --target efr32-brd4187c-light-rpc \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare some bloat report from the previous builds - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - efr32 BRD4187C lighting-app \ - out/efr32-brd4187c-light-rpc/matter-silabs-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - efr32 BRD4187C window-app \ - out/efr32-brd4187c-window-covering-additional-data-advertising/matter-silabs-window-example.out \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build BRD4338A WiFi Soc variants - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target efr32-brd4338a-light-skip-rps-generation \ - --target efr32-brd4338a-lock-skip-rps-generation \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare bloat report for brd4338a lock app - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - efr32 BRD4338a lock-app \ - out/efr32-brd4338a-lock-skip-rps-generation/matter-silabs-lock-example.out \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build EFR32 with WiFi NCP - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target efr32-brd4187c-lock-wifi-siwx917 \ - --target efr32-brd4187c-light-wifi-rs9116 \ - --target efr32-brd4187c-lock-wifi-wf200 \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Clean out build output - run: rm -rf ./out - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: EFR32 diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml deleted file mode 100644 index 5d84540eda..0000000000 --- a/.github/workflows/examples-esp32.yaml +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright (c) 2020 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. - -name: Build example - ESP32 - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - esp32: - name: ESP32 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-esp32:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: esp32 - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build some M5Stack variations - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target esp32-m5stack-all-clusters \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare bloat report - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - esp32 m5stack all-clusters-app \ - out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \ - /tmp/bloat_reports/ - - name: Prepare code pregen and ensure compile time pregen not possible - run: | - ./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated" - mv scripts/codegen.py scripts/codegen.py.renamed - mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed - - name: Clean output - run: rm -rf ./out - - name: Build some M5Stack variations with pregen - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target esp32-m5stack-all-clusters-minimal \ - --target esp32-m5stack-all-clusters-rpc-ipv6only \ - --pregen-dir ./zzz_pregenerated \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Undo code pregeneration changes - run: | - rm -rf ./zzz_pregenerated - mv scripts/codegen.py.renamed scripts/codegen.py - mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py - - name: Build example All Clusters App(Target:ESP32C3) - run: scripts/examples/esp_example.sh all-clusters-app sdkconfig.defaults.esp32c3 esp32c3 - - name: Copy aside build products - run: | - mkdir -p example_binaries/esp32-build - cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \ - example_binaries/esp32-build/chip-all-clusters-app.elf - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - esp32 c3devkit all-clusters-app \ - example_binaries/esp32-build/chip-all-clusters-app.elf \ - /tmp/bloat_reports/ - - - name: Build example Pigweed App - run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults - - - name: Build example Lighting App (Target:ESP32H2) - run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults.esp32h2 esp32h2 - - - name: Build example Lock App (Target:ESP32C6) - run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults.esp32c6 esp32c6 - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: ESP32 - - esp32_1: - name: ESP32_1 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-esp32:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: esp32 - - - name: Build example Bridge App - run: scripts/examples/esp_example.sh bridge-app - - - name: Build example Persistent Storage App - run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults - - - name: Build example Shell App - run: scripts/examples/esp_example.sh shell sdkconfig.defaults - - - name: Build example Temperature Measurement App - run: scripts/examples/esp_example.sh temperature-measurement-app sdkconfig.optimize.defaults - - - name: Build example OTA Requestor App - run: scripts/examples/esp_example.sh ota-requestor-app sdkconfig.defaults - - - name: Build example OTA Provider App - run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults - - - name: Build example Light Switch App (Target:ESP32C3) - run: scripts/examples/esp_example.sh light-switch-app sdkconfig.defaults.esp32c3 esp32c3 - - - name: Build example Lighting App (external platform) - run: scripts/examples/esp_example.sh lighting-app sdkconfig.ext_plat.defaults - - - name: Build example Energy Management App - run: scripts/examples/esp_example.sh energy-management-app sdkconfig.defaults - - - name: Build example LIT ICD App (Target:ESP32H2) - run: scripts/examples/esp_example.sh lit-icd-app sdkconfig.defaults esp32h2 diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml deleted file mode 100644 index 0fcfac2ce7..0000000000 --- a/.github/workflows/examples-infineon.yaml +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build example - Infineon - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - infineon: - name: Infineon examples building - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-infineon:74 - env: - # TODO: this should probably be part of the dockerfile itself - CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: infineon - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build PSoC6 lock-app example - run: | - scripts/run_in_build_env.sh \ - "scripts/build/build_examples.py \ - --enable-flashbundle \ - --target infineon-psoc6-lock \ - build \ - --copy-artifacts-to out/artifacts \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - psoc6 cy8ckit_062s2_43012 lock \ - out/artifacts/infineon-psoc6-lock/chip-psoc6-lock-example.out \ - /tmp/bloat_reports/ - - name: Build PSoC6 all-clusters-app example - run: | - scripts/run_in_build_env.sh \ - "scripts/build/build_examples.py \ - --enable-flashbundle \ - --target infineon-psoc6-all-clusters \ - build \ - --copy-artifacts-to out/artifacts \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - psoc6 cy8ckit_062s2_43012 all-clusters \ - out/artifacts/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.out \ - /tmp/bloat_reports/ - - name: Build PSoC6 all-clusters-minimal-app example - run: | - scripts/run_in_build_env.sh \ - "scripts/build/build_examples.py \ - --enable-flashbundle \ - --target infineon-psoc6-all-clusters-minimal \ - build \ - --copy-artifacts-to out/artifacts \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - psoc6 cy8ckit_062s2_43012 all-clusters-minimal \ - out/artifacts/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.out \ - /tmp/bloat_reports/ - - name: Build PSoC6 lighting-app example - run: | - scripts/run_in_build_env.sh \ - "scripts/build/build_examples.py \ - --enable-flashbundle \ - --target infineon-psoc6-light \ - build \ - --copy-artifacts-to out/artifacts \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - psoc6 cy8ckit_062s2_43012 light \ - out/artifacts/infineon-psoc6-light/chip-psoc6-lighting-example.out \ - /tmp/bloat_reports/ - - - name: Build CYW30739 Lighting App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target cyw30739-cyw30739b2_p5_evk_01-light \ - --target cyw30739-cyw30739b2_p5_evk_02-light \ - --target cyw30739-cyw30739b2_p5_evk_03-light \ - --target cyw30739-cyw930739m2evb_02-light \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get light size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-01 light \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_01-light/lighting_app-CYW30739B2-P5-EVK-01.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-02 light \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_02-light/lighting_app-CYW30739B2-P5-EVK-02.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-03 light \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light/lighting_app-CYW30739B2-P5-EVK-03.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW930739M2EVB-02 light \ - out/artifacts/cyw30739-cyw930739m2evb_02-light/lighting_app-CYW930739M2EVB-02.elf \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build CYW30739 Light Switch App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target cyw30739-cyw30739b2_p5_evk_01-light-switch \ - --target cyw30739-cyw30739b2_p5_evk_02-light-switch \ - --target cyw30739-cyw30739b2_p5_evk_03-light-switch \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get light-switch size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-01 light-switch \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_01-light-switch/light_switch_app-CYW30739B2-P5-EVK-01.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-02 light-switch \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_02-light-switch/light_switch_app-CYW30739B2-P5-EVK-02.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-03 light-switch \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light-switch/light_switch_app-CYW30739B2-P5-EVK-03.elf \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build CYW30739 Lock App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target cyw30739-cyw30739b2_p5_evk_01-lock \ - --target cyw30739-cyw30739b2_p5_evk_02-lock \ - --target cyw30739-cyw30739b2_p5_evk_03-lock \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get lock size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-01 lock \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_01-lock/lock_app-CYW30739B2-P5-EVK-01.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-02 lock \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_02-lock/lock_app-CYW30739B2-P5-EVK-02.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-03 lock \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_03-lock/lock_app-CYW30739B2-P5-EVK-03.elf \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build CYW30739 Thermostat App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target cyw30739-cyw30739b2_p5_evk_01-thermostat \ - --target cyw30739-cyw30739b2_p5_evk_02-thermostat \ - --target cyw30739-cyw30739b2_p5_evk_03-thermostat \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get thermostat size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-01 thermostat \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_01-thermostat/thermostat-CYW30739B2-P5-EVK-01.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-02 thermostat \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_02-thermostat/thermostat-CYW30739B2-P5-EVK-02.elf \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cyw30739 CYW30739B2-P5-EVK-03 thermostat \ - out/artifacts/cyw30739-cyw30739b2_p5_evk_03-thermostat/thermostat-CYW30739B2-P5-EVK-03.elf \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: Infineon diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml deleted file mode 100644 index 41fe245651..0000000000 --- a/.github/workflows/examples-linux-arm.yaml +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (c) 2020 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. - -name: Build example - Linux ARM - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - arm_crosscompile: - name: Linux ARM Cross compile - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-crosscompile:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build Some samples - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-arm64-chip-cert-clang \ - --target linux-arm64-all-clusters-clang \ - --target linux-arm64-chip-tool-ipv6only-clang \ - --target linux-arm64-chip-tool-nodeps-ipv6only \ - --target linux-arm64-lock-clang \ - --target linux-arm64-minmdns-clang \ - --target linux-arm64-light-rpc-ipv6only-clang \ - --target linux-arm64-thermostat-no-ble-clang \ - --target linux-arm64-lit-icd-no-ble-clang \ - --target linux-arm64-fabric-admin-clang-rpc \ - --target linux-arm64-fabric-bridge-no-ble-clang-rpc \ - build \ - " - - name: Bloat report - chip-tool - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux arm64 chip-tool-ipv6only \ - out/linux-arm64-chip-tool-ipv6only-clang/chip-tool \ - /tmp/bloat_reports/ - - name: Bloat report - thermostat - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux arm64 thermostat-no-ble \ - out/linux-arm64-thermostat-no-ble-clang/thermostat-app \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: Linux diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml deleted file mode 100644 index 6ad5f4c9d9..0000000000 --- a/.github/workflows/examples-linux-imx.yaml +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) 2022 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. - -name: Build example - i.MX Linux - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - imx: - name: Linux i.MX Build - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-imx:74 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Build lighting-app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target imx-lighting-app \ - build" - - name: Clean out build output - run: rm -rf ./out - - name: Build chip-tool - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target imx-chip-tool \ - build" - - name: Clean out build output - run: rm -rf ./out - - name: Build thermostat - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target imx-thermostat \ - build" - - name: Clean out build output - run: rm -rf ./out - - name: Build all-cluster - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target imx-all-clusters-app \ - build" - - name: Clean out build output - run: rm -rf ./out - - name: Build all-cluster-minimal - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target imx-all-clusters-minimal-app \ - build" - - name: Clean out build output - run: rm -rf ./out - - name: Build ota-provider-app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target imx-ota-provider-app \ - build" - - name: Clean out build output - run: rm -rf ./out diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml deleted file mode 100644 index aa4051ea30..0000000000 --- a/.github/workflows/examples-linux-standalone.yaml +++ /dev/null @@ -1,225 +0,0 @@ -# Copyright (c) 2020 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. - -name: Build example - Linux Standalone - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - linux_standalone: - name: Linux Standalone - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build Standalone cert tool - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-chip-cert \ - build" - - name: Build minmdns example with platform dns - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-address-resolve-tool-platform-mdns-ipv6only \ - build" - - name: Build example Standalone chip tool - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-chip-tool \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug chip-tool \ - out/linux-x64-chip-tool/chip-tool \ - /tmp/bloat_reports/ - - name: Build example Standalone Shell - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-shell \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug shell \ - out/linux-x64-shell/chip-shell \ - /tmp/bloat_reports/ - - name: Build example Standalone All Clusters Server - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-all-clusters \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug all-clusters-app \ - out/linux-x64-all-clusters/chip-all-clusters-app \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build example Standalone All Clusters Minimal Server - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-all-clusters-minimal \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug all-clusters-minimal-app \ - out/linux-x64-all-clusters-minimal/chip-all-clusters-minimal-app \ - /tmp/bloat_reports/ - - name: Build example TV app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-tv-app \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug tv-app \ - out/linux-x64-tv-app/chip-tv-app \ - /tmp/bloat_reports/ - - name: Build example Standalone TV Casting App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-tv-casting-app \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug tv-casting-app \ - out/linux-x64-tv-casting-app/chip-tv-casting-app \ - /tmp/bloat_reports/ - - name: Build example lighting app with RPCs and UI - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-light-rpc-with-ui \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug+rpc+ui lighting-app \ - out/linux-x64-light-rpc-with-ui/chip-lighting-app \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build example Standalone Bridge - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-bridge \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug bridge-app \ - out/linux-x64-bridge/chip-bridge-app \ - /tmp/bloat_reports/ - - name: Build example OTA Provider - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-ota-provider \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug ota-provider-app \ - out/linux-x64-ota-provider/chip-ota-provider-app \ - /tmp/bloat_reports/ - - name: Build example OTA Requestor - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-ota-requestor \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug ota-requestor-app \ - out/linux-x64-ota-requestor/chip-ota-requestor-app \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - - name: Build example Standalone Lock App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-lock-no-thread \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug lock-app \ - out/linux-x64-lock-no-thread/chip-lock-app \ - /tmp/bloat_reports/ - - name: Build example contact sensor with UI - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-contact-sensor-no-ble-with-ui \ - build" - - name: Build example Air Purifier - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-air-purifier \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug air-purifier-app \ - out/linux-x64-air-purifier/chip-air-purifier-app \ - /tmp/bloat_reports/ - - name: Build example Fabric Admin - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-fabric-admin-rpc \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug fabric-admin \ - out/linux-x64-fabric-admin-rpc/fabric-admin \ - /tmp/bloat_reports/ - - name: Build example Fabric Bridge App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-fabric-bridge-no-ble-rpc \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug fabric-bridge-app \ - out/linux-x64-fabric-bridge-no-ble-rpc/fabric-bridge-app \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: Linux-Standalone diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml deleted file mode 100644 index e2ff0f9f66..0000000000 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# 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. - -name: Test TV Casting Example - -on: - push: - branches-ignore: - - "dependabot/**" - pull_request: - merge_group: - -concurrency: - group: - ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - Linux-test: - name: Linux Test - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Set Up Environment for Size Reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build Linux tv-app - run: | - ./scripts/run_in_build_env.sh \ - "scripts/examples/gn_build_example.sh examples/tv-app/linux/ out/tv-app" - - - name: Build Linux tv-casting-app - run: | - ./scripts/run_in_build_env.sh \ - "scripts/examples/gn_build_example.sh examples/tv-casting-app/linux/ out/tv-casting-app chip_casting_simplified=true" - - - name: - Test casting from Linux tv-casting-app to Linux tv-app - - Commissionee Generated Passcode - run: | - ./scripts/run_in_build_env.sh \ - "python3 ./scripts/tests/run_tv_casting_test.py" - timeout-minutes: 2 # Comment this out to debug if GitHub Action times out. - - # TODO: this test is flaky and was disabled - # https://github.com/project-chip/connectedhomeip/issues/34598 - # - # - name: - # Test casting from Linux tv-casting-app to Linux tv-app - - # Commissioner Generated Passcode - # run: | - # ./scripts/run_in_build_env.sh \ - # "python3 ./scripts/tests/run_tv_casting_test.py --commissioner-generated-passcode=True" - # timeout-minutes: 2 # Comment this out to debug if GitHub Action times out. - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: Linux diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml deleted file mode 100644 index 04664c28cf..0000000000 --- a/.github/workflows/examples-mw320.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Build example - MW320 - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - mw320: - name: MW320 - - env: - BUILD_TYPE: gn_mw320 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: mw320 - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build MW320 all clusters example app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target 'mw320-all-clusters-app' \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: MW320 diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml deleted file mode 100644 index 13b0ae9c69..0000000000 --- a/.github/workflows/examples-nrfconnect.yaml +++ /dev/null @@ -1,211 +0,0 @@ -# Copyright (c) 2020 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. - -name: Build example - nRF Connect SDK - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - nrfconnect: - name: nRF Connect SDK - - env: - BUILD_TYPE: nrfconnect - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nrf-platform:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nrfconnect - - name: Detect changed paths - uses: dorny/paths-filter@v3 - id: changed_paths - with: - filters: | - nrfconnect: - - '**/nrfconnect/**' - - '**/Zephyr/**' - - '**/zephyr/**' - tests: - - '**/tests/**' - shell: - - 'examples/shell/nrfconnect/**' - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Check nRF Connect SDK revision. - run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --check" - - name: Run unit tests of factory data generation script - run: | - scripts/run_in_build_env.sh 'pip3 install -r scripts/setup/requirements.nrfconnect.txt' - scripts/run_in_build_env.sh "./scripts/tools/nrfconnect/tests/test_generate_factory_data.py" - - name: Build example nRF Connect SDK Lock App on nRF52840 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh lock-app nrf52840dk/nrf52840 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 lock-app \ - examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle/nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dongle_nrf52840 lighting-app \ - examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk/nrf52840 -DOVERLAY_CONFIG=rpc.overlay - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840+rpc lighting-app \ - examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Light Switch App on nRF52840 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk/nrf52840 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 light-switch-app \ - examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Shell on nRF52840 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true' - run: | - scripts/examples/nrfconnect_example.sh shell nrf52840dk/nrf52840 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 shell \ - examples/shell/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Pump App on nRF52840 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh pump-app nrf52840dk/nrf52840 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 pump-app \ - examples/pump-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Pump Controller App on nRF52840 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk/nrf52840 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 pump-controller-app \ - examples/pump-controller-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK All Clusters App on nRF52840 DK - run: | - scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk/nrf52840 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 all-clusters-app \ - examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK All Clusters Minimal App on nRF52840 DK - run: | - scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk/nrf52840 -DFILE_SUFFIX=dfu - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf52840dk_nrf52840 all-clusters-minimal-app \ - examples/all-clusters-minimal-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lock App on nRF5340 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh lock-app nrf5340dk/nrf5340/cpuapp - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \ - examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lighting App on nRF5340 DK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk/nrf5340/cpuapp - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \ - examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lock App on nRF7002 PDK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh lock-app nrf7002dk/nrf5340/cpuapp - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf7002dk_nrf5340_cpuapp lock-app \ - examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Light Switch App on nRF7002 PDK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk/nrf5340/cpuapp - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf7002dk_nrf5340_cpuapp light-switch-app \ - examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK Lighting App on nRF7002 PDK - if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk/nrf5340/cpuapp - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf7002dk_nrf5340_cpuapp lighting-app \ - examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK - run: | - scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk/nrf5340/cpuapp -DFILE_SUFFIX=release - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \ - examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - name: Run unit tests for Zephyr native_posix_64 platform - if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build" - - name: Uploading Failed Test Logs - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: test-log - path: | - src/test_driver/nrfconnect/build/Testing/Temporary/LastTest.log - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: nRFConnect diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml deleted file mode 100644 index d1bf7594b0..0000000000 --- a/.github/workflows/examples-nuttx.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -name: Build example - NuttX - -on: - push: - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - nuttx: - name: NuttX - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nuttx:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nuttx - extra-submodule-parameters: " --recursive" - - name: Build example simulator NuttX Lighting App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target nuttx-x64-light \ - build \ - " diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml deleted file mode 100644 index d09e893f29..0000000000 --- a/.github/workflows/examples-nxp.yaml +++ /dev/null @@ -1,287 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build example - NXP - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - k32w0: - name: K32W0 - - env: - BUILD_TYPE: gn_k32w - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-k32w:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build examples - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target nxp-k32w0-freertos-lighting \ - --target nxp-k32w0-freertos-lighting-factory \ - --target nxp-k32w0-freertos-lighting-rotating-id \ - --target nxp-k32w0-freertos-contact-sensor \ - --target nxp-k32w0-freertos-contact-sensor-low-power \ - --target nxp-k32w0-freertos-contact-sensor-low-power-factory \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get lighting app size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp k32w0+release light \ - out/artifacts/nxp-k32w0-freertos-lighting/chip-k32w0x-light-example.elf \ - /tmp/bloat_reports/ - - name: Get contact sensor size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp k32w0+release contact \ - out/artifacts/nxp-k32w0-freertos-contact-sensor-low-power/chip-k32w0x-contact-example.elf \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: K32W0 - k32w1: - name: K32W1 - - env: - BUILD_TYPE: gn_k32w - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nxp:71 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - extra-submodule-parameters: --recursive - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build examples - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target nxp-k32w1-freertos-lighting \ - --target nxp-k32w1-freertos-contact-sensor-low-power \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get lighting app size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp k32w1+release light \ - out/artifacts/nxp-k32w1-freertos-lighting/chip-k32w1-light-example.elf \ - /tmp/bloat_reports/ - - name: Get contact sensor size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp k32w1+release contact \ - out/artifacts/nxp-k32w1-freertos-contact-sensor-low-power/chip-k32w1-contact-example.elf \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: K32W1 - mcxw71: - name: MCXW71 - - env: - BUILD_TYPE: gn_k32w - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nxp:71 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - extra-submodule-parameters: --recursive - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build examples - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target nxp-mcxw71-freertos-lighting \ - --target nxp-mcxw71-freertos-contact-sensor-low-power \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Get lighting app size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp mcxw71+release light \ - out/artifacts/nxp-mcxw71-freertos-lighting/chip-mcxw71-light-example.elf \ - /tmp/bloat_reports/ - - name: Get contact sensor size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp mcxw71+release contact \ - out/artifacts/nxp-mcxw71-freertos-contact-sensor-low-power/chip-mcxw71-contact-example.elf \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: MCXW71 - rw61x: - name: RW61X - - env: - BUILD_TYPE: gn_rw61x - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nxp:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - extra-submodule-parameters: --recursive - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build RW61X all clusters example app - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target nxp-rw61x-freertos-all-clusters-wifi \ - --target nxp-rw61x-freertos-all-clusters-thread \ - --target nxp-rw61x-freertos-all-clusters-thread-wifi \ - build \ - --copy-artifacts-to out/artifacts \ - " - - - name: Build RW61X thermostat example app - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target nxp-rw61x-freertos-thermostat-wifi \ - --target nxp-rw61x-freertos-thermostat-thread \ - --target nxp-rw61x-freertos-thermostat-thread-wifi \ - build \ - --copy-artifacts-to out/artifacts \ - " - - - name: Build RW61X laundry-washer example app - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target nxp-rw61x-freertos-laundry-washer-wifi \ - --target nxp-rw61x-freertos-laundry-washer-thread \ - --target nxp-rw61x-freertos-laundry-washer-thread-wifi \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: RW61X - zephyr: - name: ZEPHYR_RW61X - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nxp-zephyr:74 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - - - name: Build RW61x Zephyr examples - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target nxp-rw61x-zephyr-all-clusters \ - --target nxp-rw61x-zephyr-thermostat \ - --target nxp-rw61x-zephyr-laundry-washer-factory \ - build \ - " diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml deleted file mode 100644 index d85a789a0b..0000000000 --- a/.github/workflows/examples-openiotsdk.yaml +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build example - Open IoT SDK - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - openiotsdk: - name: Open IoT SDK examples building - - env: - TEST_NETWORK_NAME: OIStest - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-openiotsdk:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - options: --privileged - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: openiotsdk linux - extra-submodule-parameters: " --recursive" - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build and install Python controller - run: | - scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' - scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.openiotsdk.txt' - - - name: Build shell example - id: build_shell - run: | - scripts/examples/openiotsdk_example.sh shell - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - openiotsdk release shell \ - examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \ - /tmp/bloat_reports/ - - - name: "Test: shell example" - if: github.event_name == 'workflow_dispatch' && steps.build_shell.outcome == 'success' - run: | - scripts/run_in_python_env.sh out/venv \ - 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' - - - name: Clean shell output - run: rm -rf examples/shell/openiotsdk/build - - - name: Build lock-app example (mbedtls) - # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 - if: false - id: build_lock_app_mbedtls - run: | - scripts/examples/openiotsdk_example.sh -b mbedtls lock-app - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - openiotsdk release lock-app-mbedtls \ - examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ - /tmp/bloat_reports/ - - - name: Build tv-app example - id: build_tv_app - timeout-minutes: 10 - run: | - scripts/examples/openiotsdk_example.sh tv-app - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - openiotsdk release tv-app \ - examples/tv-app/openiotsdk/build/chip-openiotsdk-tv-app-example.elf \ - /tmp/bloat_reports/ - - - name: "Test: tv-app example" - if: github.event_name == 'workflow_dispatch' && steps.build_tv_app.outcome == 'success' - timeout-minutes: 10 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: Clean tv-app output - run: rm -rf examples/tv-app/openiotsdk/build - - - name: Build all-clusters-app example - id: build_all_clusters_app - timeout-minutes: 10 - run: | - scripts/examples/openiotsdk_example.sh all-clusters-app - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - openiotsdk release all-clusters-app \ - examples/all-clusters-app/openiotsdk/build/chip-openiotsdk-all-clusters-app-example.elf \ - /tmp/bloat_reports/ - - - name: "Test: all-clusters-app example" - if: github.event_name == 'workflow_dispatch' && steps.build_all_clusters_app.outcome == 'success' - timeout-minutes: 5 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: Clean all-clusters-app output - run: rm -rf examples/all-clusters-app/openiotsdk/build - - - name: Build ota-requestor-app example - id: build_ota_requestor_app - timeout-minutes: 10 - run: | - scripts/examples/openiotsdk_example.sh -v 1 -V 0.0.1 ota-requestor-app - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - openiotsdk release ota-requestor-app \ - examples/ota-requestor-app/openiotsdk/build/chip-openiotsdk-ota-requestor-app-example.elf \ - /tmp/bloat_reports/ - - - name: Build unit tests (mbedtls) - # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 - if: false - id: build_unit_tests_mbedtls - run: | - scripts/examples/openiotsdk_example.sh -b mbedtls unit-tests - - - name: Build the OTA provider (Linux) - id: build_ota_provider_app - if: steps.build_ota_requestor_app.outcome == 'success' - timeout-minutes: 10 - run: | - scripts/examples/gn_build_example.sh examples/ota-provider-app/linux/ out/ota-provider chip_config_network_layer_ble=false - - - name: "Test: lock-app example (mbedtls)" - if: github.event_name == 'workflow_dispatch' && steps.build_lock_app_mbedtls.outcome == 'success' - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: "Test: ota-requestor-app example" - if: github.event_name == 'workflow_dispatch' && steps.build_ota_requestor_app.outcome == 'success' && steps.build_ota_provider_app.outcome == 'success' - timeout-minutes: 30 - run: | - mkdir out/binaries - cp examples/ota-requestor-app/openiotsdk/build/chip-openiotsdk-ota-requestor-app-example.elf out/binaries/ - scripts/examples/openiotsdk_example.sh -c -v 2 -V 0.0.2 ota-requestor-app - cp examples/ota-requestor-app/openiotsdk/build/chip-openiotsdk-ota-requestor-app-example.ota out/binaries/ - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -p out/binaries -v 2 -V 0.0.2 -C test -n ${TEST_NETWORK_NAME}tap ota-requestor-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: "Test: unit-tests (mbedtls)" - if: github.event_name == 'workflow_dispatch' && steps.build_unit_tests_mbedtls.outcome == 'success' - run: | - scripts/run_in_python_env.sh out/venv \ - 'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests' - - - name: Build lock-app example (psa) - # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 - if: false - id: build_lock_app_psa - run: | - scripts/examples/openiotsdk_example.sh -c -b psa lock-app - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - openiotsdk release lock-app-psa \ - examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ - /tmp/bloat_reports/ - - - name: "Test: lock-app example (psa)" - if: github.event_name == 'workflow_dispatch' && steps.build_lock_app_psa.outcome == 'success' - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: Build unit tests (psa) - id: build_unit_tests_psa - run: | - scripts/examples/openiotsdk_example.sh -b psa unit-tests - - - name: "Test: unit-tests (psa)" - if: github.event_name == 'workflow_dispatch' && steps.build_unit_tests_psa.outcome == 'success' - run: | - scripts/run_in_python_env.sh out/venv \ - 'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests' diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml deleted file mode 100644 index 18d47cf8ef..0000000000 --- a/.github/workflows/examples-qpg.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Build example - QPG - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - qpg: - name: QPG - - env: - BUILD_TYPE: gn_qpg - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: qpg - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build QPG6105 example apps - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target qpg-qpg6105-lock \ - --target qpg-qpg6105-light \ - --target qpg-qpg6105-light-switch \ - --target qpg-qpg6105-thermostat \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Build Matter SDK library - run: | - config/qpg/chip-gn/build.sh - - - name: Prepare some bloat report from the previous builds - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - qpg qpg6105+debug lighting-app \ - out/qpg-qpg6105-light/chip-qpg6105-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - qpg qpg6105+debug lock-app \ - out/qpg-qpg6105-lock/chip-qpg6105-lock-example.out \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: QPG diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml deleted file mode 100644 index 6c4fa05864..0000000000 --- a/.github/workflows/examples-stm32.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Build example - stm32 - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - stm32: - name: stm32 - timeout-minutes: 60 - - env: - BUILD_TYPE: gn_stm32 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: stm32 - extra-submodule-parameters: --recursive - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build stm32 example apps - timeout-minutes: 20 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target stm32-STM32WB5MM-DK-light build \ - " - - - name: Gather size reports - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - stm32 STM32WB5MM-DK light \ - out/stm32-stm32wb5mm-dk-light/chip-stm32-lighting-example.elf \ - /tmp/bloat_reports/ - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: stm32 diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml deleted file mode 100644 index 904ae98fbc..0000000000 --- a/.github/workflows/examples-telink.yaml +++ /dev/null @@ -1,280 +0,0 @@ -# Copyright (c) 2022-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. - -name: Build example - Telink - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - telink: - name: Telink - env: - BUILD_TYPE: telink - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-telink:74 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: telink - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - # - name: Update Zephyr to specific revision (for developers purpose) - # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8" - - - name: Build example Telink (B92 retention) Air Quality Sensor App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-air-quality-sensor' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a_retention air-quality-sensor-app \ - out/telink-tlsr9528a_retention-air-quality-sensor/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (W91) All Clusters App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-all-clusters' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9118bdk40d all-clusters-app \ - out/telink-tlsr9118bdk40d-all-clusters/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B92) All Clusters Minimal App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-all-clusters-minimal' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a all-clusters-minimal-app \ - out/telink-tlsr9528a-all-clusters-minimal/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B95) Bridge App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9258a-bridge' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9258a bridge-app \ - out/telink-tlsr9258a-bridge/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B92 retention) Contact Sensor App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-contact-sensor' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a_retention contact-sensor-app \ - out/telink-tlsr9528a_retention-contact-sensor/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build tools required for Factory Data - run: | - ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - ./scripts/build/gn_gen.sh - ./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p" - mv ./out/$BUILD_TYPE/chip-cert ./out/$BUILD_TYPE/chip-tool ./out/$BUILD_TYPE/spake2p ./out - - - name: clean out build output (keep tools) - run: rm -rf ./out/telink* - - - name: Build example Telink (W91) Lighting App with OTA, Factory Data - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-light-ota-factory-data' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9118bdk40d lighting-app-ota-factory-data \ - out/telink-tlsr9118bdk40d-light-ota-factory-data/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output (keep tools) - run: rm -rf ./out/telink* - - - name: Build example Telink (B91) Lighting App with OTA, RPC, Factory Data and 4Mb flash - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-ota-rpc-factory-data-4mb' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d lighting-app-ota-rpc-factory-data-4mb \ - out/telink-tlsr9518adk80d-light-ota-rpc-factory-data-4mb/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output (keep tools) - run: rm -rf ./out/telink* - - - name: Build example Telink (B92) Light Switch App with OTA, Shell, Factory Data - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-switch-ota-shell-factory-data' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a light-switch-app-ota-shell-factory-data \ - out/telink-tlsr9528a-light-switch-ota-shell-factory-data/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B92) Lock App with DFU - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-lock-dfu' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a lock-app-dfu \ - out/telink-tlsr9528a-lock-dfu/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B95) OTA Requestor App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9258a-ota-requestor' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9258a ota-requestor-app \ - out/telink-tlsr9258a-ota-requestor/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B91 USB) Pump App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-usb' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d pump-app-usb \ - out/telink-tlsr9518adk80d-pump-usb/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B91) Pump Controller App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-controller' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d pump-controller-app \ - out/telink-tlsr9518adk80d-pump-controller/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B91) Shell App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-shell' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d shell \ - out/telink-tlsr9518adk80d-shell/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B92 retention) Smoke CO Alarm App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-smoke-co-alarm' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a_retention smoke_co_alarm-app \ - out/telink-tlsr9528a_retention-smoke-co-alarm/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B91 Mars) Temperature Measurement App with OTA - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-temperature-measurement-mars-ota' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d temperature-measurement-app-mars-ota \ - out/telink-tlsr9518adk80d-temperature-measurement-mars-ota/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (B91) Thermostat App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-thermostat' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d thermostat \ - out/telink-tlsr9518adk80d-thermostat/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink (W91) Window Covering App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-window-covering' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9118bdk40d window-covering \ - out/telink-tlsr9118bdk40d-window-covering/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: Telink diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml deleted file mode 100644 index f6571342a8..0000000000 --- a/.github/workflows/examples-tizen.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) 2021 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. - -name: Build example - Tizen - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - tizen: - name: Tizen - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-tizen:74 - options: --user root - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - "/tmp/output_binaries:/tmp/output_binaries" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: tizen - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build Tizen examples - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target tizen-arm-all-clusters \ - --target tizen-arm-chip-tool-ubsan \ - --target tizen-arm-light-with-ui \ - build \ - --copy-artifacts-to out/artifacts \ - " - - - name: Bloat report - chip-tool - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - tizen arm chip-tool-ubsan out/tizen-arm-chip-tool-ubsan/chip-tool \ - /tmp/bloat_reports/ - - name: Bloat report - all-clusters-app - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - tizen arm all-clusters-app out/tizen-arm-all-clusters/chip-all-clusters-app \ - /tmp/bloat_reports/ - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: Tizen diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml deleted file mode 100644 index 43aee09a82..0000000000 --- a/.github/workflows/full-android.yaml +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (c) 2020 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. - -name: Full builds - Android - -on: - push: - branches-ignore: - - 'dependabot/**' - workflow_dispatch: - -concurrency: - group: full-${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - full_android: - name: Run - - env: - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/ - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-android:74 - volumes: - - "/tmp/log_output:/tmp/test_logs" - - steps: - - uses: actions/checkout@v4 - name: Checkout - with: - token: ${{ github.token }} - # To use act like: - # act -j full_android - # - # Note you likely still need to have non submodules setup for the - # local machine, like: - # git submodule deinit --all - - uses: actions/checkout@v4 - if: ${{ env.ACT }} - name: Checkout (ACT for local build) - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: android - - - name: Cleanup pigweed CIPD packages - # This should not generally be needed, however android CI runs out of space - # We do not need pigweed cross compile here because we use android NDK - # compilers. Removing this package saves a significant amount of space. - continue-on-error: true - run: | - du -sh .environment/cipd/packages/arm - rm -rf .environment/cipd/packages/arm - - name: Build Android arm-chip-tool - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target android-arm-chip-tool build" - - name: Clean out build output - run: rm -rf ./out examples/android/CHIPTool/app/libs/jniLibs/* examples/android/CHIPTool/app/libs/*.jar - - name: Build Android arm-tv-casting-app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target android-arm-tv-casting-app build" - - name: Clean out build output - run: rm -rf ./out examples/tv-casting-app/android/App/app/libs/jniLibs/* examples/tv-casting-app/android/App/app/libs/*.jar - - name: Build Android arm-tv-server - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target android-arm-tv-server build" - - name: Clean out build output - run: rm -rf ./out examples/tv-app/android/App/app/libs/jniLibs/* examples/tv-app/android/App/app/libs/*.jar - - name: Build Android arm64-tv-casting-app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target android-arm64-tv-casting-app build" - - name: Clean out build output - run: rm -rf ./out examples/tv-casting-app/android/app/libs/jniLibs/* examples/android/CHIPTool/app/libs/*.jar - - name: Build Android arm64-tv-server - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target android-arm64-tv-server build" - - name: Clean out build output - run: rm -rf ./out examples/tv-app/android/App/app/libs/jniLibs/* examples/tv-app/android/App/app/libs/*.jar - - name: Build Android arm64-chip-tool - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target android-arm64-chip-tool build" - - name: Run Android build rule tests - run: | - ./scripts/run_in_build_env.sh \ - "ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test" - - name: Clean out build output - run: rm -rf ./out examples/android/CHIPTool/app/libs/jniLibs/* examples/android/CHIPTool/app/libs/*.jar - - name: Build Android arm64-chip-test - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target android-arm64-chip-test build" - - name: Clean out build output - run: rm -rf ./out examples/android/CHIPTest/app/libs/jniLibs/* examples/android/CHIPTest/app/libs/*.jar diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml deleted file mode 100644 index d839317bc4..0000000000 --- a/.github/workflows/fuzzing-build.yaml +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (c) 2021 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. - -name: Fuzzing Builds - -on: - # For now, only manual triggers. - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - build_linux_fuzzing: - name: Build on Linux - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/tmp/log_output:/tmp/test_logs" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - run: apt-get update - - run: apt-get install --fix-missing llvm-10 clang-10 - - name: Try to ensure the objdir-clone dir exists - run: | - mkdir objdir-clone || true - - - name: Bootstrap - uses: ./.github/actions/bootstrap - - - name: Build all-clusters-app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-all-clusters-no-ble-libfuzzer \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Uploading binaries - uses: actions/upload-artifact@v4 - if: ${{ !env.ACT }} - with: - name: objdir-linux - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 - - build_darwin_fuzzing: - name: Build on Darwin - runs-on: macos-13 - if: github.actor != 'restyled-io[bot]' - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Environment - run: brew install llvm - - name: Try to ensure the objdir-clone dir exists - run: | - mkdir objdir-clone || true - - - name: Bootstrap - uses: ./.github/actions/bootstrap - - - name: Build all-clusters-app - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target darwin-x64-all-clusters-no-ble-asan-libfuzzer-clang \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Uploading binaries - uses: actions/upload-artifact@v4 - if: ${{ !env.ACT }} - with: - name: crash-darwin - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index ab3f499423..0000000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: "Validate Gradle Wrapper" -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - -jobs: - validation: - name: "Validation" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: Wandalen/wretry.action@v1.4.5 - name: Gradle Validation - continue-on-error: true - with: - action: gradle/wrapper-validation-action@v1 - attempt_limit: 3 - attempt_delay: 2000 diff --git a/.github/workflows/issue-labeler.yaml b/.github/workflows/issue-labeler.yaml deleted file mode 100644 index a92a4c212d..0000000000 --- a/.github/workflows/issue-labeler.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: "Issue Labeler" -on: - issues: - types: [opened, edited] - -permissions: - issues: write - contents: read - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: github/issue-labeler@v3.4 #May not be the latest version - with: - configuration-path: .github/issue-labeler.yml - not-before: 2020-01-15T02:54:34Z - enable-versioned-regex: 0 - sync-labels: 1 - repo-token: ${{ github.token }} \ No newline at end of file diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml deleted file mode 100644 index a43fdfb7f4..0000000000 --- a/.github/workflows/java-tests.yaml +++ /dev/null @@ -1,308 +0,0 @@ -# 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. - -name: Java Tests - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - java_tests_linux: - name: Linux - - env: - TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" - - if: github.actor != 'restyled-io[bot]' - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build-java:74 - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - - name: Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - mkdir objdir-clone || true - - name: Generate unit tests - run: | - scripts/run_in_build_env.sh \ - './scripts/build/build_examples.py \ - --target linux-x64-tests \ - gen \ - ' - - name: Build unit tests - run: scripts/run_in_build_env.sh 'ninja -C out/linux-x64-tests src:java_controller_tests' - - - name: Run unit tests - # TODO: this direct path loading is not maintainable. Our build system should define and - # support test classes. - run: | - $JAVA_PATH/bin/java \ - -cp 'third_party/java_deps/artifacts/*:out/linux-x64-tests/lib/src/controller/java/*' \ - org.junit.runner.JUnitCore \ - matter.tlv.TlvWriterTest \ - matter.tlv.TlvReadWriteTest \ - matter.tlv.TlvReaderTest \ - matter.jsontlv.JsonToTlvToJsonTest \ - matter.onboardingpayload.ManualCodeTest \ - matter.onboardingpayload.QRCodeTest - - name: Build Java Matter Controller and all clusters app - run: | - scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' - scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.build.txt' - scripts/run_in_python_env.sh out/venv 'pip install colorama' - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-java-matter-controller \ - --target linux-x64-lit-icd-ipv6only \ - build \ - " - - name: Build Kotlin Matter Controller - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-kotlin-matter-controller \ - build \ - " - - name: Run Discover Commissionables Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "discover" \ - --tool-args "commissionables" \ - --factoryreset \ - ' - - name: Run Pairing Onnetwork Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "pairing" \ - --tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run IM Invoke Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run IM Extendable Invoke Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-extendable-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run IM Read Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-read --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ - --factoryreset \ - ' - - name: Run IM Write Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-write --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run IM Subscribe Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-subscribe --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ - --factoryreset \ - ' - - name: Run Pairing AlreadyDiscovered Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "pairing" \ - --tool-args "already-discovered --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \ - --factoryreset \ - ' - # Disabled due to failure: https://github.com/project-chip/connectedhomeip/issues/27361 - # - name: Run Pairing Address-PaseOnly Test - # run: | - # scripts/run_in_python_env.sh out/venv \ - # './scripts/tests/run_java_test.py \ - # --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - # --app-args "--discriminator 3840 --interface-id -1" \ - # --tool-path out/linux-x64-java-matter-controller \ - # --tool-cluster "pairing" \ - # --tool-args "address-paseonly --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \ - # --factoryreset \ - # ' - - name: Run Pairing SetupQRCode Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "pairing" \ - --tool-args "code --nodeid 1 --setup-payload MT:-24J0AFN00KA0648G00 --discover-once 1 --use-only-onnetwork-discovery 0 -t 1000" \ - --factoryreset \ - ' - - name: Run Pairing ManualCode Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "pairing" \ - --tool-args "code --nodeid 1 --setup-payload 34970112332 --discover-once 1 --use-only-onnetwork-discovery 0 -t 1000" \ - --factoryreset \ - ' - - name: Run Pairing ICD Onnetwork Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_java_test.py \ - --app out/linux-x64-lit-icd-ipv6only/lit-icd-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-java-matter-controller \ - --tool-cluster "pairing" \ - --tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run Pairing Onnetwork Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_kotlin_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-kotlin-matter-controller \ - --tool-cluster "pairing" \ - --tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run Kotlin IM Invoke Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_kotlin_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-kotlin-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run Kotlin IM Read Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_kotlin_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-kotlin-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-read --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ - --factoryreset \ - ' - - name: Run Kotlin IM Write Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_kotlin_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-kotlin-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-write --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ - --factoryreset \ - ' - - name: Run Kotlin IM Subscribe Test - run: | - scripts/run_in_python_env.sh out/venv \ - './scripts/tests/run_kotlin_test.py \ - --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ - --app-args "--discriminator 3840 --interface-id -1" \ - --tool-path out/linux-x64-kotlin-matter-controller \ - --tool-cluster "im" \ - --tool-args "onnetwork-long-im-subscribe --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ - --factoryreset \ - ' - - name: Uploading core files - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-core-linux-java-controller - path: /tmp/cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-objdir-linux-java-controller - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 diff --git a/.github/workflows/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml deleted file mode 100644 index a8d3282689..0000000000 --- a/.github/workflows/kotlin-style.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: Kotlin - -on: - pull_request: - paths: - - "**/*.kt" - - ".github/workflows/kotlin-style.yaml" - - "kotlin-detect-config.yaml" - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - - -jobs: - detekt: - name: Static code analysis - runs-on: ubuntu-latest - - steps: - - name: "checkout" - uses: actions/checkout@v4 - - - name: "detekt" - uses: natiginfo/action-detekt-all@1.23.6 - # Detekt seems not to like circular symlinks, so we set up - # explicit paths below - # - # In particular, if symlinks exist and recurse, detekt tries to - # follow, so for example `examples/android/CHIPTest` as a path - # will never end (and eventually run out of HEAP) because - # `examples/android/CHIPTest/third_party/connectedhomeip` is - # circular - with: - args: --parallel --build-upon-default-config --config kotlin-detect-config.yaml --input examples/android/CHIPTest/app,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java - - ktlint: - name: "Format check" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-java@v4 - with: - distribution: 'adopt' - java-version: '17' - - - name: Download ktfmt - run: | - cd /tmp - wget "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.44/ktfmt-0.44-jar-with-dependencies.jar" - - - name: Format kotlin files - run: | - find src examples -name '*.kt' \ - | xargs java -jar /tmp/ktfmt-0.44-jar-with-dependencies.jar --google-style - - - name: Ensure git works in current working directory - run: git config --global --add safe.directory `pwd` - - - name: Check for uncommited changes - run: | - git add . - # Show the full diff - git diff-index -p HEAD -- - # Also show just the files that are different, to make it easy - # to tell at a glance what might be going on. And throw in - # --exit-code to make this job fail if there is a difference. - git diff-index --exit-code HEAD -- diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml deleted file mode 100644 index 59f56fdb54..0000000000 --- a/.github/workflows/labeler.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: "Pull Request Labeler" -on: -- pull_request_target - -jobs: - triage: - name: Label Triage - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 15004c5aca..0000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,347 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Lint Code Base - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: - ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - code-lints: - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build:74 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - # Bootstrap and checkout for internal scripts (like idl_lint) - # to run - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Check for orphaned gn files - if: always() - # We should enforce that ALL new files are referenced in our build scripts. - # Several things do not have a clear fix path: - # - various platform implementations (including darwin-specific files as they - # are not using GN) - # - app/clusters (they are fetched dynamically - this should probably be fixed) - # - # All the rest of the exceptions should be driven down to 0: chip should fully - # be defined in build rules. - # - # This check enforces that for any newly added file, it must be part of some - # BUILD.gn file - run: | - ./scripts/run_in_build_env.sh "./scripts/tools/not_known_to_gn.py \ - src \ - --skip-dir app/clusters \ - --skip-dir darwin \ - --skip-dir include \ - --skip-dir platform/Ameba \ - --skip-dir platform/android \ - --skip-dir platform/ASR \ - --skip-dir platform/Beken \ - --skip-dir platform/bouffalolab \ - --skip-dir platform/cc13xx_26xx \ - --skip-dir platform/cc32xx \ - --skip-dir platform/Darwin \ - --skip-dir platform/ESP32 \ - --skip-dir platform/fake \ - --skip-dir platform/FreeRTOS \ - --skip-dir platform/Infineon \ - --skip-dir platform/Linux \ - --skip-dir platform/mbed \ - --skip-dir platform/mt793x \ - --skip-dir platform/nxp \ - --skip-dir platform/OpenThread \ - --skip-dir platform/qpg \ - --skip-dir platform/silabs \ - --skip-dir platform/telink \ - --skip-dir platform/webos \ - --skip-dir platform/Zephyr \ - --skip-dir test_driver \ - --skip-dir platform/NuttX \ - --known-failure app/app-platform/ContentApp.cpp \ - --known-failure app/app-platform/ContentApp.h \ - --known-failure app/app-platform/ContentAppPlatform.cpp \ - --known-failure app/app-platform/ContentAppPlatform.h \ - --known-failure controller/ExamplePersistentStorage.cpp \ - --known-failure controller/ExamplePersistentStorage.h \ - --known-failure app/AttributeAccessToken.h \ - --known-failure app/CommandResponseSender.h \ - --known-failure app/CommandSenderLegacyCallback.h \ - --known-failure app/ReadHandler.h \ - --known-failure app/reporting/reporting.cpp \ - --known-failure app/reporting/tests/MockReportScheduler.cpp \ - --known-failure app/reporting/tests/MockReportScheduler.h \ - --known-failure app/util/attribute-storage.cpp \ - --known-failure app/util/attribute-storage-detail.h \ - --known-failure app/util/attribute-storage.h \ - --known-failure app/util/attribute-table.cpp \ - --known-failure app/util/attribute-table-detail.h \ - --known-failure app/util/attribute-table.h \ - --known-failure app/util/binding-table.cpp \ - --known-failure app/util/binding-table.h \ - --known-failure app/util/config.h \ - --known-failure app/util/DataModelHandler.cpp \ - --known-failure app/util/DataModelHandler.h \ - --known-failure app/util/ember-compatibility-functions.cpp \ - --known-failure app/util/ember-compatibility-functions.h \ - --known-failure app/util/ember-global-attribute-access-interface.cpp \ - --known-failure app/util/ember-global-attribute-access-interface.h \ - --known-failure app/util/ember-io-storage.cpp \ - --known-failure app/util/ember-io-storage.h \ - --known-failure app/util/endpoint-config-api.h \ - --known-failure app/util/generic-callbacks.h \ - --known-failure app/util/generic-callback-stubs.cpp \ - --known-failure app/util/im-client-callbacks.h \ - --known-failure app/util/IMClusterCommandHandler.h \ - --known-failure app/util/util.cpp \ - --known-failure app/util/util.h \ - --known-failure app/WriteHandler.h \ - --known-failure platform/DeviceSafeQueue.cpp \ - --known-failure platform/DeviceSafeQueue.h \ - --known-failure platform/GLibTypeDeleter.h \ - --known-failure platform/SingletonConfigurationManager.cpp \ - " - - - name: Check for matter lint errors - if: always() - run: | - for idl_file in $(find . -name '*.matter'); do - # TODO: all these conformance failures should be fixed - # Issues exist for most of them: - # https://github.com/project-chip/connectedhomeip/issues/19176 - # https://github.com/project-chip/connectedhomeip/issues/19175 - # https://github.com/project-chip/connectedhomeip/issues/19173 - if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi - if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi - if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi - if [ "$idl_file" = './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi - if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi - # Example is intentionally not spe compliant for use in cert testing - if [ "$idl_file" = './examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter' ]; then continue; fi - - # Test files are intentionally small and not spec-compilant, just parse-compliant - if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/cluster_struct_attribute.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/global_struct_attribute.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/optional_argument.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/simple_attribute.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/large_lighting_app.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter" ]; then continue; fi - - ./scripts/run_in_build_env.sh "./scripts/idl_lint.py --log-level warn $idl_file" >/dev/null || exit 1 - done - - - name: Check broken links - # On-push disabled until the job can run fully green - # At that point the step should be enabled. - if: github.event_name == 'workflow_dispatch' - uses: gaurav-nelson/github-action-markdown-link-check@v1 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: Check for incorrect error use in VerifyOrExit - if: always() - run: | - git grep -I -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: - Check for use of PRI*8, which are not supported on some libcs. - if: always() - run: | - git grep -I -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: - Check for use of PRI*16, which are not supported on some - libcs. - if: always() - run: | - git grep -I -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: - Check for use of PRI*64, which are not supported on some - libcs. - if: always() - run: | - # TODO: MessageDefHelper should ideally not be excluded here. - # TODO: chip_im_initiatore should ideally not be excluded here. - # TODO: TLVDebug should ideally not be excluded here. - # TODO: protocol_decoder.cpp should ideally not be excluded here. - # TODO: PersistentStorageMacros.h should ideally not be excluded here. - git grep -I -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/Darwin' ':(exclude)src/darwin' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' ':(exclude)src/platform/NuttX' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: Check for use of %zu, which are not supported on some libcs. - if: always() - run: | - git grep -I -n "%zu" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - # Comments like '{{! ... }}' should be used in zap files - - name: Do not allow TODO in generated files - if: always() - run: | - git grep -n 'TODO:' -- ./zzz_generated './*/zap-generated/*' && exit 1 || exit 0 - - - name: Check for disallowed include files - if: always() - run: scripts/tools/check_includes.sh - - - name: Check for zcl.json and extension sync status - if: always() - run: scripts/tools/check_zcl_file_sync.py . - - - name: Ensure all PICS are set for tests (to true or false) - if: always() - run: | - scripts/tools/check_test_pics.py src/app/tests/suites/certification/ci-pics-values src/app/tests/suites/certification/PICS.yaml - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: - Check for use of 0x%u and the like, which lead to misleading - output. - if: always() - run: | - git grep -I -n '0x%[0-9l.*-]*[^xX"0-9l.*-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: - Check for use of '"0x" PRIu*' and the like, which lead to - misleading output. - if: always() - run: | - git grep -I -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. - - name: - Check for use of NSLog instead of Matter logging in Matter - framework - if: always() - run: | - git grep -n 'NSLog(' -- src/darwin/Framework/CHIP && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself, as well as excluding the files - # that implement the type-safe accessors - - name: - Check for use of 'emberAfReadAttribute' instead of the - type-safe getters - if: always() - run: | - git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/attribute-table.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself, as well as excluding the files - # that implement the type-safe accessors, attribute writing from the wire, and some - # Pigweed RPC code that seems hard to update. - - name: - Check for use of 'emberAfWriteAttribute' instead of the - type-safe setters - if: always() - run: | - git grep -I -n 'emberAfWriteAttribute' -- './*' \ - ':(exclude).github/workflows/lint.yml' \ - ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' \ - ':(exclude)src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp' \ - ':(exclude)src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp' \ - ':(exclude)src/app/util/attribute-table.cpp' \ - ':(exclude)src/app/util/attribute-table.h' \ - ':(exclude)src/app/util/ember-compatibility-functions.cpp' \ - ':(exclude)src/app/util/mock/CodegenEmberMocks.cpp' \ - ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' \ - ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' \ - && exit 1 || exit 0 - - # Run ruff python linter - - name: Check for errors using ruff Python linter - if: always() - run: | - ruff check - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: - Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should - probably be "SuccessOrExit(err = CHIP_ERROR_*)" - if: always() - run: | - git grep -I -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we want to exclude this file, - # to avoid our grep regexp matching itself. - - name: - Check for use of - "SuccessOrExit(something-without-assignment(", which should - probably be "SuccessOrExit(err = something(" - if: always() - run: | - git grep -I -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. - - name: - Check for use of "using namespace" outside of a class/function - in headers. - if: always() - run: | - # Various platforms have `using namespace chip::Ble` in their BLEManager* headers; just exclude those for now. - # - # Exclude platform openiotsdk bits that do this in their persistent storage header. - # - # Also exclude examples (for now) and third_party, which have various instances of this. - # - # Ignore uses of `System::Clock::Literals`, because that's the only way to have things using _ms32 or whatnot - # in a header file. - git grep -I -n -e '^using namespace' --and --not -e 'System::Clock::Literals' -- './**/*.h' ':(exclude)src/platform/*/BLEManager*.h' ':(exclude)src/platform/openiotsdk/KVPsaPsStore.h' ':(exclude)./examples' ':(exclude)./third_party' && exit 1 || exit 0 diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml deleted file mode 100644 index ade1bd56ea..0000000000 --- a/.github/workflows/minimal-build.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# 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. - -name: Minimal Build (Linux / configure) - -on: - push: - branches-ignore: - - "dependabot/**" - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - minimal-all-clusters: - name: Linux / configure build of all-clusters-app - - if: github.actor != 'restyled-io[bot]' - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build-minimal:74 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout submodules # but don't bootstrap! - uses: ./.github/actions/checkout-submodules - with: - platform: linux - - - name: Configure and build All Clusters App - run: | - CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux --enable-recommended=no && ./ninja-build - - minimal-network-manager: - name: Linux / configure build of network-manager-app - - if: github.actor != 'restyled-io[bot]' - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build-minimal:74 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout submodules # but don't bootstrap! - uses: ./.github/actions/checkout-submodules - with: - platform: linux - - - name: Configure and build Network Manager App - run: | - CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux --enable-recommended=no && ./ninja-build diff --git a/.github/workflows/protocol_compatibility.yaml b/.github/workflows/protocol_compatibility.yaml deleted file mode 100644 index 6c8960072e..0000000000 --- a/.github/workflows/protocol_compatibility.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Backwards compatibility check -on: - pull_request: - paths: - - "src/controller/data_model/controller-clusters.matter" - -jobs: - check_clusters_matter: - name: Check controller-clusters.matter backwards compatibility - runs-on: ubuntu-latest - if: github.event.pull_request && !(contains(github.event.pull_request.labels.*.name, 'skip-protocol-compatibility')) - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install click coloredlogs lark - - name: Create old/new copies - run: | - mkdir -p out - cp src/controller/data_model/controller-clusters.matter out/new_version.matter - wget '${{github.event.pull_request.diff_url}}' --output-document out/patch.diff - patch -p1 --reverse /dev/null || (sudo apt update && sudo apt install curl -y) - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ - && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ - && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ - && sudo apt update \ - && sudo apt install gh -y - - - name: Tag Release & Generate Notes - env: - GH_TOKEN: ${{ github.token }} - run: | - export BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) - echo "Tagging against branch: $BRANCH_NAME" - ./scripts/tagging/tag_new_release.sh --generate-notes --target "$BRANCH_NAME" -d # Note this is a draft for now. - - diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index 2c68b91222..0000000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,627 +0,0 @@ -# Copyright (c) 2020-2021 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. - -name: Tests - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == - 'pull_request' && github.event.number) || (github.event_name == - 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - test_suites_linux: - name: Test Suites - Linux - - strategy: - matrix: - build_variant: [no-ble-tsan-clang] - chip_tool: [""] - env: - BUILD_VARIANT: ${{matrix.build_variant}} - CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} - TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" - LSAN_OPTIONS: detect_leaks=1 - - if: github.actor != 'restyled-io[bot]' - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build:74 - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - steps: - - name: Checkout - uses: actions/checkout@v4 - # To use act like: - # act -j test_suites_linux - # - # Note you likely still need to have non submodules setup for the - # local machine, like: - # git submodule deinit --all - - uses: actions/checkout@v4 - if: ${{ env.ACT }} - name: Checkout (ACT for local build) - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - - name: Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - mkdir objdir-clone || true - - - name: Validate that xml are parsable - # The sub-items being run here are the same as the input XMLs listed - # at src/app/zap-templates/zcl/zcl.json - # - # This ensures that the syntax of the XML can always be parsed/validated, however it - # does not enforce that the content is understood (that part is covered by parser - # unit tests) - # - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/py_matter_idl/matter_idl/zapxml_parser.py \ - --no-print \ - --log-level info \ - src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \ - src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \ - src/app/zap-templates/zcl/data-model/chip/global-enums.xml \ - src/app/zap-templates/zcl/data-model/chip/global-structs.xml \ - src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \ - src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \ - src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml \ - src/app/zap-templates/zcl/data-model/chip/chip-ota.xml \ - src/app/zap-templates/zcl/data-model/chip/chip-types.xml \ - src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml \ - src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml \ - src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \ - src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/proxy-configuration-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/proxy-discovery-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/proxy-valid-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml \ - src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/scene.xml \ - src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/test-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/window-covering.xml \ - src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \ - src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \ - src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \ - " - - 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${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ - --target linux-x64-all-clusters-${BUILD_VARIANT} \ - --target linux-x64-lock-${BUILD_VARIANT} \ - --target linux-x64-ota-provider-${BUILD_VARIANT} \ - --target linux-x64-ota-requestor-${BUILD_VARIANT} \ - --target linux-x64-tv-app-${BUILD_VARIANT} \ - --target linux-x64-bridge-${BUILD_VARIANT} \ - --target linux-x64-lit-icd-${BUILD_VARIANT} \ - --target linux-x64-microwave-oven-${BUILD_VARIANT} \ - --target linux-x64-rvc-${BUILD_VARIANT} \ - --target linux-x64-network-manager-${BUILD_VARIANT} \ - build \ - --copy-artifacts-to objdir-clone \ - " - - - name: Run Tests using the python parser sending commands to chip-tool - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/tests/run_test_suite.py \ - --runner chip_tool_python \ - --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ - run \ - --iterations 1 \ - --test-timeout-seconds 120 \ - --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ - --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ - --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ - --rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ - --network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ - " - - - name: Run purposeful failure tests using the python parser sending commands to chip-tool - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/tests/run_test_suite.py \ - --runner chip_tool_python \ - --include-tags PURPOSEFUL_FAILURE \ - --chip-tool ./out/linux-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/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - " - - - name: Run Tests using chip-repl (skip slow) - if: github.event_name == 'pull_request' - run: | - ./scripts/run_in_python_env.sh out/venv \ - "./scripts/tests/run_test_suite.py \ - --runner chip_repl_python \ - --exclude-tags MANUAL \ - --exclude-tags FLAKY \ - --exclude-tags IN_DEVELOPMENT \ - --exclude-tags EXTRA_SLOW \ - --exclude-tags SLOW \ - --exclude-tags PURPOSEFUL_FAILURE \ - run \ - --iterations 1 \ - --test-timeout-seconds 120 \ - --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ - --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ - --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ - --rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ - --network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ - " - - name: Run Tests using chip-repl (including slow) - if: github.event_name == 'push' - run: | - ./scripts/run_in_python_env.sh out/venv \ - "./scripts/tests/run_test_suite.py \ - --runner chip_repl_python \ - run \ - --iterations 1 \ - --test-timeout-seconds 120 \ - --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ - --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ - --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ - --rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ - --network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ - " - - name: Uploading core files - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-core-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: /tmp/cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-objdir-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 - - test_suites_darwin: - name: Test Suites - Darwin - - strategy: - matrix: - build_variant: [no-ble-asan-clang, no-ble-tsan-clang] - chip_tool: [""] - env: - BUILD_VARIANT: ${{matrix.build_variant}} - CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} - TSAN_OPTIONS: "halt_on_error=1" - LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt - - if: github.actor != 'restyled-io[bot]' - runs-on: macos-13 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Environment - # coreutils for stdbuf - run: brew install coreutils - - name: - Try to ensure the directories for core dumping and diagnostic - log collection exist and we can write them. - run: | - sudo chown ${USER} /cores || true - mkdir -p ~/Library/Logs/DiagnosticReports || true - mkdir objdir-clone || true - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - 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-x64-network-manager-${BUILD_VARIANT} \ - build \ - --copy-artifacts-to objdir-clone \ - " - - - name: Run Tests using the python parser sending commands to chip-tool - run: | - ./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 \ - --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 \ - --network-manager-app ./out/darwin-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ - " - - - name: Run purposeful failure tests using the python parser sending commands to chip-tool - run: | - ./scripts/run_in_build_env.sh \ - "./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 \ - 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 \ - " - - - name: Uploading core files - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: /cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading diagnostic logs - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: ~/Library/Logs/DiagnosticReports/ - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 - - repl_tests_linux: - name: REPL Tests - Linux - - env: - TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" - - if: github.actor != 'restyled-io[bot]' - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build:74 - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - - name: Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - mkdir objdir-clone || true - - - name: Build Python REPL and example apps - # NOTE: the data-mode-check + check-failure-die is not 100% perfect as different - # encoding sizes for data that keeps changing may alter over time (e.g. anything relating to time - # or resources such as packet counts or other similar counters) - # - # This may result in invalid errors, however for most purposes of our testing, we are unlikely to - # hit such cases so we remain very strict on testing here. - 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-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die \ - --target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test \ - --target linux-x64-fabric-admin-rpc-ipv6only-clang \ - --target linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang \ - --target linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang \ - --target linux-x64-python-bindings \ - build \ - --copy-artifacts-to objdir-clone \ - " - - name: Generate an argument environment file - run: | - echo -n "" >/tmp/test_env.yaml - echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app" >> /tmp/test_env.yaml - echo "CHIP_LOCK_APP: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app" >> /tmp/test_env.yaml - echo "ENERGY_MANAGEMENT_APP: out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app" >> /tmp/test_env.yaml - echo "LIT_ICD_APP: out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app" >> /tmp/test_env.yaml - echo "CHIP_MICROWAVE_OVEN_APP: out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app" >> /tmp/test_env.yaml - echo "CHIP_RVC_APP: out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app" >> /tmp/test_env.yaml - echo "NETWORK_MANAGEMENT_APP: out/linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test/matter-network-manager-app" >> /tmp/test_env.yaml - echo "FABRIC_ADMIN_APP: out/linux-x64-fabric-admin-rpc-ipv6only-clang/fabric-admin" >> /tmp/test_env.yaml - echo "FABRIC_BRIDGE_APP: out/linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang/fabric-bridge-app" >> /tmp/test_env.yaml - echo "LIGHTING_APP_NO_UNIQUE_ID: out/linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang/chip-lighting-app" >> /tmp/test_env.yaml - echo "TRACE_APP: out/trace_data/app-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml - echo "TRACE_TEST_JSON: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml - echo "TRACE_TEST_PERFETTO: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml - - - name: Run Tests - run: | - mkdir -p out/trace_data - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing' - scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_ICDM_2_1.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py' - - - - name: Uploading core files - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-core-linux-python-repl - path: /tmp/cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-objdir-linux-python-repl - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 - - repl_tests_darwin: - name: REPL Tests - Darwin - - strategy: - matrix: - build_variant: [no-ble-no-wifi-tsan-clang] - env: - BUILD_VARIANT: ${{matrix.build_variant}} - TSAN_OPTIONS: "halt_on_error=1" - - if: github.actor != 'restyled-io[bot]' && false - runs-on: macos-13 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Environment - # coreutils for stdbuf - run: brew install coreutils - - name: - Try to ensure the directories for core dumping and diagnostic - log collection exist and we can write them. - run: | - sudo chown ${USER} /cores || true - mkdir -p ~/Library/Logs/DiagnosticReports || true - mkdir objdir-clone || true - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: darwin - bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - - - name: Build Python REPL and example 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 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-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 }} - with: - name: crash-core-darwin-python-repl - path: /cores/ - # Cores are big; don't hold on to them too long. - retention-days: 5 - - name: Uploading traces on failure - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: trace-data-python-repl - path: out/trace_data/ - retention-days: 5 - - name: Uploading diagnostic logs - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-log-darwin-python-repl - path: ~/Library/Logs/DiagnosticReports/ - - name: Uploading objdir for debugging - uses: actions/upload-artifact@v4 - if: ${{ failure() && !env.ACT }} - with: - name: crash-objdir-darwin-python-repl - path: objdir-clone/ - # objdirs are big; don't hold on to them too long. - retention-days: 5 diff --git a/.github/workflows/third-party-check.yaml b/.github/workflows/third-party-check.yaml deleted file mode 100644 index beda0af41b..0000000000 --- a/.github/workflows/third-party-check.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# 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. - -name: Check for Unintentional Submodule Updates - -on: - pull_request: - branches-ignore: - - "dependabot/**" - paths: - - "third_party/**" - - ".gitmodules" - -jobs: - check-submodule-update-label: - name: Check For Submodule Update Label - runs-on: ubuntu-latest - steps: - - if: ${{ !contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }} - name: Fail - run: | - echo This pull request attempts to update submodules without the changing-submodules-on-purpose label. Please apply that label if the changes are intentional, or remove those changes. - exit 1 - - if: ${{ contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }} - name: Success - run: | - echo PR looks good. - exit 0 diff --git a/.github/workflows/todos.yaml b/.github/workflows/todos.yaml deleted file mode 100644 index cc2148da4e..0000000000 --- a/.github/workflows/todos.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Create issues from To-Dos - -on: - workflow_dispatch: - inputs: - importAll: - default: "false" - required: false - type: boolean - description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing. -# push: Will move this to a cadence -# branches: -# - master - -permissions: - issues: write - repository-projects: read - contents: read - -jobs: - todos: - name: Scan for To-Dos - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Run Issue Bot - uses: derjuulsn/todo-issue@main - with: - # autoAssign: false - reopenClosed: false - # label: "todo" - # disabled until this works: https://github.com/DerJuulsn/todo-issue/issues/9 - keywords: "todo,fixme,bug,TODO,FIXME,BUG" - excludePattern: "^(node_modules/|third_party/|zzz_generated/|docs/|.vscode/)" - env: - GITHUB_TOKEN: ${{ secrets.MATTER_PAT }} diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml deleted file mode 100644 index 040e50f153..0000000000 --- a/.github/workflows/unit_integration_test.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (c) 2020 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. - -name: Unit / Integration Tests - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - unit_tests: - name: Unit / Integration Tests - if: github.actor != 'restyled-io[bot]' - - strategy: - matrix: - type: [main, clang, mbedtls, rotating_device_id, icd] - env: - BUILD_TYPE: ${{ matrix.type }} - - runs-on: ubuntu-latest - - container: - image: ghcr.io/project-chip/chip-build:74 - volumes: - - "/:/runner-root-volume" - - "/tmp/log_output:/tmp/test_logs" - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - bootstrap-log-name: bootstrap-logs-unittest-${{ matrix.type }} - - name: Artifact suffix - id: outsuffix - uses: haya14busa/action-cond@v1 - if: ${{ !env.ACT }} - with: - cond: ${{ github.event.pull_request.number == '' }} - if_true: "${{ github.sha }}" - if_false: "pull-${{ github.event.pull_request.number }}" - - name: Setup Build - # TODO: If rotating_device_id is ever removed/combined, we have to cover boringssl otherwise - run: | - case $BUILD_TYPE in - "main") GN_ARGS='';; - "clang") GN_ARGS='is_clang=true';; - "mbedtls") GN_ARGS='chip_crypto="mbedtls"';; - "rotating_device_id") GN_ARGS='chip_crypto="boringssl" chip_enable_rotating_device_id=true';; - "icd") GN_ARGS='chip_enable_icd_server=true chip_enable_icd_lit=true';; - *) ;; - esac - - scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" - - name: Run Build - run: scripts/run_in_build_env.sh "ninja -C out/$BUILD_TYPE" - - name: Run Tests - run: scripts/tests/gn_tests.sh - # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 - # TODO https://github.com/project-chip/connectedhomeip/issues/1512 - # - name: Run Code Coverage - # if: ${{ contains('main', env.BUILD_TYPE) }} - # run: scripts/tools/codecoverage.sh - # - name: Upload Code Coverage - # if: ${{ contains('main', env.BUILD_TYPE) }} - # run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml deleted file mode 100644 index dca68cc94e..0000000000 --- a/.github/workflows/zap_regeneration.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2020 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. - -name: ZAP - Regenerate - -on: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - zap_regeneration: - name: ZAP Regeneration - - runs-on: ubuntu-20.04 - container: - image: ghcr.io/project-chip/chip-build:74 - defaults: - run: - shell: sh - if: github.actor != 'restyled-io[bot]' - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: true - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - - - name: Generate all - run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py - - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - message: Regenerating ZAP diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml deleted file mode 100644 index 5ed20b29ad..0000000000 --- a/.github/workflows/zap_templates.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (c) 2020 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. - -name: ZAP - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - zap_templates: - name: ZAP templates generation - - runs-on: ubuntu-20.04 - container: - image: ghcr.io/project-chip/chip-build:74 - defaults: - run: - shell: sh - if: github.actor != 'restyled-io[bot]' - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: linux - # Java formatting requires a newer java to run ktfmt - # TODO: this should be eventually inside Docker files - - name: Update java - run: | - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -fy --fix-missing openjdk-17-jre - # Clean out java generated files: since java codegen will generate one file per - # structure/cluster, if clusters and structures are ever changed (for in progress work) - # this may leave obsolete files. Ensure we always check for clean regen. - - name: Ensure clean java - run: rm -rf src/controller/java/generated/ - - name: Generate all - run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py - - name: Generate script-maintained items (ERROR_CODES.md) - run: ./scripts/run_in_build_env.sh "scripts/error_table.py > docs/ERROR_CODES.md" - - name: Ensure git works in current working directory - run: git config --global --add safe.directory `pwd` - - name: Check for uncommited changes - run: | - git add . - # Show the full diff - git diff-index -p HEAD -- - # Also show just the files that are different, to make it easy - # to tell at a glance what might be going on. And throw in - # --exit-code to make this job fail if there is a difference. - git diff-index --exit-code HEAD -- From 89b29731481fde6a14ca658e4405a98d9874362b Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs Date: Mon, 23 Sep 2024 11:52:52 -0400 Subject: [PATCH 06/15] Moved definition depending on app-common/zap-generated/attribute-type.h in .ccp file --- src/app/util/attribute-metadata.cpp | 12 +++++++++++- src/app/util/attribute-metadata.h | 5 ++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/app/util/attribute-metadata.cpp b/src/app/util/attribute-metadata.cpp index bf649a9300..09521d9ff1 100644 --- a/src/app/util/attribute-metadata.cpp +++ b/src/app/util/attribute-metadata.cpp @@ -18,6 +18,16 @@ #include +bool EmberAfAttributeMetadata::IsBoolean() const +{ + return attributeType == ZCL_BOOLEAN_ATTRIBUTE_TYPE; +} + +bool EmberAfAttributeMetadata::IsSignedIntegerAttribute() const +{ + return chip::app::IsSignedAttributeType(attributeType); +} + bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType) { return (attributeType == ZCL_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_CHAR_STRING_ATTRIBUTE_TYPE); @@ -26,4 +36,4 @@ bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType) bool emberAfIsLongStringAttributeType(EmberAfAttributeType attributeType) { return (attributeType == ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); -} +} \ No newline at end of file diff --git a/src/app/util/attribute-metadata.h b/src/app/util/attribute-metadata.h index 5be6916438..970deb464b 100644 --- a/src/app/util/attribute-metadata.h +++ b/src/app/util/attribute-metadata.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include @@ -161,12 +160,12 @@ struct EmberAfAttributeMetadata /** * Check wether this attribute is a boolean based on its type according to the spec. */ - bool IsBoolean() const { return attributeType == ZCL_BOOLEAN_ATTRIBUTE_TYPE; } + bool IsBoolean() const; /** * Check wether this attribute is signed based on its type according to the spec. */ - bool IsSignedIntegerAttribute() const { return chip::app::IsSignedAttributeType(attributeType); } + bool IsSignedIntegerAttribute() const; /** * Check whether this attribute has a define min and max. From 8e0b710c78040d760c0331c3496dbd681dc69c8f Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Tue, 8 Oct 2024 08:58:22 -0400 Subject: [PATCH 07/15] [ICD] Make optional spec checks mandatory with the launch of LongIdleTime ICDs (#35956) (#35960) * Remove optional spec check * Add static_assert for the slow poll config for SIT ICDs * Add missing include * fix restyler error * fix spacing * Remove client build flag since it is not used --- config/esp32/components/chip/CMakeLists.txt | 3 --- config/esp32/components/chip/Kconfig | 9 +------ config/nrfconnect/chip-module/CMakeLists.txt | 1 - .../enabling_icd_on_ti_devices.md | 3 --- .../contact-sensor-app/nxp/k32w0/args.gni | 1 - .../contact-sensor-app/nxp/k32w1/args.gni | 1 - .../contact-sensor-app/nxp/mcxw71/args.gni | 1 - .../silabs/build_for_wifi_args.gni | 1 - examples/lit-icd-app/silabs/openthread.gni | 1 - examples/lock-app/nxp/k32w1/args.gni | 1 - examples/lock-app/nxp/mcxw71/args.gni | 1 - .../silabs/build_for_wifi_args.gni | 1 - .../smoke-co-alarm-app/silabs/openthread.gni | 1 - src/app/icd/icd.gni | 8 ------ src/app/icd/server/BUILD.gn | 1 - src/app/icd/server/ICDConfigurationData.cpp | 8 +++--- src/app/icd/server/ICDConfigurationData.h | 26 +++++++++++-------- src/app/icd/server/ICDManager.cpp | 3 --- 18 files changed, 20 insertions(+), 51 deletions(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index f7685cf760..fde62765dd 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -143,9 +143,6 @@ endif() if(CONFIG_ENABLE_ICD_SERVER) chip_gn_arg_append("chip_enable_icd_server" "true") - if(CONFIG_ICD_ENFORCE_SIT_SLOW_POLL_LIMIT) - chip_gn_arg_append("icd_enforce_sit_slow_poll_limit" "true") - endif() if(CONFIG_ICD_REPORT_ON_ACTIVE_MODE) chip_gn_arg_append("chip_icd_report_on_active_mode" "true") endif() diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 5c36284f07..c61ac770a6 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -32,7 +32,7 @@ menu "CHIP Core" default 8 help The maximum number of simultaneously active CHIP exchange contexts. - + An exchange context object is used to track the state of an ongoing CHIP message exchange (conversation) with a peer, e.g. a cloud service, a mobile application, or another device. @@ -410,13 +410,6 @@ menu "CHIP Device Layer" help Enables or Disables ICD server - config ICD_ENFORCE_SIT_SLOW_POLL_LIMIT - bool "Enforce SIT Slow Polling Max value to 15 seconds" - depends on ENABLE_ICD_SERVER - default n - help - Set to true to enforce SIT Slow Polling Max value to 15seconds - config ICD_REPORT_ON_ACTIVE_MODE bool "Emit a report on entering active mode" depends on ENABLE_ICD_SERVER diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 3896ed6be7..b3180fdc1b 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -156,7 +156,6 @@ if (CONFIG_CHIP_ENABLE_ICD_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_dsls" CONFIG_CHIP_ICD_DSLS_SUPPORT) - matter_add_gn_arg_bool ("icd_enforce_sit_slow_poll_limit" TRUE) endif() if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) diff --git a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md b/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md index 50495a601e..b024b90b40 100644 --- a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md +++ b/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md @@ -24,9 +24,6 @@ Trigger Support, set the following parameter to true: chip_enable_icd_lit = true ``` -TI examples have only been tested with the ICD Server configuration. To enable -the client configuration, set `chip_enable_icd_client` to true. - Persistent subscriptions allow devices to attempt resuming existing subscriptions following a device reset. To enable persistent subscriptions, set the following parameter to true: diff --git a/examples/contact-sensor-app/nxp/k32w0/args.gni b/examples/contact-sensor-app/nxp/k32w0/args.gni index 1709f1da73..f4b68ae740 100644 --- a/examples/contact-sensor-app/nxp/k32w0/args.gni +++ b/examples/contact-sensor-app/nxp/k32w0/args.gni @@ -28,7 +28,6 @@ chip_generate_link_map_file = true chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/k32w1/args.gni b/examples/contact-sensor-app/nxp/k32w1/args.gni index 98372f4b82..e5654bdbc7 100644 --- a/examples/contact-sensor-app/nxp/k32w1/args.gni +++ b/examples/contact-sensor-app/nxp/k32w1/args.gni @@ -32,7 +32,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false chip_enable_icd_dsls = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/mcxw71/args.gni b/examples/contact-sensor-app/nxp/mcxw71/args.gni index 72634a2308..6e6015933d 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/args.gni +++ b/examples/contact-sensor-app/nxp/mcxw71/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni index 56cd70b217..6ef009e906 100644 --- a/examples/lit-icd-app/silabs/build_for_wifi_args.gni +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -29,7 +29,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_enable_icd_lit = true # ICD Matter Configuration flags diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni index b12529c2ca..e84e7be8ed 100644 --- a/examples/lit-icd-app/silabs/openthread.gni +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -32,7 +32,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true diff --git a/examples/lock-app/nxp/k32w1/args.gni b/examples/lock-app/nxp/k32w1/args.gni index e0c41d1e34..b7a2d790ef 100644 --- a/examples/lock-app/nxp/k32w1/args.gni +++ b/examples/lock-app/nxp/k32w1/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/lock-app/nxp/mcxw71/args.gni b/examples/lock-app/nxp/mcxw71/args.gni index 761b050b80..1a0940c96a 100644 --- a/examples/lock-app/nxp/mcxw71/args.gni +++ b/examples/lock-app/nxp/mcxw71/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni index 0619082413..e5097f8a1d 100644 --- a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni +++ b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni @@ -28,7 +28,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_enable_icd_lit = true # ICD Matter Configuration flags diff --git a/examples/smoke-co-alarm-app/silabs/openthread.gni b/examples/smoke-co-alarm-app/silabs/openthread.gni index 845b2220b4..f2a7ab6ed7 100644 --- a/examples/smoke-co-alarm-app/silabs/openthread.gni +++ b/examples/smoke-co-alarm-app/silabs/openthread.gni @@ -32,7 +32,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true diff --git a/src/app/icd/icd.gni b/src/app/icd/icd.gni index ed3fd0518f..b7fef896f5 100644 --- a/src/app/icd/icd.gni +++ b/src/app/icd/icd.gni @@ -14,23 +14,15 @@ declare_args() { # Matter SDK Configuration flag to enable ICD server functionality - # TODO - Add Specifics when the design is refined chip_enable_icd_server = false chip_enable_icd_lit = false - # Matter SDK Configuration flag to enable ICD client functionality - # TODO - Add Specifics when the design is refined - chip_enable_icd_client = false - # Matter SDK Configuration flag to make the ICD manager emit a report on entering active mode chip_icd_report_on_active_mode = false icd_max_notification_subscribers = 1 - # Set to true to enforce SIT Slow Polling Max value to 15seconds (spec 9.16.1.5) - icd_enforce_sit_slow_poll_limit = false - # Set to true if device supports dynamic switching from SIT to LIT operating modes (DSLS) chip_enable_icd_dsls = false } diff --git a/src/app/icd/server/BUILD.gn b/src/app/icd/server/BUILD.gn index e1967c23f5..bef9a0730a 100644 --- a/src/app/icd/server/BUILD.gn +++ b/src/app/icd/server/BUILD.gn @@ -39,7 +39,6 @@ buildconfig_header("icd-server-buildconfig") { "CHIP_CONFIG_ENABLE_ICD_DSLS=${chip_enable_icd_dsls}", "ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_icd_report_on_active_mode}", "ICD_MAX_NOTIFICATION_SUBSCRIBERS=${icd_max_notification_subscribers}", - "ICD_ENFORCE_SIT_SLOW_POLL_LIMIT=${icd_enforce_sit_slow_poll_limit}", ] visibility = [ ":icd-server-config" ] diff --git a/src/app/icd/server/ICDConfigurationData.cpp b/src/app/icd/server/ICDConfigurationData.cpp index cfd2325671..44d78bfadf 100644 --- a/src/app/icd/server/ICDConfigurationData.cpp +++ b/src/app/icd/server/ICDConfigurationData.cpp @@ -16,7 +16,6 @@ */ #include "ICDConfigurationData.h" -#include #include namespace chip { @@ -25,15 +24,16 @@ ICDConfigurationData ICDConfigurationData::instance; System::Clock::Milliseconds32 ICDConfigurationData::GetSlowPollingInterval() { -#if ICD_ENFORCE_SIT_SLOW_POLL_LIMIT - // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. +#if CHIP_CONFIG_ENABLE_ICD_LIT + // When in SIT mode, the slow poll interval SHALL NOT be greater than the SIT mode polling threshold, per spec. // This is important for ICD device configured for LIT operation but currently operating as a SIT // due to a lack of client registration if (mICDMode == ICDMode::SIT && mSlowPollingInterval > kSITPollingThreshold) { return kSITPollingThreshold; } -#endif +#endif // CHIP_CONFIG_ENABLE_ICD_LIT + return mSlowPollingInterval; } diff --git a/src/app/icd/server/ICDConfigurationData.h b/src/app/icd/server/ICDConfigurationData.h index 0d6e17e55e..4d2597ef26 100644 --- a/src/app/icd/server/ICDConfigurationData.h +++ b/src/app/icd/server/ICDConfigurationData.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include @@ -77,14 +78,11 @@ class ICDConfigurationData System::Clock::Seconds32 GetMaximumCheckInBackoff() { return mMaximumCheckInBackOff; } /** - * If ICD_ENFORCE_SIT_SLOW_POLL_LIMIT is set to 0, function will always return the configured Slow Polling interval - * (CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL). - * - * If ICD_ENFORCE_SIT_SLOW_POLL_LIMIT is set to 1, the returned value will depend on the devices operating mode. + * The returned value will depend on the devices operating mode. * If ICDMode == SIT && the configured slow poll interval is superior to the maximum threshold (15s), the function will return - * the threshold (15s). If ICDMode == SIT but the configured slow poll interval is equal or inferior to the threshold, the - * function will the return the configured slow poll interval. If ICDMode == LIT, the function will return the configured slow - * poll interval. + * the threshold kSITPollingThreshold (<= 15s). If ICDMode == SIT but the configured slow poll interval is equal or inferior to + * the threshold, the function will the return the configured slow poll interval. If ICDMode == LIT, the function will return + * the configured slow poll interval. * * @return System::Clock::Milliseconds32 */ @@ -158,12 +156,18 @@ class ICDConfigurationData "Spec requires the MaximumCheckInBackOff to be equal or superior to the IdleModeDuration"); System::Clock::Seconds32 mMaximumCheckInBackOff = System::Clock::Seconds32(CHIP_CONFIG_ICD_MAXIMUM_CHECK_IN_BACKOFF_SEC); - // SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) - static_assert((CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT).count() <= 15000, + // SIT ICDs SHALL have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) + static constexpr System::Clock::Milliseconds32 kSitIcdSlowPollMaximum = System::Clock::Milliseconds32(15000); + static_assert((CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT).count() <= kSitIcdSlowPollMaximum.count(), "Spec requires the maximum slow poll interval for the SIT device to be smaller or equal than 15 s."); static constexpr System::Clock::Milliseconds32 kSITPollingThreshold = CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT; - System::Clock::Milliseconds32 mSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; - System::Clock::Milliseconds32 mFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; + +#if CHIP_CONFIG_ENABLE_ICD_LIT == 0 + static_assert((CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL <= kSitIcdSlowPollMaximum), + "LIT support is required for slow polling intervals superior to 15 seconds"); +#endif + System::Clock::Milliseconds32 mSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + System::Clock::Milliseconds32 mFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; ICDMode mICDMode = ICDMode::SIT; }; diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp index 3e89af1e16..ba349b22b9 100644 --- a/src/app/icd/server/ICDManager.cpp +++ b/src/app/icd/server/ICDManager.cpp @@ -80,9 +80,6 @@ void ICDManager::Init() VerifyOrDieWithMsg(ICDConfigurationData::GetInstance().GetMinLitActiveModeThreshold() <= ICDConfigurationData::GetInstance().GetActiveModeThreshold(), AppServer, "The minimum ActiveModeThreshold value for a LIT ICD is 5 seconds."); - // Disabling check until LIT support is compelte - // VerifyOrDieWithMsg((GetSlowPollingInterval() <= GetSITPollingThreshold()) , AppServer, - // "LIT support is required for slow polling intervals superior to 15 seconds"); } #endif // CHIP_CONFIG_ENABLE_ICD_LIT From 3ff8a03a30998b0fbee9afeed9ed31e6480cf54e Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:14:48 -0400 Subject: [PATCH 08/15] Add missing feature map bit (#35915) (#35966) * Add missing feature map bit * Generation Co-authored-by: Andrei Litvin --- .../light-switch-common/light-switch-app.matter | 2 +- .../light-switch-app/light-switch-common/light-switch-app.zap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 947a24740f..e2fea1bdb8 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -3222,7 +3222,7 @@ endpoint 2 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 2; + ram attribute featureMap default = 6; ram attribute clusterRevision default = 2; } } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 89f718140f..595b0d8f83 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -5587,7 +5587,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, From a0845c83a447675f8dd160ed5b5277ac7ec9942e Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:30:03 -0400 Subject: [PATCH 09/15] [SL-TEMP] Bugfix temporary em req removal (#43) * Added the temporary fix to remove ot em1 commit a1b548882d3c5988048ea98b85b6558210181550 Author: lpbeliveau-silabs Date: Thu Oct 3 17:48:35 2024 -0400 Added the line to disable the em1 req from OT Moved the EM req requirement removal to AppInit * Added ifdef to ignore fix on gn builds --- examples/platform/silabs/MatterConfig.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 20f73ab681..2ca0cfa107 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -79,6 +79,13 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include +#if CHIP_ENABLE_OPENTHREAD && (SL_MATTER_GN_BUILD == 0) +// SLC-FIX +// TODO: Remove the Power Manager include when OT does not add an EM1 req at init +#define CURRENT_MODULE_NAME "OPENTHREAD" +#include "sl_power_manager.h" +#endif + /********************************************************** * Defines *********************************************************/ @@ -183,6 +190,12 @@ void ApplicationStart(void * unused) void SilabsMatterConfig::AppInit() { + #if CHIP_ENABLE_OPENTHREAD && (SL_MATTER_GN_BUILD == 0) + // SLC-FIX + // TODO: Remove the Power Manager remove req when OT does not add an EM1 req at init + sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1); + #endif + GetPlatform().Init(); sMainTaskHandle = osThreadNew(ApplicationStart, nullptr, &kMainTaskAttr); SILABS_LOG("Starting scheduler"); From 42efe9d66a6e77aaf5556d216b86e2f9fd89bf86 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:06:51 -0400 Subject: [PATCH 10/15] [Silabs] Refactor Sensor code (#35979) (#35992) * Refactor Sensor and LCD code * Address review comments --- examples/platform/silabs/Si70xxSensor.cpp | 67 +++++++++++++++++++ examples/platform/silabs/Si70xxSensor.h | 48 +++++++++++++ examples/platform/silabs/SiWx917/BUILD.gn | 7 ++ .../platform/silabs/TemperatureSensor.cpp | 62 ----------------- examples/platform/silabs/TemperatureSensor.h | 28 -------- examples/platform/silabs/display/demo-ui.c | 1 - examples/platform/silabs/display/lcd.h | 3 +- examples/platform/silabs/efr32/BUILD.gn | 7 ++ examples/thermostat/silabs/BUILD.gn | 28 -------- .../thermostat/silabs/src/SensorManager.cpp | 42 ++++++------ third_party/silabs/efr32_sdk.gni | 27 ++++++++ third_party/silabs/matter_support | 2 +- third_party/silabs/silabs_board.gni | 15 +++++ 13 files changed, 196 insertions(+), 141 deletions(-) create mode 100644 examples/platform/silabs/Si70xxSensor.cpp create mode 100644 examples/platform/silabs/Si70xxSensor.h delete mode 100644 examples/platform/silabs/TemperatureSensor.cpp delete mode 100644 examples/platform/silabs/TemperatureSensor.h diff --git a/examples/platform/silabs/Si70xxSensor.cpp b/examples/platform/silabs/Si70xxSensor.cpp new file mode 100644 index 0000000000..0b03ca040f --- /dev/null +++ b/examples/platform/silabs/Si70xxSensor.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * 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. + */ + +#include "sl_board_control.h" +#include "sl_i2cspm_instances.h" +#include "sl_si70xx.h" +#include +#include + +namespace { + +constexpr uint16_t kSensorTemperatureOffset = 475; +bool initialized = false; + +} // namespace + +namespace Si70xxSensor { + +sl_status_t Init() +{ + sl_status_t status = SL_STATUS_OK; + + status = sl_board_enable_sensor(SL_BOARD_SENSOR_RHT); + VerifyOrReturnError(status == SL_STATUS_OK, status); + + status = sl_si70xx_init(sl_i2cspm_sensor, SI7021_ADDR); + VerifyOrReturnError(status == SL_STATUS_OK, status); + + initialized = true; + return status; +} + +sl_status_t GetSensorData(uint16_t & relativeHumidity, int16_t & temperature) +{ + VerifyOrReturnError(initialized, SL_STATUS_NOT_INITIALIZED); + + sl_status_t status = SL_STATUS_OK; + int32_t tempTemperature = 0; + uint32_t tempHumidity = 0; + + status = sl_si70xx_measure_rh_and_temp(sl_i2cspm_sensor, SI7021_ADDR, &tempHumidity, &tempTemperature); + VerifyOrReturnError(status == SL_STATUS_OK, status); + + // Sensor precision is milliX. We need to reduce to change the precision to centiX to fit with the cluster attributes presicion. + temperature = static_cast(tempTemperature / 10) - kSensorTemperatureOffset; + relativeHumidity = static_cast(tempHumidity / 10); + + return status; +} + +}; // namespace Si70xxSensor diff --git a/examples/platform/silabs/Si70xxSensor.h b/examples/platform/silabs/Si70xxSensor.h new file mode 100644 index 0000000000..8dc31a8daf --- /dev/null +++ b/examples/platform/silabs/Si70xxSensor.h @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include "sl_status.h" +#include + +namespace Si70xxSensor { + +/** + * @brief Initialises the Si70xx Sensor. + * + * @return sl_status_t SL_STATUS_OK if there were no errors occured during initialisation. + * Error if an underlying platform error occured + */ +sl_status_t Init(); + +/** + * @brief Reads Humidity and temperature values from the Si70xx sensor. + * The init function must be called before calling the GetSensorData. + * + * @param[out] relativeHumidity Relative humidity percentage in centi-pourcentage (1000 == 10.00%) + * @param[out] temperature Ambiant temperature in centi-celsium (1000 == 10.00C) + * + * @return sl_status_t SL_STATUS_OK if there were no errors occured during initialisation. + * SL_STATUS_NOT_INITIALIZED if the sensor was not initialised + * Error if an underlying platform error occured + */ +sl_status_t GetSensorData(uint16_t & relativeHumidity, int16_t & temperature); + +}; // namespace Si70xxSensor diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 156fb38e49..cf7b7aedbf 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -252,6 +252,13 @@ source_set("siwx917-common") { public_deps += [ ":test-event-trigger" ] } + if (sl_enable_si70xx_sensor) { + sources += [ + "${silabs_common_plat_dir}/Si70xxSensor.cpp", + "${silabs_common_plat_dir}/Si70xxSensor.h", + ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/platform/silabs/TemperatureSensor.cpp b/examples/platform/silabs/TemperatureSensor.cpp deleted file mode 100644 index d7e13e1993..0000000000 --- a/examples/platform/silabs/TemperatureSensor.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * 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. - */ - -#include "TemperatureSensor.h" - -#include "sl_board_control.h" -#include "sl_i2cspm_instances.h" -#include "sl_si70xx.h" - -namespace TemperatureSensor { -constexpr uint16_t kSensorTemperatureOffset = 800; -static bool initialized = false; - -sl_status_t Init() -{ - sl_status_t status; - sl_i2cspm_t * rht_sensor = sl_i2cspm_sensor; - (void) sl_board_enable_sensor(SL_BOARD_SENSOR_RHT); - - status = sl_si70xx_init(rht_sensor, SI7021_ADDR); - initialized = (SL_STATUS_OK == status); - return status; -} - -sl_status_t GetTemp(uint32_t * relativeHumidity, int16_t * temperature) -{ - if (!initialized) - { - return SL_STATUS_NOT_INITIALIZED; - } - - // Sensor resolution 0.001 C - // DataModel resolution 0.01 C - sl_status_t status; - sl_i2cspm_t * rht_sensor = sl_i2cspm_sensor; - int32_t temp = 0; - status = sl_si70xx_measure_rh_and_temp(rht_sensor, SI7021_ADDR, relativeHumidity, &temp); - - if (temperature != nullptr) - { - *temperature = static_cast(temp / 10) - kSensorTemperatureOffset; - } - - return status; -} -}; // namespace TemperatureSensor diff --git a/examples/platform/silabs/TemperatureSensor.h b/examples/platform/silabs/TemperatureSensor.h deleted file mode 100644 index 116287e9a3..0000000000 --- a/examples/platform/silabs/TemperatureSensor.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * 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. - */ - -#pragma once - -#include "sl_status.h" -#include - -namespace TemperatureSensor { -sl_status_t Init(); -sl_status_t GetTemp(uint32_t * relativeHumidity, int16_t * temperature); -}; // namespace TemperatureSensor diff --git a/examples/platform/silabs/display/demo-ui.c b/examples/platform/silabs/display/demo-ui.c index e0fe37ec9c..d909cb1f88 100644 --- a/examples/platform/silabs/display/demo-ui.c +++ b/examples/platform/silabs/display/demo-ui.c @@ -167,6 +167,5 @@ void demoUIClearMainScreen(uint8_t * name) { GLIB_clear(&glibContext); demoUIDisplayHeader((char *) name); - demoUIDisplayApp(false); demoUIDisplayProtocols(); } diff --git a/examples/platform/silabs/display/lcd.h b/examples/platform/silabs/display/lcd.h index b62664c9b4..61fa816743 100644 --- a/examples/platform/silabs/display/lcd.h +++ b/examples/platform/silabs/display/lcd.h @@ -65,6 +65,7 @@ class SilabsLCD int DrawPixel(void * pContext, int32_t x, int32_t y); int Update(void); void WriteDemoUI(bool state); + void WriteDemoUI(); void SetCustomUI(customUICB cb); void GetScreen(Screen_e & screen); @@ -85,8 +86,6 @@ class SilabsLCD bool protocol1 = false; /* data */ } DemoState_t; - void WriteDemoUI(); - #ifdef QR_CODE_ENABLED void WriteQRCode(); void LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h); diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 91cd2c1a0a..f5c79a2252 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -308,6 +308,13 @@ source_set("efr32-common") { public_deps += [ ":test-event-trigger" ] } + if (sl_enable_si70xx_sensor) { + sources += [ + "${silabs_common_plat_dir}/Si70xxSensor.cpp", + "${silabs_common_plat_dir}/Si70xxSensor.h", + ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/thermostat/silabs/BUILD.gn b/examples/thermostat/silabs/BUILD.gn index 75b2f75c15..f51ee14825 100644 --- a/examples/thermostat/silabs/BUILD.gn +++ b/examples/thermostat/silabs/BUILD.gn @@ -47,10 +47,6 @@ import("${examples_common_plat_dir}/args.gni") declare_args() { # Dump memory usage at link time. chip_print_memory_usage = false - - # Enable the temperature sensor - # Some boards do not have a temperature sensor - use_temp_sensor = false } if (wifi_soc) { @@ -112,19 +108,6 @@ if (wifi_soc) { "PW_RPC_ENABLED", ] } - - if (use_temp_sensor) { - include_dirs += [ - "${efr32_sdk_root}/platform/driver/i2cspm/inc", - "${efr32_sdk_root}/app/bluetooth/common/sensor_rht", - "${efr32_sdk_root}/app/bluetooth/common/sensor_rht/config", - "${efr32_sdk_root}/hardware/driver/si70xx/inc", - "${efr32_sdk_root}/app/bluetooth/common/sensor_select", - "${efr32_sdk_root}/platform/common/config", - ] - - defines += [ "USE_TEMP_SENSOR" ] - } } } @@ -141,17 +124,6 @@ silabs_executable("thermostat_app") { "src/ZclCallbacks.cpp", ] - if (use_temp_sensor) { - sources += [ - "${efr32_sdk_root}/hardware/driver/si70xx/src/sl_si70xx.c", - "${efr32_sdk_root}/platform/common/src/sl_status.c", - "${efr32_sdk_root}/platform/driver/i2cspm/src/sl_i2cspm.c", - "${efr32_sdk_root}/platform/emlib/src/em_i2c.c", - "${examples_common_plat_dir}/TemperatureSensor.cpp", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_i2cspm_init.c", - ] - } - if (!disable_lcd) { sources += [ "src/ThermostatUI.cpp" ] } diff --git a/examples/thermostat/silabs/src/SensorManager.cpp b/examples/thermostat/silabs/src/SensorManager.cpp index abecd899d5..3522e9f5a3 100644 --- a/examples/thermostat/silabs/src/SensorManager.cpp +++ b/examples/thermostat/silabs/src/SensorManager.cpp @@ -26,14 +26,15 @@ #include "AppEvent.h" #include "AppTask.h" -#ifdef USE_TEMP_SENSOR -#include "TemperatureSensor.h" -#endif +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR +#include "Si70xxSensor.h" +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR /********************************************************** * Defines and Constants *********************************************************/ using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; @@ -45,10 +46,10 @@ constexpr uint16_t kMinTemperatureDelta = 50; // 0.5 degree Celcius *********************************************************/ SensorManager SensorManager::sSensorManager; -#ifndef USE_TEMP_SENSOR +#if !(defined(SL_MATTER_USE_SI70XX_SENSOR) && (SL_MATTER_USE_SI70XX_SENSOR)) constexpr uint16_t kSimulatedReadingFrequency = (60000 / kSensorTImerPeriodMs); // Change Simulated number at each minutes static int16_t mSimulatedTemp[] = { 2300, 2400, 2800, 2550, 2200, 2125, 2100, 2600, 1800, 2700 }; -#endif +#endif // !(defined(SL_MATTER_USE_SI70XX_SENSOR) && (SL_MATTER_USE_SI70XX_SENSOR)) CHIP_ERROR SensorManager::Init() { @@ -61,13 +62,13 @@ CHIP_ERROR SensorManager::Init() return APP_ERROR_CREATE_TIMER_FAILED; } -#ifdef USE_TEMP_SENSOR - if (SL_STATUS_OK != TemperatureSensor::Init()) +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR + if (SL_STATUS_OK != Si70xxSensor::Init()) { SILABS_LOG("Failed to Init Sensor"); return CHIP_ERROR_INTERNAL; } -#endif +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR // Update Temp immediatly at bootup SensorTimerEventHandler(nullptr); @@ -81,19 +82,20 @@ void SensorManager::SensorTimerEventHandler(void * arg) int16_t temperature = 0; static int16_t lastTemperature = 0; -#ifdef USE_TEMP_SENSOR +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR int32_t tempSum = 0; - uint32_t humidity = 0; + uint16_t humidity = 0; for (uint8_t i = 0; i < 100; i++) { - if (SL_STATUS_OK != TemperatureSensor::GetTemp(&humidity, &temperature)) + if (SL_STATUS_OK != Si70xxSensor::GetSensorData(humidity, temperature)) { SILABS_LOG("Failed to read Temperature !!!"); } tempSum += temperature; } temperature = static_cast(tempSum / 100); + #else static uint8_t nbOfRepetition = 0; static uint8_t simulatedIndex = 0; @@ -109,18 +111,20 @@ void SensorManager::SensorTimerEventHandler(void * arg) simulatedIndex++; nbOfRepetition = 0; } -#endif // USE_TEMP_SENSOR +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR SILABS_LOG("Sensor Temp is : %d", temperature); + MarkAttributeDirty reportState = MarkAttributeDirty::kNo; if ((temperature >= (lastTemperature + kMinTemperatureDelta)) || temperature <= (lastTemperature - kMinTemperatureDelta)) { - lastTemperature = temperature; - PlatformMgr().LockChipStack(); - // The SensorMagager shouldn't be aware of the Endpoint ID TODO Fix this. - // TODO Per Spec we should also apply the Offset stored in the same cluster before saving the temp - - app::Clusters::Thermostat::Attributes::LocalTemperature::Set(kThermostatEndpoint, temperature); - PlatformMgr().UnlockChipStack(); + reportState = MarkAttributeDirty::kIfChanged; } + + lastTemperature = temperature; + PlatformMgr().LockChipStack(); + // The SensorMagager shouldn't be aware of the Endpoint ID TODO Fix this. + // TODO Per Spec we should also apply the Offset stored in the same cluster before saving the temp + app::Clusters::Thermostat::Attributes::LocalTemperature::Set(kThermostatEndpoint, temperature, reportState); + PlatformMgr().UnlockChipStack(); } diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 470c812505..146077372f 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -415,6 +415,17 @@ template("efr32_sdk") { _include_dirs += [ "${chip_root}/third_party/silabs/mqtt/stack" ] } + if (sl_enable_si70xx_sensor) { + _include_dirs += [ + "${efr32_sdk_root}/platform/driver/i2cspm/inc", + "${efr32_sdk_root}/app/bluetooth/common/sensor_rht", + "${efr32_sdk_root}/app/bluetooth/common/sensor_rht/config", + "${efr32_sdk_root}/hardware/driver/si70xx/inc", + "${efr32_sdk_root}/app/bluetooth/common/sensor_select", + "${efr32_sdk_root}/platform/common/config", + ] + } + # Note that we're setting the mbedTLS and PSA configuration files through a # define. This means the build system by default does not pick up changes in # the content of these, only when changing the filename itself. @@ -672,6 +683,12 @@ template("efr32_sdk") { defines += [ "CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED=1" ] } + if (sl_enable_si70xx_sensor) { + defines += [ "SL_MATTER_USE_SI70XX_SENSOR=1" ] + } else { + defines += [ "SL_MATTER_USE_SI70XX_SENSOR=0" ] + } + cflags = [] foreach(include_dir, _include_dirs) { cflags += [ "-isystem" + rebase_path(include_dir, root_build_dir) ] @@ -1068,6 +1085,16 @@ template("efr32_sdk") { ] } + if (sl_enable_si70xx_sensor) { + sources += [ + "${efr32_sdk_root}/hardware/driver/si70xx/src/sl_si70xx.c", + "${efr32_sdk_root}/platform/common/src/sl_status.c", + "${efr32_sdk_root}/platform/driver/i2cspm/src/sl_i2cspm.c", + "${efr32_sdk_root}/platform/emlib/src/em_i2c.c", + "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_i2cspm_init.c", + ] + } + public_deps = [ ":efr32_mbedtls_config", "${segger_rtt_root}:segger_rtt", diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index c3e993cea4..841d43db7e 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit c3e993cea4aad32adc178fe487afb66822f0b42d +Subproject commit 841d43db7e86877636cd73b5244da4c34d38d544 diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index 213417976d..03b2ea7cb6 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -53,6 +53,9 @@ declare_args() { # Self-provision enabled use_provision_channel = false + + # Temperature Sensor support + sl_enable_si70xx_sensor = false } declare_args() { @@ -75,6 +78,9 @@ if (silabs_board == "BRD4338A" || silabs_board == "BRD2605A") { silabs_mcu = "SiWG917M111MGTBA" wifi_soc = true + assert(!sl_enable_si70xx_sensor, + "${silabs_board} does not support the si90xx sensor!") + # EFR32 MG24 series ---------- } else if (silabs_board == "BRD4186A" || silabs_board == "BRD4187A") { variant = string_replace(silabs_board, "A", "C") @@ -104,6 +110,9 @@ if (silabs_board == "BRD4338A" || silabs_board == "BRD2605A") { show_qr_code = false disable_lcd = true + assert(!sl_enable_si70xx_sensor, + "${silabs_board} does not support the si90xx sensor!") + # EFR32 MG24 Modules series ---------- } else if (silabs_board == "BRD4316A") { silabs_family = "mgm24" @@ -128,6 +137,9 @@ if (silabs_board == "BRD4338A" || silabs_board == "BRD2605A") { use_external_flash = false show_qr_code = false disable_lcd = true + + assert(!sl_enable_si70xx_sensor, + "${silabs_board} does not support the si90xx sensor!") } else if (silabs_board == "BRD2704A") { silabs_family = "mgm24" silabs_mcu = "MGM240PB32VNA" @@ -137,6 +149,9 @@ if (silabs_board == "BRD4338A" || silabs_board == "BRD2605A") { use_external_flash = false show_qr_code = false disable_lcd = true + + assert(!sl_enable_si70xx_sensor, + "${silabs_board} does not support the si90xx sensor!") } else if (silabs_board == "BRD4318A") { silabs_family = "mgm24" silabs_mcu = "MGM240SD22VNA" From 3e1f7adbcc25146b1269b3230bf6bacb50d4850c Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Thu, 10 Oct 2024 15:10:34 -0700 Subject: [PATCH 11/15] [Android] Add StayActive support during commission flow for LIT (#36028) * [Android] Add StayActive support during commission flow for LIT (#35959) * Fix crash when handling jStayActiveMsec (#35997) --- .../DeviceProvisioningFragment.kt | 2 +- .../java/AndroidDeviceControllerWrapper.cpp | 30 ++++++++++++++++--- .../devicecontroller/ICDRegistrationInfo.java | 17 +++++++++++ 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt index 97b2576827..f7049b68ea 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt @@ -289,7 +289,7 @@ class DeviceProvisioningFragment : Fragment() { override fun onICDRegistrationInfoRequired() { Log.d(TAG, "onICDRegistrationInfoRequired") deviceController.updateCommissioningICDRegistrationInfo( - ICDRegistrationInfo.newBuilder().build() + ICDRegistrationInfo.newBuilder().setICDStayActiveDurationMsec(30000L).build() ) } diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index f634f8a26f..ba0342629a 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -508,28 +508,50 @@ CHIP_ERROR AndroidDeviceControllerWrapper::ApplyICDRegistrationInfo(chip::Contro VerifyOrReturnError(icdRegistrationInfo != nullptr, CHIP_ERROR_INVALID_ARGUMENT); JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Controller, "Failed to retrieve JNIEnv in %s.", __func__); + return CHIP_ERROR_INCORRECT_STATE; + } + + jmethodID getICDStayActiveDurationMsecMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getICDStayActiveDurationMsec", + "()Ljava/lang/Long;", &getICDStayActiveDurationMsecMethod); + ReturnErrorOnFailure(err); + jobject jStayActiveMsec = env->CallObjectMethod(icdRegistrationInfo, getICDStayActiveDurationMsecMethod); + if (jStayActiveMsec != nullptr) + { + jlong stayActiveMsec = chip::JniReferences::GetInstance().LongToPrimitive(jStayActiveMsec); + if (!chip::CanCastTo(stayActiveMsec)) + { + ChipLogError(Controller, "Failed to process stayActiveMsec in %s since this is not a valid 32-bit integer.", __func__); + return CHIP_ERROR_INVALID_ARGUMENT; + } + params.SetICDStayActiveDurationMsec(static_cast(stayActiveMsec)); + } + jmethodID getCheckInNodeIdMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getCheckInNodeId", "()Ljava/lang/Long;", &getCheckInNodeIdMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jobject jCheckInNodeId = env->CallObjectMethod(icdRegistrationInfo, getCheckInNodeIdMethod); jmethodID getMonitoredSubjectMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getMonitoredSubject", "()Ljava/lang/Long;", &getMonitoredSubjectMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jobject jMonitoredSubject = env->CallObjectMethod(icdRegistrationInfo, getMonitoredSubjectMethod); jmethodID getSymmetricKeyMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getSymmetricKey", "()[B", &getSymmetricKeyMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jbyteArray jSymmetricKey = static_cast(env->CallObjectMethod(icdRegistrationInfo, getSymmetricKeyMethod)); jmethodID getClientTypeMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getClientType", "()Ljava/lang/Integer;", &getClientTypeMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jobject jClientType = env->CallObjectMethod(icdRegistrationInfo, getClientTypeMethod); chip::NodeId checkInNodeId = chip::kUndefinedNodeId; diff --git a/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java b/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java index 417d147238..b8fcde3a36 100644 --- a/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java +++ b/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java @@ -25,12 +25,19 @@ public class ICDRegistrationInfo { @Nullable private final Long monitoredSubject; @Nullable private final byte[] symmetricKey; @Nullable private final Integer clientType; + @Nullable private final Long stayActiveDurationMsec; private ICDRegistrationInfo(Builder builder) { this.checkInNodeId = builder.checkInNodeId; this.monitoredSubject = builder.monitoredSubject; this.symmetricKey = builder.symmetricKey; this.clientType = builder.clientType; + this.stayActiveDurationMsec = builder.stayActiveDurationMsec; + } + + /** Returns the duration period to stay active. */ + public Long getICDStayActiveDurationMsec() { + return stayActiveDurationMsec; } /** Returns the check in node ID. */ @@ -62,6 +69,7 @@ public static class Builder { @Nullable private Long monitoredSubject = null; @Nullable private byte[] symmetricKey = null; @Nullable private Integer clientType = null; + @Nullable private Long stayActiveDurationMsec = null; private Builder() {} @@ -93,6 +101,15 @@ public Builder setClientType(Integer clientType) { return this; } + /** + * Request LIT device to stay active for specific duration after commission completes, the upper + * bound is 30 seconds. + */ + public Builder setICDStayActiveDurationMsec(Long stayActiveDurationMsec) { + this.stayActiveDurationMsec = stayActiveDurationMsec; + return this; + } + public ICDRegistrationInfo build() { return new ICDRegistrationInfo(this); } From a8d9513883d54ceaad3527273f4914b8995ff036 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Thu, 10 Oct 2024 15:10:59 -0700 Subject: [PATCH 12/15] Store icdClientInfo after completing check-in message validation (#36027) --- src/app/icd/client/CheckInHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/icd/client/CheckInHandler.cpp b/src/app/icd/client/CheckInHandler.cpp index 8f0a4de9c1..e0edc649cc 100644 --- a/src/app/icd/client/CheckInHandler.cpp +++ b/src/app/icd/client/CheckInHandler.cpp @@ -130,6 +130,7 @@ CHIP_ERROR CheckInHandler::OnMessageReceived(Messaging::ExchangeContext * ec, co } else { + mpICDClientStorage->StoreEntry(clientInfo); mpCheckInDelegate->OnCheckInComplete(clientInfo); #if CHIP_CONFIG_ENABLE_READ_CLIENT mpImEngine->OnActiveModeNotification(clientInfo.peer_node); From dd6f9748cb882ad46ce536208d430855bd0b1673 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 10 Oct 2024 18:15:18 -0400 Subject: [PATCH 13/15] Attempt to fix ESP32 builds by adding an extra dependency (#36025) (#36031) * Attempt to fix ESP32 builds by not compiling insights at all. This breaks insights, but should make CI pass * Fix typo * Another better fix: pull in the other dependency too --------- Co-authored-by: Andrei Litvin --- config/esp32/components/chip/idf_component.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index aeffec708d..1917fcf4de 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -26,6 +26,14 @@ dependencies: - if: "idf_version >=5.0" - if: "target != esp32h2" + # This matches the dependency of esp_insights + espressif/esp_diag_data_store: + version: "1.0.1" + require: public + rules: + - if: "idf_version >=5.0" + - if: "target != esp32h2" + espressif/esp_rcp_update: version: "1.2.0" rules: From a78a377209635071e7093b247ce4cb591151d70c Mon Sep 17 00:00:00 2001 From: Michael Rupp <95718139+mykrupp@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:20:52 -0400 Subject: [PATCH 14/15] restore state of CSA workflows from 4b6dcd8 --- .github/.wordlist.txt | 1634 +++++++++++++++++ .github/ISSUE_TEMPLATE/001-bug-report.yaml | 80 + .github/ISSUE_TEMPLATE/002-1.0-issue.yaml | 98 + .github/ISSUE_TEMPLATE/003-1.1-issue.yaml | 98 + .github/ISSUE_TEMPLATE/004-1.2-issue.yaml | 98 + .github/ISSUE_TEMPLATE/005-1.3-issue.yaml | 98 + .github/ISSUE_TEMPLATE/049-trivial-fix.yaml | 93 + .github/ISSUE_TEMPLATE/050-tooling-fix.yaml | 88 + .github/ISSUE_TEMPLATE/060-platform-fix.yaml | 88 + .../ISSUE_TEMPLATE/080-feature-request.yaml | 62 + .github/ISSUE_TEMPLATE/090-sve-issue.yaml | 119 ++ .github/ISSUE_TEMPLATE/091-cert-blocker.yaml | 108 ++ .../ISSUE_TEMPLATE/097-ci-test-failure.yaml | 59 + .github/ISSUE_TEMPLATE/098-build-issue.yaml | 59 + .../099-github-workflow-issue.yaml | 59 + .../100-documentation-issue.yaml | 58 + .github/ISSUE_TEMPLATE/config.yaml | 1 + .github/PULL_REQUEST_TEMPLATE.md | 12 + .github/actions/bootstrap-cache/action.yaml | 17 + .github/actions/bootstrap/action.yaml | 82 + .../action.yaml | 43 + .../actions/checkout-submodules/action.yaml | 19 + .github/actions/dump-disk-info/action.yaml | 20 + .github/actions/dynamic/action.yaml | 38 + .../actions/git-safe-directory/action.yaml | 9 + .../actions/maximize-runner-disk/action.yaml | 48 + .../perform-codeql-analysis/action.yaml | 34 + .../actions/setup-size-reports/action.yaml | 15 + .../actions/upload-size-reports/action.yaml | 17 + .github/boring-cyborg.yml | 132 ++ .github/config.yml | 8 + .github/dependabot.yml | 61 + .github/issue-labeler.yml | 54 + .github/labeler.yml | 333 ++++ .github/release.yml | 76 + .github/workflows/artifacts.yaml | 17 + .github/workflows/bloat_check.yaml | 53 + .github/workflows/build-cert-bins.yaml | 21 + .github/workflows/build.yaml | 476 +++++ .github/workflows/buildjet-cache-delete.yaml | 17 + .github/workflows/cert_test_checks.yaml | 35 + .../check-data-model-directory-updates.yaml | 31 + .github/workflows/chef.yaml | 117 ++ .github/workflows/cherry-picks.yaml | 37 + .github/workflows/cirque.yaml | 136 ++ .github/workflows/codeql.yml | 29 + .github/workflows/darwin-tests.yaml | 161 ++ .github/workflows/darwin.yaml | 133 ++ .github/workflows/docbuild.yaml | 54 + .github/workflows/docker_img.yaml | 171 ++ .github/workflows/doxygen.yaml | 107 ++ .../workflows/example-tv-casting-darwin.yaml | 49 + .github/workflows/examples-ameba.yaml | 60 + .github/workflows/examples-asr.yaml | 65 + .github/workflows/examples-bouffalolab.yaml | 147 ++ .github/workflows/examples-cc13xx_26xx.yaml | 100 + .github/workflows/examples-cc32xx.yaml | 84 + .github/workflows/examples-efr32.yaml | 167 ++ .github/workflows/examples-esp32.yaml | 169 ++ .github/workflows/examples-infineon.yaml | 226 +++ .github/workflows/examples-linux-arm.yaml | 90 + .github/workflows/examples-linux-imx.yaml | 96 + .../workflows/examples-linux-standalone.yaml | 225 +++ .../examples-linux-tv-casting-app.yaml | 89 + .github/workflows/examples-mw320.yaml | 71 + .github/workflows/examples-nrfconnect.yaml | 211 +++ .github/workflows/examples-nuttx.yaml | 55 + .github/workflows/examples-nxp.yaml | 301 +++ .github/workflows/examples-openiotsdk.yaml | 216 +++ .github/workflows/examples-qpg.yaml | 89 + .github/workflows/examples-stm32.yaml | 79 + .github/workflows/examples-telink.yaml | 283 +++ .github/workflows/examples-tizen.yaml | 86 + .github/workflows/full-android.yaml | 117 ++ .github/workflows/fuzzing-build.yaml | 101 + .../workflows/gradle-wrapper-validation.yml | 20 + .github/workflows/issue-labeler.yaml | 20 + .github/workflows/java-tests.yaml | 308 ++++ .github/workflows/kotlin-style.yaml | 70 + .github/workflows/labeler.yaml | 15 + .github/workflows/lint.yml | 347 ++++ .github/workflows/minimal-build.yaml | 71 + .github/workflows/protocol_compatibility.yaml | 49 + .github/workflows/qemu.yaml | 100 + .github/workflows/recent_fail_summary.yaml | 58 + .github/workflows/release_artifacts.yaml | 89 + .github/workflows/roll_and_build_docker.yaml | 15 + .github/workflows/silabs_workflow.yaml | 40 - .github/workflows/smoketest-android.yaml | 82 + .github/workflows/spell.yml | 36 + .github/workflows/stale.yaml | 42 + .github/workflows/tag-releases.yaml | 52 + .github/workflows/tests.yaml | 624 +++++++ .github/workflows/third-party-check.yaml | 39 + .github/workflows/todos.yaml | 38 + .github/workflows/unit_integration_test.yaml | 88 + .github/workflows/zap_regeneration.yaml | 54 + .github/workflows/zap_templates.yaml | 75 + 98 files changed, 10981 insertions(+), 40 deletions(-) create mode 100644 .github/.wordlist.txt create mode 100644 .github/ISSUE_TEMPLATE/001-bug-report.yaml create mode 100644 .github/ISSUE_TEMPLATE/002-1.0-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/003-1.1-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/004-1.2-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/005-1.3-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/049-trivial-fix.yaml create mode 100644 .github/ISSUE_TEMPLATE/050-tooling-fix.yaml create mode 100644 .github/ISSUE_TEMPLATE/060-platform-fix.yaml create mode 100644 .github/ISSUE_TEMPLATE/080-feature-request.yaml create mode 100644 .github/ISSUE_TEMPLATE/090-sve-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/091-cert-blocker.yaml create mode 100644 .github/ISSUE_TEMPLATE/097-ci-test-failure.yaml create mode 100644 .github/ISSUE_TEMPLATE/098-build-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/100-documentation-issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yaml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/actions/bootstrap-cache/action.yaml create mode 100644 .github/actions/bootstrap/action.yaml create mode 100644 .github/actions/checkout-submodules-and-bootstrap/action.yaml create mode 100644 .github/actions/checkout-submodules/action.yaml create mode 100644 .github/actions/dump-disk-info/action.yaml create mode 100644 .github/actions/dynamic/action.yaml create mode 100644 .github/actions/git-safe-directory/action.yaml create mode 100644 .github/actions/maximize-runner-disk/action.yaml create mode 100644 .github/actions/perform-codeql-analysis/action.yaml create mode 100644 .github/actions/setup-size-reports/action.yaml create mode 100644 .github/actions/upload-size-reports/action.yaml create mode 100644 .github/boring-cyborg.yml create mode 100644 .github/config.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/issue-labeler.yml create mode 100644 .github/labeler.yml create mode 100644 .github/release.yml create mode 100644 .github/workflows/artifacts.yaml create mode 100644 .github/workflows/bloat_check.yaml create mode 100644 .github/workflows/build-cert-bins.yaml create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/buildjet-cache-delete.yaml create mode 100644 .github/workflows/cert_test_checks.yaml create mode 100644 .github/workflows/check-data-model-directory-updates.yaml create mode 100644 .github/workflows/chef.yaml create mode 100644 .github/workflows/cherry-picks.yaml create mode 100644 .github/workflows/cirque.yaml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/darwin-tests.yaml create mode 100644 .github/workflows/darwin.yaml create mode 100644 .github/workflows/docbuild.yaml create mode 100644 .github/workflows/docker_img.yaml create mode 100644 .github/workflows/doxygen.yaml create mode 100644 .github/workflows/example-tv-casting-darwin.yaml create mode 100644 .github/workflows/examples-ameba.yaml create mode 100644 .github/workflows/examples-asr.yaml create mode 100644 .github/workflows/examples-bouffalolab.yaml create mode 100644 .github/workflows/examples-cc13xx_26xx.yaml create mode 100644 .github/workflows/examples-cc32xx.yaml create mode 100644 .github/workflows/examples-efr32.yaml create mode 100644 .github/workflows/examples-esp32.yaml create mode 100644 .github/workflows/examples-infineon.yaml create mode 100644 .github/workflows/examples-linux-arm.yaml create mode 100644 .github/workflows/examples-linux-imx.yaml create mode 100644 .github/workflows/examples-linux-standalone.yaml create mode 100644 .github/workflows/examples-linux-tv-casting-app.yaml create mode 100644 .github/workflows/examples-mw320.yaml create mode 100644 .github/workflows/examples-nrfconnect.yaml create mode 100644 .github/workflows/examples-nuttx.yaml create mode 100644 .github/workflows/examples-nxp.yaml create mode 100644 .github/workflows/examples-openiotsdk.yaml create mode 100644 .github/workflows/examples-qpg.yaml create mode 100644 .github/workflows/examples-stm32.yaml create mode 100644 .github/workflows/examples-telink.yaml create mode 100644 .github/workflows/examples-tizen.yaml create mode 100644 .github/workflows/full-android.yaml create mode 100644 .github/workflows/fuzzing-build.yaml create mode 100644 .github/workflows/gradle-wrapper-validation.yml create mode 100644 .github/workflows/issue-labeler.yaml create mode 100644 .github/workflows/java-tests.yaml create mode 100644 .github/workflows/kotlin-style.yaml create mode 100644 .github/workflows/labeler.yaml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/minimal-build.yaml create mode 100644 .github/workflows/protocol_compatibility.yaml create mode 100644 .github/workflows/qemu.yaml create mode 100644 .github/workflows/recent_fail_summary.yaml create mode 100644 .github/workflows/release_artifacts.yaml create mode 100644 .github/workflows/roll_and_build_docker.yaml delete mode 100644 .github/workflows/silabs_workflow.yaml create mode 100644 .github/workflows/smoketest-android.yaml create mode 100644 .github/workflows/spell.yml create mode 100644 .github/workflows/stale.yaml create mode 100644 .github/workflows/tag-releases.yaml create mode 100644 .github/workflows/tests.yaml create mode 100644 .github/workflows/third-party-check.yaml create mode 100644 .github/workflows/todos.yaml create mode 100644 .github/workflows/unit_integration_test.yaml create mode 100644 .github/workflows/zap_regeneration.yaml create mode 100644 .github/workflows/zap_templates.yaml diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt new file mode 100644 index 0000000000..5c24cdec82 --- /dev/null +++ b/.github/.wordlist.txt @@ -0,0 +1,1634 @@ +14 +15 +16 +17 +18 +19 +20 +21 +22 +AAAA +aarch +abcdef +abfb +ABI +ABIs +ables +accesscontrol +accessor +Accessors +acdbc +ack +ACKed +ACL +ACLs +actdiag +adb +AddNOC +addr +adk +adoc +adr +AdvAutonomous +AdvManagedFlag +AdvOnLink +AdvRouterAddr +AdvSendAdvert +AE +aef +AES +AFL +AIDL +algs +alloc +Ameba +amebad +amebaiot +AmebaZ +amebaz2 +announcementReason +AnnounceOTAProvider +AnnounceOTAProviderRequest +APIs +apk +AppImpl +AppleTV +appliable +applianceeventsandalert +ApplianceIdentification +appliancestatistics +ApplicationId +ApplicationIdentifier +ApplicationLauncher +ApplyUpdate +applyUpdateAction +ApplyUpdateRequest +ApplyUpdateResponse +approver +appspot +appwrite +aps +arg +argc +args +argv +armeabi +armino +ARMmbed +armv +ASAN +asdk +ASR +AssertionError +AST +ASYNC +ATLs +atomics +att +attId +attr +attrib +AttributeAccessInterface +attributeValue +attrListName +attrMask +attSizeBytes +attType +ATW +ATWC +AudioOutput +auth +AuthMode +autoApplyImage +autocompletion +AutoConf +autoconnect +autocrlf +autogenerated +automake +autotools +avahi +avL +AwaitNextAction +AXXXF +AYNJV +babaf +backend +backends +backticks +backtrace +BallastConfiguration +BarrierControl +BasicCHIPRegression +BasicInformation +baudrate +BCM +BD +BDX +BDXDownloader +BeagleBone +befc +BEKEN +betaprogram +BinaryInputBasic +Binfmt +bitbake +bld +BLE +BleApplicationDelegate +BleLayer +BLEManager +BLEManagerImpl +BlePlatformDelegate +Blinls +bloaty +blockdiag +blocklist +blockquote +bluetoothd +bluez +BOOL +booleans +BooleanState +bootable +Bootloader +BorderRouterAP +bouffalolab +BRD +breakpoint +bredr +BridgedDeviceBasicInformation +bringup +BroadcastReceiver +BromateConcentrationMeasurement +BromodichloromethaneConcentrationMeasurement +BromoformConcentrationMeasurement +bt +btmgmt +BTN +BTP +btvirt +BuildKit +buildwithmatter +buildX +burndown +ButtonIsr +BytesMain +bz +bzip +CACACACA +cacerts +CAfile +cancelled +capacitive +CarbonDioxideConcentrationMeasurement +CarbonMonoxideConcentrationMeasurement +CaseAdminNode +CatalogVendorId +CBB +cbd +CBOR +Ccache +ccf +CCMP +CCS +CCSTUDIO +CCXML +CDEEDC +CDVersionNumber +ced +cfg +CFLAGS +cgit +cgroup +changeset +Channel +characterised +CharString +checkmark +ChipBLEMgr +CHIPCirqueTest +CHIPConfig +CHIPCryptoPALHsm +CHIPDeviceController +ChipDeviceCtrl +CHIPDeviceEvent +CHIPDevicePlatformConfig +CHIPDevicePlatformEvent +ChipEchoRequester +ChipEchoResponder +ChipImInitiator +ChipImResponder +ChipLight +ChipMessageLayer +CHIPOBLE +CHIPProjectAppConfig +CHIPProjectConfig +CHIPTest +chiptests +CHIPTool +ChloraminesConcentrationMeasurement +ChlorineConcentrationMeasurement +ChlorodibromomethaneConcentrationMeasurement +ChloroformConcentrationMeasurement +chmod +chown +chrpath +CIPD +CircleCI +cJTAG +CKIT +CLA +clapre +CLI +CLIs +cloudbuild +CLRF +clusterAttrs +ClusterName +ClusterObjectTests +ClusterRevision +ClusterTestGeneration +cmake +CMakeLists +CMD +CMS +CMSIS +CMVH +cn +COAP +codeaurora +codebase +codegen +CodeGenerator +CodeLab +codelabs +ColorControl +Comcast +Commandline +CommandHandlerInterface +CommandName +Commissionable +CommissionableDataProvider +commissionables +commissionee +CommissioningFlow +commondatastorage +CONF +CONFIG +ConfigDescription +configs +configTOTAL +ConfigurationManager +ConfigurationManagerImpl +conformant +connectedhomeip +ConnectionData +ConnectIP +ConnectivityManager +ConnectivityManagerImpl +ConnectNetwork +ConnectNetworkRequest +ConnectNetworkResponse +connstring +conntype +const +ContentApp +ContentApp's +ContentAppPlatform +ContentLaunch +ContentLauncher +contrib +controllee +conv +CopperConcentrationMeasurement +Corstone +cortexa +cp +cpio +cpp +cppreference +CPROTO +cpuapp +cpython +CQM +crypto +cryptographic +CSA +csg +csrrequest +csu +csv +ctl +ctrl +ctypes +CurrentHue +CurrentLevel +CurrentSaturation +customAcl +customizations +cvfJ +cxx +CY +CYW +DAC +DACs +dadbdcdddedf +DAP +DAPLINK +DataFrame +datamodel +DataModelRevision +dataset +datasets +datastore +DataVersion +dbf +DBG +dBm +DBUILD +dbus +dcc +DCHIP +DCL +DCMAKE +DCONF +DCONFIG +debianutils +debugText +decrypt +decrypted +DEDEDEDE +deepnote +DefaultOTAProviders +DefaultOTARequestor +DefaultOTARequestorDriver +DefaultOTARequestorStorage +DefaultSuccess +definedValue +DehumidificationControl +DelayedActionTime +delayedApplyActionTimeSec +delayedQueryActionTimeSec +delayQuery +deliverables +demangle +deployable +depottools +deps +der +desc +descheduled +detokenization +detokenizer +dev +devcontainer +devCtrl +DevelopmentCerts +DeviceAttestationCredentialsProvider +DeviceAttestationCredsExample +DeviceCaCerts +DeviceCert +DeviceCommissioner +DeviceCommon +DeviceController +DeviceId +DeviceInstanceInfoProvider +DeviceLayer +DeviceNetworkProvisioningDelegate +DeviceNetworkProvisioningDelegateImpl +DevicePairingDelegate +DeviceTemperatureConfiguration +DevKitC +DevKitM +devtype +df +dfe +DFILE +dfu +DgDxsfHx +dhclient +DHCP +DHCPC +DHCPv +dhrishi +DiagnosticLogs +dialout +diffstat +diffsyms +dimmable +dirname +dirs +disableNotifyUpdateApplied +disambiguated +discoverable +DispatchEvent +DispatchEventToApplication +DissolvedOxygenConcentrationMeasurement +DISTRO +Distutils +DK +DL +DM +DMG +DMM +DNS +Dnsmasq +dnsmasqd +DNSSD +DNSStubListener +docbuild +Dockerfile +Dockerfiles +Don'ts +DoorLock +DoorState +doru +DOTBR +DOVERLAY +downcasting +DownloadProtocolEnum +Doxygen +dpkg +dropdown +dryrun +DS +DSLS +duplicative +DUT +DUTS +DUT's +DV +DVK +dynload +eabi +EAF +EB +ECC +ECD +ECDH +ECDSA +EchoMessage +EchoRequests +EchoResponse +EchoService +ECW +edaf +edc +EDR +ee +eea +EEE +eef +ef +EFR +efuse +eg +EjQ +elftools +elock +emberAf +emberAfExternalAttributeReadCallback +emberAfExternalAttributeWriteCallback +EmberAfInitializeAttributes +emberAfSetDynamicEndpoint +emsp +EnableNetwork +EnableWiFiNetwork +endian +EndpointId +eno +entrypoint +enum +Enums +env +epochKey +epochStartTime +eq +errorValue +esd +espcoredump +ESPPORT +Espressif +esptool +eth +EthernetNetworkDiagnostics +ethernets +EthyleneConcentrationMeasurement +EthyleneOxideConcentrationMeasurement +EvalCode +EvalCodeWithName +EvalFrameDefault +EV +EVB +EventLogging +evk +EVSE +exceptfds +ExchangeContext +exe +ExecStart +executables +ExtendedPAN +ExtensionEntry +extern +extpanid +FabricId +fabricIdx +fabricIndex +factoryreset +FanControl +fb +fbb +fbd +FC +FCJ +FDDE +fddead +fde +fdx +FECA +FecalColiformAndEColiConcentrationMeasurement +feff +ffaa +ffeebaefa +FFF +FFFFFFFFFFFF0102 +fffe +fffff +Fi +filepath +fini +FixedLabel +flashdebug +FlowMeasurement +FluorideConcentrationMeasurement +focusable +forkpty +FOTA +FreeRTOS +FreeRTOSConfig +FS +fsl +fstab +fsync +ftd +fullclean +fuzzer +fuzzers +fuzztest +FW +gbl +gcloud +GDB +gdbgui +gdbserver +GeneralCommissioning +GeneralDiagnostics +generalised +GenericConfigurationManagerImpl +GenericConnectivityManagerImpl +GenericImpl +GenericPlatformManagerImpl +GenericThreadConfigurationManagerImpl +GenericThreadStackManagerImpl +GenericWiFiConfigurationManagerImpl +GetDeviceId +GetDeviceInfo +GetDns +getter +getters +GetInDevelopmentTests +GetIP +getManualTests +GetSafeAttributePersistenceProvider +getstarted +GH +ghcr +ghp +githubusercontent +gitignore +glibc +gn +GND +gni +GNinja +GNUARMEMB +gnueabihf +googleapis +googlesource +GPG +GPIO +GPL +GPLv +Gradle +gradlew +graphviz +Groupcast +GroupId +GroupKeyManagement +groupsettings +gsdk +gtk +GUA +Gv +gz +gzbf +HaloaceticAcidsConcentrationMeasurement +HandleCommand +hardcoded +hardknott +hardwarever +HardwareVersion +HardwareVersionString +hasValue +hci +hciattach +hciconfig +hdlc +HEPA +HKDF +HMAC +hoc +homebrew +HomePod +HomePods +hostapd +hostname +href +HSM +hsm +HTTPS +Humidistat +HW +hwadr +HydrogenConcentrationMeasurement +HydrogenSulphideConcentrationMeasurement +IasAce +IasWd +iaszone +ibb +ICA +ICAC +ICD +ICDs +iCloud +ICMP +IDF +IDL +IDLs +idt +idx +ifconfig +ifdef +ifdefs +IGMP +ihex +Illuminance +IlluminanceMeasurement +IM +imager +imagetool +imageUri +img +Impl +ImplClass +implementers +imx +imxlinux +incomingCommands +indexhtml +Inet +InetLayer +Infineon +ini +init +InitArgs +inlined +InputLoop +installDebug +instantiation +integrations +IntelliSense +InteractionModelEngine +InteractionModelVersion +Interoperable +introvideos +InvokeCommandRequests +InvokeCommandResponse +IoT +ipaddr +iPadOS +ipadr +IPK +ipp +iptables +iputils +IPv +ipykernel +ipynb +IPython +ISCAN +isHexString +isLowerCase +isUpperCase +itemName +iterable +itsfoss +JDK +jinja +JLink +JLinkExe +JLinkRTTClient +JN +jni +jpg +jre +js +json +JTAG +Jupyter +jupyterlab +KA +kAdminister +kbd +kBusy +kCase +Kconfig +kDacPublicKey +KeypadInput +keypair +keyset +kGroup +kInvalidCommandId +KitProg +kManage +kNewButton +kNodeIdNotSpecified +knownissues +kOperate +kPAKEParameterError +kPase +kView +KVS +kWindowNotOpen +LabelList +LabelStruct +launchable +LAUNCHXL +ldflags +LeadConcentrationMeasurement +LEDs +LevelControl +LF +libavahi +libc +libcairo +libCHIP +libdbus +LIBDIR +libegl +libffi +libfuzzer +libgirepository +libglib +libical +libncurses +libreadline +libsdl +libshell +libssl +libstdc +libthread +libtool +libTransportLayer +libudev +libwebkitgtk +lifecycle +lightbulb +lightin +LightingApp +LightingColor +LightingState +LinkSoftwareAndDocumentationPack +lladdr +LocalConfigDisabled +localedef +localhost +LocalizationConfiguration +localstatedir +LockingState +LogEvent +loopback +LowPower +LPC +LSP +LTE +LTS +LwIP +LwIP's +LZMA +macaddr +machineType +MacOS +MacOSX +MacPorts +Makefile +makefiles +MakeTpCall +mandir +ManganeseConcentrationMeasurement +ManualPairingCode +ManualTest +ManufacturingDate +masterkey +matterBuildSrcDir +matterc +MatterCustomTrace +matterd +MatterLock +MatterReportingAttributeChangeCallback +matterSdkSourceBuild +matterSourceBuildAbiFilters +matterUTestLib +maxApplicableSoftwareVersion +MaxInterval +MaxIntervalCeilingSeconds +maxLength +MaxRtrAdvInterval +maxValue +mbed +MbedCommissioning +MbedNewTarget +mbedos +mbedTarget +mbedTLS +MCORE +mcu +MCUboot +mcumgr +MCUs +mcux +MCUXpresso +mdash +MDNS +MediaInput +MediaPlayback +MediaTek +MEI +mem +memdf +MemMonitoring +menuconfig +MeshCoP +MeterIdentification +MfgDeviceCaCerts +MfgSpecificPing +mfrcacerts +mfrcert +MfrDeviceCert +MfrDeviceId +mgmt +microcontroller +microcontrollers +MicroSD +middleware +minApplicableSoftwareVersion +Minicom +MinInterval +MinIntervalFloorSeconds +minLength +MinRtrAdvInterval +minValue +mkdir +mlan +MLD +mmevk +moal +Mobly +ModeSelect +modprobe +Modustoolbox +moveMode +MoveToHue +MoveToLevel +MoveToSaturation +MoveWithOnOff +MPSL +MRP +MTD +MTR +MTU +Multiband +Multicast +multilib +Multiprotocol +multithreaded +mutex +mutexes +mv +MX +mydir +MyPASSWORD +MySSID +NAMESERVER +NAMESPACE +namespaces +namespacing +nano +natively +navpad +nbsp +NCP +ncs +nding +NDK +netcmp +netif +netplan +NetworkCommissioning +networkID +networkname +NewUDPEndPoint +nfds +NitricOxideConcentrationMeasurement +NitrogenDioxideConcentrationMeasurement +nl +nltest +nmcli +nmtui +noc +NodeId +nongnu +nordicsemi +NotAvailable +NotifyUpdateApplied +notValue +npm +nRF +nrfconnect +nrfdks +nrfutil +nrfxlib +NTAG +NTP +nullable +nullptr +NUM +NuttX +NVM +NVS +nwdiag +nwk +NXP +objcopy +OccupancySensing +OctetString +OECORE +OID +ol +Onboarding +onboardingcodes +oneshot +onnetwork +OnOff +OnOffClusterTest +OnOffSwitchConfiguration +OnPlatformEvent +onwards +OO +openiotsdk +openjdk +OpenOCD +OpenSSL +OpenThread +OpenThreadDemo +openweave +OperationalCredentials +operationalDataset +opkg +OPTIGA +optionMask +optionOverride +optionsMask +optionsOverride +orgs +OSS +OTA +OTADownloader +otaDownloadPath +otaImageList +OTAImageProcessorDriver +OTAImageProcessorImpl +OTAImageProcessorInterface +otaissues +OTAProvider +OTAProviderIpAddress +OTAProviderNodeId +otaproviders +OTAProviderSerialPort +OTARequesterImpl +OTARequestorDriver +OTARequestorInterface +OTARequestorSerialPort +OTARequestorStorage +otasoftwareupdateapp +OtaSoftwareUpdateProvider +otasoftwareupdaterequestor +otatesting +otaURL +OTBR +otcli +outform +outgoingCommands +overridable +OxygenConcentrationMeasurement +OzoneConcentrationMeasurement +PAA +PAAs +PacketBuffer +PAI +PairDevice +PAIs +PAKE +palletsprojects +PANID +pankore +param +params +PartNumber +PASE +Passcode +passRetained +passwd +PBKDF +pbuf +pbufs +pbxproj +PCA +pcap +pcaps +PDFs +PDK +PDM +peerAddrStr +peerNodeId +peerSessionId +pem +percentageLiftValue +perfetto +periodicQueryTimeout +pexpect +pickString +PICSCODE +PID +Pigweed +PinCode +pinrequest +PIXIT +PIXITs +pkgconfig +PKI +plaintext +PlatformManager +PlatformManagerImpl +plt +PluginServerCallback +png +Podman +PollControl +pollInterval +polymorphism +POSIX +PosixConfig +postAttributeChangeCallback +PowerConfiguration +PowerProfile +PowerSource +PowerSourceConfiguration +pre +preprocessor +Presetup +PressureMeasurement +prj +ProductID +ProductLabel +ProductName +ProductURL +proto +protobuf +protos +Prover +providerFabricIndex +ProviderLocation +providerNodeId +ProxyConfiguration +ProxyDiscovery +ProxyValid +ProxyView +PRs +PSA +PSCAN +PSECT +PSK +PSoC +PTR +pts +PulseWidthModulation +PumpConfigurationAndControl +pwd +PWM +PXXXF +py +pychip +pycrypto +pycryptodome +PyEval +PyFunction +pylint +PyObject +pypi +PyRun +pytest +QEMU +Qorvo +QPG +QRCode +qrcodetool +QRCodeUrl +QSPI +QueryImage +QueryImageResponse +queryImageStatus +Quickstart +qvCHIP +RADVD +raspberryPi +RasPi +rAv +RCAC +RCP +ReadAttribute +ReadConfigValue +readelf +readfds +README +READMEs +readonly +readthedocs +Reag +rebase +recommand +recommanded +recurse +regen +registerAttributeAccessOverride +RegisterCommandHandler +RelativeHumidityMeasurement +RemainAfterExit +remoteDeviceId +Rendez +RendezvousInformation +RendezvousParameters +RendezVousTest +REPL +repo +repos +req +Requestor +Requestor's +RequestorCanConsent +Requestors +responder +RestrictedEvent +retargeting +reusability +reviwed +rfid +rfids +RGB +riscv +rloc +rmw +rodata +Rollershade +rootfs +RPC +RPCs +RPi +RPi's +RPis +RSA +rsn +RSSI +RST +rsync +RTC +rtd +RTL +rtld +RTOS +RTT +RTX +runArgs +runIf +RUNAS +RunMain +runtime +RVC +rw +RXD +sandboxed +saveAs +saveDataVersschemaionAs +sbin +scalability +scalable +schema +schemas +scm +sco +scp +ScriptBinding +SDB +SDC +SDHC +SDK +SDK's +sdkconfig +SDKs +SDKTARGETSYSROOT +sdl +SecureCertDACProvider +SED +SEGGER +semver +SendButton +SendNewInputEvent +sendto +seqdiag +SERIALDEVICE +serialno +SerialNumber +ServiceId +SetDns +SetImageProcessorDelegate +SetOTADownloader +SetOtaRequestorDriver +setpin +setpoint +SetpointRaiseLower +SetRequestorInstance +SetUpPINCode +SetupQRCode +sexualized +sfv +SHA +ShadeConfiguration +SHAs +showDocumentation +showsdks +shubhamdp +SIGINT +SiLabs +Silabs's +SiliconLabs +SimpleFileExFlags +SimpleLink +SiWx +sizedb +sl +SLAAC +SLTB +SLWSTK +SmartThings +smoketest +SMP +socat +socio +SoCs +SodiumConcentrationMeasurement +softap +SoftDevice +softmmu +SoftwareDiagnostics +SoftwareVersion +softwareVersionStr +SoftwareVersionString +softwareVersionValid +SparkFun +sphinxcontrib +SPI +spiflash +spinel +src +SRP +SRV +SSBL +SSID +startoffset +StartScan +startsWith +StatusCode +stderr +stdout +sterm +stlink +stm +stmicroelectronics +storagepath +str +strcpy +struct +structs +su +Subclassing +subcommand +subcommands +subdirectories +subdirectory +subfolder +submodule +submodules +subnet +subprocess +SubscribeResponse +SubscriptionId +substeps +subtype +sudo +SulfateConcentrationMeasurement +SulfurDioxideConcentrationMeasurement +suppressResponse +svg +SVR +SWD +SWU +symlinks +sysbuild +sysconfdir +SysConfig +sysctl +sysdeps +SYSROOT +systemctl +systemd +systemdsystemunitdir +systemduserunitdir +systime +sysv +TargetNavigator +TBD +tbody +tcl +TCP +teardown +Telink +TemperatureMeasurement +templating +Tera +testability +TestArray +TestCluster +TestConstraints +TestEmptyString +TestEqualities +TestGenExample +TestGroupDemoConfig +TestMultiRead +TestName +TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke +TESTPASSWD +TestPICS +TESTSSID +TestString +TestStruct +TestThreadStackMgr +TestTimedRequestTimeout +TestUint +TestUpdateValue +testws +texinfo +textboxes +TFT +ThermostatUserInterfaceConfiguration +ThIsIsNoTMyReAlGiThUbToKeNSoDoNoTtRy +thread +ThreadNetworkDiagnostics +threadOperationalDataset +ThreadStackManager +ThreadStackManagerImpl +ths +Thunderboard +timedInteractionTimeoutMs +TimeFormatLocalization +timeframe +timeoutMs +TimeSynchronization +tinycrypt +Tizen +TKIP +TLS +tlsr +TLV +tmp +tngvndl +TODO +toJson +tokenization +tokenized +tokenizer +toolchain +toolchains +topologies +tos +TotalColiformBacteriaConcentrationMeasurement +totalTests +TotalTrihalomethanesConcentrationMeasurement +TPK +trackAlloc +trackFree +TransferSession +transitionTime +TransportMgrBase +TriggerEffect +TRNG +trustm +TrustedRootCertificates +tsan +TSG +tsv +TTL +tty +ttyACM +ttyACMx +ttymxc +ttyUSB +TurbidityConcentrationMeasurement +TvCasting +TVOC +tvOS +TXD +txt +uargument +UART +UDC +udcport +udhcpc +UDP +UDPEndPoint +udpPort +ug +ui +uint +ULA +Ultrafast +UNBLUR +uncommissioned +Unencrypted +unfocus +Unicast +UniFlash +UnitLocalization +unpair +unprovisioned +Unsecure +Unselect +untrusted +updateAvailable +updateNotAvailable +UpdateTokens +upstreamed +ureverse +URI +urlrequest +usbmodem +usbserial +USBtoUART +uscif +UserConsentNeeded +userConsentState +userguide +USERINTERFACE +UserLabel +usermod +usr +UTF +util +utils +UUID +ux +validator +valgrind +vcom +VCP +Vectorcall +VendorID +VendorName +vendorpayload +venv +ver +Verifier +Verifiers +VID +vids +virtualenv +visualstudio +vlatest +VLEDs +vm +vn +vnc +vous +VPN +VSC +VSCode +WaitNewInputEvent +WakeOnLan +WantedBy +watchdogTimeout +watchOS +webpage +wf +wg +wget +whde +whitespace +whitespaces +whl +wic +WiFiNetworkDiagnostics +WindowCovering +WindowCoveringGoToLiftPercentage +WiseMCU +wlan +wmm +WPA +wpan +wra +WriteAttribute +writefds +wrover +WS +WSL +WSTK +xa +xAAAA +xab +xaver +xb +xbef +xc +xcd +Xcode +xcodebuild +xcodeproj +xcworkspace +xd +xds +xdsdfu +xEA +xEB +xEC +xed +xef +xF +xFA +xFB +xFC +xFD +xFE +xFF +xFFF +xFFFF +xfffff +xFFFFFFEFFFFFFFFF +XMLPICSValidator +xtensa +xvzf +xwayland +xyz +xz +xzvf +yaml +yearday +yml +YNJV +Yocto +yoctoproject +YourFolder +zapt +zaptool +ZCL +zclconfigure +zclread +zclsubscribe +zclwrite +ZephyrConfig +zephyrproject +zhengyaohan +Zigbee +zigbeealliance +zigbeethread +zsdk +TBR diff --git a/.github/ISSUE_TEMPLATE/001-bug-report.yaml b/.github/ISSUE_TEMPLATE/001-bug-report.yaml new file mode 100644 index 0000000000..8944e002c5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/001-bug-report.yaml @@ -0,0 +1,80 @@ +name: "\U0001F41B Bug report" +description: Create a report to help Matter +title: "[BUG] " +labels: [bug, "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" + validations: + required: true + - type: input + attributes: + label: GitHub hash of the SDK that was being used + description: Hash of the GitHub SDK used + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf + - python + - raspi + - vscode + - windows + - other + - core + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.0.1, N/A" + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for submitting a bug!" diff --git a/.github/ISSUE_TEMPLATE/002-1.0-issue.yaml b/.github/ISSUE_TEMPLATE/002-1.0-issue.yaml new file mode 100644 index 0000000000..10551fef60 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/002-1.0-issue.yaml @@ -0,0 +1,98 @@ +name: "\u0030\u20e3 1.0 Issue" +description: Create an issue that is required for Matter 1.0 release +title: "[1.0] " +labels: [bug, "V1.0", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" + validations: + required: true + - type: input + attributes: + label: GitHub hash of the SDK that was being used + description: Hash of the GitHub SDK used + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.0.1, N/A" + - type: dropdown + attributes: + label: Type + description: What type of issue is this? + multiple: true + options: + - Test Improvement + - Common Cluster Logic + - Spec Compliance Issue + - Security Issue + - Platform Issue + - Core SDK Memory Issue + - Core SDK Crash + - Core SDK Performance Improvement + - Core SDK Interopability Issue + validations: + required: true + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping us get to 1.0!" diff --git a/.github/ISSUE_TEMPLATE/003-1.1-issue.yaml b/.github/ISSUE_TEMPLATE/003-1.1-issue.yaml new file mode 100644 index 0000000000..50db3e80a9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/003-1.1-issue.yaml @@ -0,0 +1,98 @@ +name: "\u0031\u20e3 1.1 Issue" +description: Create an issue that is required for Matter 1.1 release +title: "[1.1] " +labels: [bug, "V1.1", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" + validations: + required: true + - type: input + attributes: + label: GitHub hash of the SDK that was being used + description: Hash of the GitHub SDK used + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.1, N/A" + - type: dropdown + attributes: + label: Type + description: What type of issue is this? + multiple: true + options: + - Test Improvement + - Common Cluster Logic + - Spec Compliance Issue + - Security Issue + - Platform Issue + - Core SDK Memory Issue + - Core SDK Crash + - Core SDK Performance Improvement + - Core SDK Interopability Issue + validations: + required: true + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping us get to 1.1!" diff --git a/.github/ISSUE_TEMPLATE/004-1.2-issue.yaml b/.github/ISSUE_TEMPLATE/004-1.2-issue.yaml new file mode 100644 index 0000000000..81b641a52e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/004-1.2-issue.yaml @@ -0,0 +1,98 @@ +name: "\u0032\u20e3 1.2 Issue" +description: Create an issue that is required for Matter 1.2 release +title: "[1.2] " +labels: [bug, "V1.2", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" + validations: + required: true + - type: input + attributes: + label: GitHub hash of the SDK that was being used + description: Hash of the GitHub SDK used + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.2, N/A" + - type: dropdown + attributes: + label: Type + description: What type of issue is this? + multiple: true + options: + - Test Improvement + - Common Cluster Logic + - Spec Compliance Issue + - Security Issue + - Platform Issue + - Core SDK Memory Issue + - Core SDK Crash + - Core SDK Performance Improvement + - Core SDK Interopability Issue + validations: + required: true + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping us get to 1.2!" diff --git a/.github/ISSUE_TEMPLATE/005-1.3-issue.yaml b/.github/ISSUE_TEMPLATE/005-1.3-issue.yaml new file mode 100644 index 0000000000..5c91f91e75 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/005-1.3-issue.yaml @@ -0,0 +1,98 @@ +name: "\u0033\u20e3 1.3 Issue" +description: Create an issue that is required for Matter 1.3 release +title: "[1.3] " +labels: [bug, "V1.3", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" + validations: + required: true + - type: input + attributes: + label: GitHub hash of the SDK that was being used + description: Hash of the GitHub SDK used + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.3, N/A" + - type: dropdown + attributes: + label: Type + description: What type of issue is this? + multiple: true + options: + - Test Improvement + - Common Cluster Logic + - Spec Compliance Issue + - Security Issue + - Platform Issue + - Core SDK Memory Issue + - Core SDK Crash + - Core SDK Performance Improvement + - Core SDK Interopability Issue + validations: + required: true + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping us get to 1.3!" diff --git a/.github/ISSUE_TEMPLATE/049-trivial-fix.yaml b/.github/ISSUE_TEMPLATE/049-trivial-fix.yaml new file mode 100644 index 0000000000..7c82d950e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/049-trivial-fix.yaml @@ -0,0 +1,93 @@ +name: "\U0001F3C3 Trivial Fix" +description: Create an issue for a trivial fix +title: "[Trivial] " +labels: [bug, "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to submit a trivial fix, can you please please help us understand this change in this quick form? + - type: dropdown + attributes: + label: Type + description: What type of trivial fix is this? + multiple: true + options: + - Comment fix + - Typo fix + - Rename + - Other + validations: + required: true + - type: textarea + id: repro + attributes: + label: Explanation + description: "(Optional) If other, why do you think this is trivial?" + validations: + required: false + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - all + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.0.1, N/A" + - type: dropdown + attributes: + label: Testing + description: How was this tested? + multiple: true + options: + - Unit tested + - YAML tested + - Manually tested with SDK + - CI tested + - Hardware validated + - Platform validated + validations: + required: true + - type: textarea + attributes: + label: (Optional) If manually tested please explain why this is only manually tested + description: | + Please explain how you tested it + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about this! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for submitting a trivial issue!" diff --git a/.github/ISSUE_TEMPLATE/050-tooling-fix.yaml b/.github/ISSUE_TEMPLATE/050-tooling-fix.yaml new file mode 100644 index 0000000000..0d775a61ef --- /dev/null +++ b/.github/ISSUE_TEMPLATE/050-tooling-fix.yaml @@ -0,0 +1,88 @@ +name: "\U0001F9F0 Tooling Fix/Feature" +description: Create an issue for a tooling specific fix/feature +title: "[Tooling] " +labels: ["tools", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to submit a an issue for our tooling, can you please please help us understand this change in this quick form? + - type: textarea + id: repro + attributes: + label: Reproduction steps / Feature + description: "How do you trigger this issue and/or can you please explain this new feature? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.0.1, N/A" + - type: dropdown + attributes: + label: Type + description: How was this tested? + multiple: true + options: + - Unit tested + - YAML tested + - Manually tested with SDK + - CI tested + - Hardware validated + - Platform validated + validations: + required: true + - type: textarea + attributes: + label: (Optional) If manually tested please explain why this is only manually tested + description: | + Please explain how you tested it + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about this! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for help our tooling!" diff --git a/.github/ISSUE_TEMPLATE/060-platform-fix.yaml b/.github/ISSUE_TEMPLATE/060-platform-fix.yaml new file mode 100644 index 0000000000..fdb8b76d88 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/060-platform-fix.yaml @@ -0,0 +1,88 @@ +name: "\U0001F3D7 Platform Fix" +description: Create an issue for a platform specific fix +title: "[Platform] " +labels: ["platform", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to submit a an issue for a platform, can you please please help us understand this change in this quick form? + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this issue? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.0.1, N/A" + - type: dropdown + attributes: + label: Type + description: How was this tested? + multiple: true + options: + - Unit tested + - YAML tested + - Manually tested with SDK + - CI tested + - Hardware validated + - Platform validated + validations: + required: true + - type: textarea + attributes: + label: (Optional) If manually tested please explain why this is only manually tested + description: | + Please explain how you tested it + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about this! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for submitting a platform issue!" diff --git a/.github/ISSUE_TEMPLATE/080-feature-request.yaml b/.github/ISSUE_TEMPLATE/080-feature-request.yaml new file mode 100644 index 0000000000..c83b0c22ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/080-feature-request.yaml @@ -0,0 +1,62 @@ +name: "\U0001F4A1 Feature Request" +description: Create an feature to be considered future release +title: "[Feature] " +labels: ["feature work", "feature request", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for submitting a feature request to the Matter SDK! We need information about the feature to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Feature description + description: "What feature are you looking to add? Please walk us through it!" + value: | + ... + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - all + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.0.1, N/A" + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for submitting a new feature request." diff --git a/.github/ISSUE_TEMPLATE/090-sve-issue.yaml b/.github/ISSUE_TEMPLATE/090-sve-issue.yaml new file mode 100644 index 0000000000..6ea6534123 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/090-sve-issue.yaml @@ -0,0 +1,119 @@ +name: "\U0001F9EA SVE Issue" +description: Create an issue that is required for SVE +title: "[SVE] " +labels: [bug, "sve", "request sve", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" + validations: + required: true + - type: input + attributes: + label: GitHub hash of the SDK that was being used + description: Hash of the GitHub SDK used + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + validations: + required: true + - type: input + id: platform-versions + attributes: + label: Platform Version(s) + description: "What platform version(s) are affected [optional]" + placeholder: "eg: 1.0.1, N/A" + - type: dropdown + attributes: + label: Type + description: What type of issue is this? + multiple: true + options: + - Test Improvement + - Common Cluster Logic + - Spec Compliance Issue + - Security Issue + - Platform Issue + - Core SDK Memory Issue + - Core SDK Crash + - Core SDK Performance Improvement + - Core SDK Interopability Issue + validations: + required: true + - type: dropdown + attributes: + label: Testing + description: How was this tested? + multiple: true + options: + - Unit tested + - YAML tested + - Manually tested with SDK + - CI tested + - Hardware validated + - Platform validated + validations: + required: true + - type: textarea + attributes: + label: (Optional) If manually tested please explain why this is only manually tested + description: | + Please explain how you tested it + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping our SVE!" diff --git a/.github/ISSUE_TEMPLATE/091-cert-blocker.yaml b/.github/ISSUE_TEMPLATE/091-cert-blocker.yaml new file mode 100644 index 0000000000..659135117d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/091-cert-blocker.yaml @@ -0,0 +1,108 @@ +name: "\U0001F4DC Test Case Failure / Cert Blocker" +description: Create a report to identify matter certification test failures +title: "[CERT-TEST-FAILURE] " +labels: [bug, "cert blocker", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the cert blocker to follow up, so please help us out by filling out this information. + - type: dropdown + attributes: + label: Feature Area + description: What feature area is the test failing in? + multiple: true + options: + - Area:AirPurifiers + - Area:AirQualitySensor + - Area:ConcentrationMeasurement + - Area:DeviceAppearance + - Area:Dishwashers + - Area:DoorLockEnhancements + - Area:EventList + - Area:ICDPhase2 + - Area:ModeSelect + - Area:OperationalState + - Area:Refrigerators + - Area:RobotVacuums + - Area:RoomAirConditioner + - Area:Scenes + - Area:SmokeCO2 + - Area:TemperatureControlledCabinet + - Area:TimeSync + - Other + validations: + required: true + - type: input + id: testcase + attributes: + label: Test Case + description: "Which test case is failing?" + placeholder: "TC-XXXX" + validations: + required: true + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: "How do you trigger this bug? Please walk us through it step by step." + placeholder: | + Please list reproduction steps step by step. + Place shell commands between ```. + Attach logs as files instead of pasting them in. + 1. + 2. + 3. + ... + validations: + required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Example: Whenever I do this, 1-2 times a week, day, hour, etc" + validations: + required: true + - type: input + attributes: + label: GitHub hash of the SDK that was being used + description: Hash of the GitHub SDK used + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf + - python + - raspi + - vscode + - windows + - other + - core + validations: + required: true + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for submitting a test case/cert blocker!" diff --git a/.github/ISSUE_TEMPLATE/097-ci-test-failure.yaml b/.github/ISSUE_TEMPLATE/097-ci-test-failure.yaml new file mode 100644 index 0000000000..a99f5a6361 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/097-ci-test-failure.yaml @@ -0,0 +1,59 @@ +name: "\U0001F6E0 Test Issue" +description: Test issue +title: "[Test Failed] " +labels: ["build issue", "needs triage", "tests"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK's tests! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Test issue(s) + description: "What are the tests that failed? Please include links to failed jobs if possible." + value: | + 1. + 2. + 3. + ... + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + - all + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping improve our tests" diff --git a/.github/ISSUE_TEMPLATE/098-build-issue.yaml b/.github/ISSUE_TEMPLATE/098-build-issue.yaml new file mode 100644 index 0000000000..5d1adb3554 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/098-build-issue.yaml @@ -0,0 +1,59 @@ +name: "\U0001F6E0 Build Issue" +description: Build issue +title: "[Build] " +labels: ["build issue", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK's builds! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Build issue(s) + description: "What are the build issues? Please include links to failed jobs if possible." + value: | + 1. + 2. + 3. + ... + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + - all + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping improve our builds" diff --git a/.github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml b/.github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml new file mode 100644 index 0000000000..eefa5f0f98 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/099-github-workflow-issue.yaml @@ -0,0 +1,59 @@ +name: "\U0001F477 GitHub / CI / Workflow" +description: Create an issue to improve CI / Workflows +title: "[Workflow] " +labels: ["workflows", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK's workflows! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Workflow issues + description: "What updates to the workflows are needed?" + value: | + 1. + 2. + 3. + ... + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + - all + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping improve our development workflows" diff --git a/.github/ISSUE_TEMPLATE/100-documentation-issue.yaml b/.github/ISSUE_TEMPLATE/100-documentation-issue.yaml new file mode 100644 index 0000000000..51971d1d01 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/100-documentation-issue.yaml @@ -0,0 +1,58 @@ +name: "\U0001F5BA Documentation Issue" +description: Create an issue to improve documentation +title: "[Documentation] " +labels: ["documentation", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue against the Matter SDK! We need information about the bug report to follow up, so please help us out by filling out this information. + - type: textarea + id: repro + attributes: + label: Documentation issues + description: "What updates to documentation are needed?" + value: | + 1. + 2. + 3. + ... + validations: + required: true + - type: dropdown + attributes: + label: Platform + description: What platforms are affected? + multiple: true + options: + - ameba + - android + - cc13x2_cc26x2 + - darwin + - efr32 + - esp32 + - freeRTOS + - IMX8 + - k32w + - nrf connect + - nrf + - python + - raspi + - vscode + - windows + - other + - core (please add to version below) + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: markdown + attributes: + value: "Thanks for helping improve our documentation." diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000000..3ba13e0cec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..dad1d2c646 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +> !!!!!!!!!! Please delete the instructions below and replace with PR description +> +> If you have an issue number, please use a syntax of +> `Fixes #12345` and a brief change description +> +> If you do not have an issue number, please have a good description of +> the problem and the fix. Help the reviewer understand what to expect. +> +> Make sure you delete these instructions (to prove you have read them). +> +> !!!!!!!!!! Instructions end + diff --git a/.github/actions/bootstrap-cache/action.yaml b/.github/actions/bootstrap-cache/action.yaml new file mode 100644 index 0000000000..f5ed24ba3f --- /dev/null +++ b/.github/actions/bootstrap-cache/action.yaml @@ -0,0 +1,17 @@ +name: Bootstrap cache +description: Bootstrap cache (deprecated) +runs: + using: "composite" + steps: + - uses: Wandalen/wretry.action@v1.4.10 + name: Bootstrap cache + continue-on-error: true + with: + action: buildjet/cache@v3 + attempt_limit: 3 + attempt_delay: 2000 + with: | + key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**', '/etc/lsb-release') }} + path: | + .environment + build_overrides/pigweed_environment.gni diff --git a/.github/actions/bootstrap/action.yaml b/.github/actions/bootstrap/action.yaml new file mode 100644 index 0000000000..ea06ceed7b --- /dev/null +++ b/.github/actions/bootstrap/action.yaml @@ -0,0 +1,82 @@ +name: Bootstrap +description: Bootstrap +inputs: + platform: + description: "Platform name" + required: false + default: none + bootstrap-log-name: + description: "Bootstrap log name" + required: false + default: bootstrap-logs-${{ github.job }} +outputs: + cache-hit: + description: "Bootstrap environment was restored from cache" + value: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit }} # dynamic action returns all outputs in `outputs` + +runs: + using: "composite" + steps: + - name: Determine bootstrap cache configuration + id: prepare + shell: bash + run: | + # Determine bootstrap cache configuration + # In addition to the various setup files, the work directory matters as well, + # because the bootstrapped Pigweed environment contains absolute paths. + echo "Calculating bootstrap cache key for '$PWD'" + FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}" + case "$RUNNER_OS" in + macOS) OS_HASH="$(sw_vers | shasum -a 256 | cut -d' ' -f1)";; + *) OS_HASH="$(shasum -a 256 /etc/lsb-release | cut -d' ' -f1)";; + esac + PYTHON_HASH="$(python --version | shasum -a 256 | cut -d' ' -f1)" + FINAL_HASH="$(echo "$PWD:$FILES_HASH:$OS_HASH:$PYTHON_HASH" | shasum -a 256 | cut -d' ' -f1)" + echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT" + + # Split caches across backends + case "$RUNNER_OS" in + macOS) echo backend=actions;; + *) echo backend=buildjet;; + esac | tee -a "$GITHUB_OUTPUT" + + - name: Bootstrap from cache + id: restore + uses: ./.github/actions/dynamic + continue-on-error: true + with: + action: ${{ steps.prepare.outputs.backend }}/cache/restore@v4 + with: | + key: ${{ steps.prepare.outputs.key }} + path: | + .environment + build_overrides/pigweed_environment.gni + + - name: Run bootstrap + if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }} + env: + PW_NO_CIPD_CACHE_DIR: 1 + PW_ENVSETUP_NO_BANNER: 1 + shell: bash + run: source scripts/bootstrap.sh -p all,${{ inputs.platform }} + + - name: Save bootstrap cache + uses: ./.github/actions/dynamic + if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }} + continue-on-error: true + with: + action: ${{ steps.prepare.outputs.backend }}/cache/save@v4 + with: | + key: ${{ steps.prepare.outputs.key }} + path: | + .environment + build_overrides/pigweed_environment.gni + + - name: Upload bootstrap logs + uses: actions/upload-artifact@v4 + if: ${{ always() && !env.ACT && fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }} + with: + name: ${{ inputs.bootstrap-log-name }} + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log diff --git a/.github/actions/checkout-submodules-and-bootstrap/action.yaml b/.github/actions/checkout-submodules-and-bootstrap/action.yaml new file mode 100644 index 0000000000..df3fdff1e0 --- /dev/null +++ b/.github/actions/checkout-submodules-and-bootstrap/action.yaml @@ -0,0 +1,43 @@ +name: Checkout submodules & Bootstrap +description: Checkout submodules & Bootstrap +inputs: + platform: + description: "Platform name" + required: true + extra-submodule-parameters: + description: "extra submodule parameters" + required: false + default: "" + bootstrap-log-name: + description: "Bootstrap log name" + required: false + default: bootstrap-logs-${{ github.job }} +runs: + using: "composite" + steps: + - name: Maximize runner disk + uses: ./.github/actions/maximize-runner-disk + - name: Dump disk info + uses: ./.github/actions/dump-disk-info + - name: Set git safe directory for local act runs + uses: ./.github/actions/git-safe-directory + - name: Checkout submodules + uses: ./.github/actions/checkout-submodules + with: + platform: ${{ inputs.platform }} + extra-parameters: ${{ inputs.extra-submodule-parameters }} + - name: Bootstrap + uses: ./.github/actions/bootstrap + with: + platform: ${{ inputs.platform }} + bootstrap-log-name: ${{ inputs.bootstrap-log-name }} + - name: Dump disk info after checkout submodule & Bootstrap + shell: bash + run: scripts/dump_diskspace_info.sh + - name: Work around TSAN ASLR issues + if: runner.os == 'Linux' && !env.ACT + shell: bash + run: | + # See https://stackoverflow.com/a/77856955/2365113 + if [[ "$UID" == 0 ]]; then function sudo() { "$@"; }; fi + sudo sysctl vm.mmap_rnd_bits=28 diff --git a/.github/actions/checkout-submodules/action.yaml b/.github/actions/checkout-submodules/action.yaml new file mode 100644 index 0000000000..e180a8c494 --- /dev/null +++ b/.github/actions/checkout-submodules/action.yaml @@ -0,0 +1,19 @@ +name: Checkout submodules +description: Checkout submodules +inputs: + extra-parameters: + description: "extra parameters" + required: false + default: "" + platform: + description: "Platform name" + required: true +runs: + using: "composite" + steps: + - uses: Wandalen/wretry.action@v1.4.10 + name: Checkout submodules + with: + command: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }} + attempt_limit: 3 + attempt_delay: 2000 diff --git a/.github/actions/dump-disk-info/action.yaml b/.github/actions/dump-disk-info/action.yaml new file mode 100644 index 0000000000..1f6474e54c --- /dev/null +++ b/.github/actions/dump-disk-info/action.yaml @@ -0,0 +1,20 @@ +name: Dump disk space info +description: Help debug running out of disk space on github CI +runs: + using: "composite" + steps: + - name: Collect disk info + # Unfortunately current syntax for github wrapper actions only work for + # Javascript actions, and Docker container actions, which doesn't make it + # possible to wrap a shell script like the one below. The action below + # essentially wraps the shell commands we want to run into a Javascript + # wrapped action. This allow us to get the disk info usage before a job + # is run and after the job is run regardless if the job succeeds or + # fails. + uses: pyTooling/Actions/with-post-step@v0.4.5 + if: ${{ runner.os == 'Linux' }} + with: + main: |- + exec ./scripts/dump_diskspace_info.sh + post: |- + exec ./scripts/dump_diskspace_info.sh \ No newline at end of file diff --git a/.github/actions/dynamic/action.yaml b/.github/actions/dynamic/action.yaml new file mode 100644 index 0000000000..7cee233c4f --- /dev/null +++ b/.github/actions/dynamic/action.yaml @@ -0,0 +1,38 @@ +name: Dynamic +description: Dynamically resolves another GitHub action +inputs: + action: + description: Action reference + required: true + with: + description: Action inputs as multi-line YAML string + required: false + default: "" +outputs: + outputs: + description: JSON object of outputs from the action + value: ${{ steps.run.outputs.outputs }} +runs: + using: composite + steps: + - name: Instantiate + shell: bash + run: | + # Dynamically invoke ${{ inputs.action }} + with='${{ inputs.with }}' + [[ -z "$with" ]] || with="$(echo ' with:'; sed -e 's/^/ /' <<<"$with")" + mkdir -p ./.tmp/dynamic-action-instance + cat <./.tmp/dynamic-action-instance/action.yaml + runs: + using: composite + steps: + - id: run + uses: ${{ inputs.action }} + $with + outputs: + outputs: + value: $(echo '$'){{ toJSON(steps.run.outputs) }} + END + - name: Run + id: run + uses: ./.tmp/dynamic-action-instance diff --git a/.github/actions/git-safe-directory/action.yaml b/.github/actions/git-safe-directory/action.yaml new file mode 100644 index 0000000000..1308c4ea1b --- /dev/null +++ b/.github/actions/git-safe-directory/action.yaml @@ -0,0 +1,9 @@ +name: Git safe directory +description: For running act with checkout owned by non-root user +runs: + using: "composite" + steps: + - name: Set git safe.directory to "*" + if: ${{ env.ACT }} + shell: bash + run: git config --system --add safe.directory '*' \ No newline at end of file diff --git a/.github/actions/maximize-runner-disk/action.yaml b/.github/actions/maximize-runner-disk/action.yaml new file mode 100644 index 0000000000..d71ba3646d --- /dev/null +++ b/.github/actions/maximize-runner-disk/action.yaml @@ -0,0 +1,48 @@ +name: Maximize runner disk +description: Free up disk space on the github runner +runs: + using: "composite" + steps: + - name: Free up disk space on the github runner + if: runner.os == 'Linux' && !env.ACT + shell: bash + run: | + # maximize-runner-disk + # Directories to prune to free up space. Candidates: + # 1.6G /usr/share/dotnet + # 1.1G /usr/local/lib/android/sdk/platforms + # 1000M /usr/local/lib/android/sdk/build-tools + # 8.9G /usr/local/lib/android/sdk + # This list can be amended later to change the trade-off between the amount of + # disk space freed up, and how long it takes to do so (deleting many files is slow). + prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools) + + if [[ "$UID" -eq 0 && -d /__w ]]; then + root=/runner-root-volume + if [[ ! -d "$root" ]]; then + echo "Unable to maximize disk space, job is running inside a container and $root is not mounted" + exit 0 + fi + function sudo() { "$@"; } # we're already root (and sudo is probably unavailable) + elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then + root= + else + echo "Unable to maximize disk space, unknown runner environment" + exit 0 + fi + + echo "Freeing up runner disk space on ${root:-/}" + function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; } + function now() { date '+%s'; } + before="$(avail)" start="$(now)" + for dir in "${prune[@]}"; do + if [[ -d "${root}${dir}" ]]; then + echo "- $dir" + # du -sh -- "${root}${dir}" + sudo rm -rf -- "${root}${dir}" + else + echo "- $dir (not found)" + fi + done + after="$(avail)" end="$(now)" + echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds." diff --git a/.github/actions/perform-codeql-analysis/action.yaml b/.github/actions/perform-codeql-analysis/action.yaml new file mode 100644 index 0000000000..f1caf10dc3 --- /dev/null +++ b/.github/actions/perform-codeql-analysis/action.yaml @@ -0,0 +1,34 @@ +name: Run CodeQL Analysis +description: Run and upload CodeQL Analysis +inputs: + language: + description: "language for codeql analysis" + required: true +runs: + using: "composite" + steps: + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ inputs.language }}" + upload: False + output: sarif-results + - name: filter-sarif + uses: advanced-security/filter-sarif@v1 + with: + patterns: | + -**/third_party/** + -**/scripts/** + input: "sarif-results/${{ inputs.language }}.sarif" + output: "sarif-results/${{ inputs.language }}.sarif" + + - name: Upload SARIF + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: "sarif-results/${{ inputs.language }}.sarif" + - name: Upload loc as a Build Artifact + uses: actions/upload-artifact@v4 + with: + name: sarif-results + path: sarif-results + retention-days: 1 diff --git a/.github/actions/setup-size-reports/action.yaml b/.github/actions/setup-size-reports/action.yaml new file mode 100644 index 0000000000..511a434242 --- /dev/null +++ b/.github/actions/setup-size-reports/action.yaml @@ -0,0 +1,15 @@ +name: Setup size reports +description: Setup size reports +inputs: + gh-context: + description: "GH Context" + required: true + +runs: + using: "composite" + steps: + - name: Set up environment for size reports + shell: bash + env: + GH_CONTEXT: ${{ inputs.gh-context }} + run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" diff --git a/.github/actions/upload-size-reports/action.yaml b/.github/actions/upload-size-reports/action.yaml new file mode 100644 index 0000000000..41fe8c820c --- /dev/null +++ b/.github/actions/upload-size-reports/action.yaml @@ -0,0 +1,17 @@ +name: upload-size-reports +description: upload-size-reports +inputs: + platform-name: + description: "Platform name Name" + required: true + +runs: + using: "composite" + steps: + - name: Uploading Size Reports + uses: actions/upload-artifact@v4 + if: ${{ !env.ACT }} + with: + name: Size,${{ inputs.platform-name }}-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} + path: | + /tmp/bloat_reports/ diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml new file mode 100644 index 0000000000..c6fa9bcf94 --- /dev/null +++ b/.github/boring-cyborg.yml @@ -0,0 +1,132 @@ +# Copyright (c) 2020 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. +labelPRBasedOnFilePath: + ############################################################ + # Top Level Labels + ############################################################ + repo: + - ./* + + ############################################################ + # Examples + ############################################################ + examples: + - examples/* + + ############################################################ + # Documentation + ############################################################ + documentation: + - docs/* + + ############################################################ + # Tools + Development Items + ############################################################ + scripts: + - scripts/* + + integrations: + - integrations/* + + vscode: + - .vscode + - .devcontainer + + gn: + - gn/* + + github: + - .github + + workflows: + - .github/workflows/* + + tools: + - tools/* + + ############################################################ + # Source Code + ############################################################ + qr code: + - src/qrcode/* + + lwip: + - src/lwip/* + + inet: + - src/inet/* + + config: + - config/* + + lib: + - src/lib/* + + crypto: + - src/crypto/* + + controller: + - src/controller/* + + ble: + - src/ble/* + + app: + - src/app/* + + transport: + - src/transport/* + + system: + - src/system/* + + setup payload: + - src/setup_payload/* + + ############################################################ + # Platforms + ############################################################ + platform: + - src/platform/* + + darwin: + - src/platform/Darwin/* + - src/darwin/* + + efr32: + - src/platform/silabs/* + + esp32: + - src/platform/ESP32/* + + freeRTOS: + - src/platform/FreeRTOS/* + + k32w: + - src/platform/K32W/* + + linux: + - src/platform/Linux/* + + nrf connect: + - src/platform/nrfconnect/* + + openthread: + - src/platform/openthread/* + + zephyr: + - src/platform/Zephyr/* + + telink: + - src/platform/telink/* diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000000..027b4dc4e4 --- /dev/null +++ b/.github/config.yml @@ -0,0 +1,8 @@ +todo: + keyword: ["@todo", "TODO", "TODO:"] # string|string[] + bodyKeyword: ["@body", "BODY", "BODY:"] # string|string[] + blobLines: 10 # number|boolean, 0 or false to disable + autoAssign: true # string|string[]|boolean + label: ["todo"] # boolean|string|string[] + reopenClosed: true # boolean + exclude: ".*lint\\.yaml|.*/(zzz_generated|zap-generated)/.*" # string diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..8c618416fb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,61 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" + allow: + - dependency-name: "third_party/pigweed/repo" + - dependency-name: "third_party/mbedtls/repo" + - dependency-name: "third_party/openthread/repo" + + - dependency-name: "third_party/ameba/repo" + - dependency-name: "third_party/android_deps/repo" + - dependency-name: "third_party/asr/repo" + - dependency-name: "third_party/boringssl/repo" + - dependency-name: "third_party/bouffalolab/repo" + - dependency-name: "third_party/cirque/repo" + - dependency-name: "third_party/editline/repo" + - dependency-name: "third_party/freertos/repo" + - dependency-name: "third_party/imgui/repo" + - dependency-name: "third_party/infineon/repo" + - dependency-name: "third_party/inipp/repo" + - dependency-name: "third_party/java_deps/repo" + - dependency-name: "third_party/jlink/repo" + - dependency-name: "third_party/jsoncpp/repo" + - dependency-name: "third_party/libwebsockets/repo" + - dependency-name: "third_party/lwip/repo" + - dependency-name: "third_party/mbed-mcu-boot/repo" + - dependency-name: "third_party/mbed-os-cypress-capsense-button/repo" + - dependency-name: "third_party/mbed-os-posix-socket/repo" + - dependency-name: "third_party/mbedtls/repo" + - dependency-name: "third_party/mt793x_sdk/repo" + - dependency-name: "third_party/mynewt-core/repo" + - dependency-name: "third_party/nanopb/repo" + - dependency-name: "third_party/nlassert/repo" + - dependency-name: "third_party/nlfaultinjection/repo" + - dependency-name: "third_party/nlio/repo" + - dependency-name: "third_party/nxp/repo" + - dependency-name: "third_party/open-iot-sdk/repo" + - dependency-name: "third_party/ot-br-posix/repo" + - dependency-name: "third_party/perfetto/repo" + - dependency-name: "third_party/qpg_sdk/repo" + - dependency-name: "third_party/silabs/repo" + - dependency-name: "third_party/simw-top-mini/repo" + - dependency-name: "third_party/ti_simplelink_sdk/repo" + - dependency-name: "third_party/tizen/repo" diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml new file mode 100644 index 0000000000..909ef045c0 --- /dev/null +++ b/.github/issue-labeler.yml @@ -0,0 +1,54 @@ +darwin: + # Make sure we don't match random words that contain "mac" inside. + # + # Make sure we don't match random words that contain "ios" inside + # (like "kiosk" or whatnot), but do allow matching "ios8" and things + # like that. + # + # Make sure we don't trigger for the string "MAC", which almost + # certainly has nothing to do with Darwin. + # + # \\b means "word boundary" + # (?![a-z]) means "there is no next char in the range a-z". + - "/(\\b[Ii][Oo][Ss](?![a-zA-Z])|[Hh][Oo][Mm][Ee][Pp][Oo][Dd]|[Dd][Aa][Rr][Ww][Ii][Nn]|\\bm[Aa][Cc]\\b|\\bMa[Cc]\\b|\\bM[Aa]c\\b|[Mm][Aa][Cc][Oo][Ss])/" + +linux: + - "/(linux)/i" + +# Special Keywords for Cert Blockers +air purifiers: + - "(Area:AirPurifiers)" +air quality sensors: + - "(Area:AirQualitySensor)" +concentration measurement: + - "(Area:ConcentrationMeasurement)" +device appearance: + - "(Area:DeviceAppearance)" +dishwashers: + - "(Area:Dishwashers)" +door lock enhancements: + - "(Area:DoorLockEnhancements)" +event list: + - "(Area;EventList)" +icd: + - "(Area:ICDPhase2)" +icd phase 2: + - "(Area:ICDPhase2)" +mode select: + - "(Area:ModeSelect)" +operational state: + - "(Area:OperationalState)" +refrigerators: + - "(Area:Refrigerators)" +robot vacuums: + - "(Area:RobotVacuums)" +room air conditioners: + - "(Area:RoomAirConditioner)" +scenes: + - "(Area:Scenes)" +smoke & c02: + - "(Area:SmokeCO2)" +temperature controlled cabinet: + - "(Area:TemperatureControlledCabinet)" +time sync: + - "(Area:TimeSync)" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..7e02fe6d36 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,333 @@ +# Copyright (c) 2020 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. + +############################################################ +# Top Level Labels +############################################################ +repo: + - changed-files: + - any-glob-to-any-file: + - './*' + +############################################################ +# Examples +############################################################ +examples: + - changed-files: + - any-glob-to-any-file: + - examples/* + - examples/**/* + +############################################################ +# Documentation +############################################################ +documentation: + - changed-files: + - any-glob-to-any-file: + - docs/* + - docs/**/* + - "*.md" + +############################################################ +# Tools + Development Items +############################################################ +scripts: + - changed-files: + - any-glob-to-any-file: + - scripts/* + - scripts/**/* + +integrations: + - changed-files: + - any-glob-to-any-file: + - integrations/* + - integrations/**/* + +docker: + - changed-files: + - any-glob-to-any-file: + - integrations/docker/* + - integrations/docker/**/* + +vscode: + - changed-files: + - any-glob-to-any-file: + - .vscode/* + - .vscode/**/* + - .devcontainer/* + - .devcontainer/**/* + +gn: + - changed-files: + - any-glob-to-any-file: + - build/* + - build/**/* + - build_overrides/* + - build_overrides/**/* + - .gn + - "*.gn" + - "*.gni" + +github: + - changed-files: + - any-glob-to-any-file: + - .github + - .github/* + - .github/**/* + +workflows: + - changed-files: + - any-glob-to-any-file: + - .github/workflows/* + - .github/workflows/**/* + +tools: + - changed-files: + - any-glob-to-any-file: + - src/tools/* + - src/tools/**/* + - tools/* + - tools/**/* + - examples/chip-tool/* + - examples/chip-tool/**/* + +############################################################ +# Tests +############################################################ +tests: + - changed-files: + - any-glob-to-any-file: + - src/python_testing/* + - src/python_testing/**/* + - src/app/tests/* + - src/app/tests/**/* + +test driver: + - changed-files: + - any-glob-to-any-file: + - src/test_driver/* + - src/test_driver/**/* + +# Cert tests touched: add current milestone delta-tracking label. +# TODO: Change after Aug 15, 2024 +matter-1.4-te2-script-change: + - changed-files: + - any-glob-to-any-file: + - src/python_testing/* + - src/python_testing/**/* + - src/app/tests/suites/certification/* + +############################################################ +# Source Code +############################################################ +qr code: + - changed-files: + - any-glob-to-any-file: + - src/qrcode/* + - src/qrcode/**/* + - src/qrcodetool/* + - src/qrcodetool/**/* + +lwip: + - changed-files: + - any-glob-to-any-file: + - src/lwip/* + - src/lwip/**/* + +inet: + - changed-files: + - any-glob-to-any-file: + - src/inet/* + - src/inet/**/* + +config: + - changed-files: + - any-glob-to-any-file: + - config/* + - config/**/* + +lib: + - changed-files: + - any-glob-to-any-file: + - src/lib/* + - src/lib/**/* + +core: + - changed-files: + - any-glob-to-any-file: + - src/lib/core/* + - src/lib/core/**/* + +protocols: + - changed-files: + - any-glob-to-any-file: + - src/lib/protocols/* + - src/lib/protocols/**/* + - src/protocols/* + - src/protocols/**/* + +messaging: + - changed-files: + - any-glob-to-any-file: + - src/messaging/* + - src/messaging/**/* + +shell: + - changed-files: + - any-glob-to-any-file: + - src/lib/shell/* + - src/lib/shell/**/* + +support: + - changed-files: + - any-glob-to-any-file: + - src/lib/support/* + - src/lib/support/**/* + +crypto: + - changed-files: + - any-glob-to-any-file: + - src/crypto/* + - src/crypto/**/* + +controller: + - changed-files: + - any-glob-to-any-file: + - src/controller/* + - src/controller/**/* + +ble: + - changed-files: + - any-glob-to-any-file: + - src/ble/* + - src/ble/**/* + +app: + - changed-files: + - any-glob-to-any-file: + - src/app/* + - src/app/**/* + +icd: + - changed-files: + - any-glob-to-any-file: + - src/app/icd/* + - src/app/icd/**/* + +transport: + - changed-files: + - any-glob-to-any-file: + - src/transport/* + - src/transport/**/* + +system: + - changed-files: + - any-glob-to-any-file: + - src/system/* + - src/system/**/* + +setup payload: + - changed-files: + - any-glob-to-any-file: + - src/setup_payload/* + - src/setup_payload/**/* + +############################################################ +# Platforms +############################################################ +platform: + - changed-files: + - any-glob-to-any-file: + - src/platform/* + - src/platform/**/* + - config/tizen/chip-gn/platform/* + - config/tizen/chip-gn/platform/**/* + - examples/platform/* + - examples/platform/**/* + - scripts/tools/memory/platform/* + - scripts/tools/memory/platform/**/* + - src/include/platform/* + - src/include/platform/**/* + - src/lib/dnssd/platform/* + - src/lib/dnssd/platform/**/* + +darwin: + - changed-files: + - any-glob-to-any-file: + - src/platform/Darwin/* + - src/platform/Darwin/**/* + - src/darwin/* + - src/darwin/**/* + - examples/darwin-framework-tool/* + - examples/darwin-framework-tool/**/* + +silabs: + - changed-files: + - any-glob-to-any-file: + - src/platform/silabs/* + - src/platform/silabs/**/* + +esp32: + - changed-files: + - any-glob-to-any-file: + - src/platform/ESP32/* + - src/platform/ESP32/**/* + +freeRTOS: + - changed-files: + - any-glob-to-any-file: + - src/platform/FreeRTOS/* + - src/platform/FreeRTOS/**/* + +k32w: + - changed-files: + - any-glob-to-any-file: + - src/platform/K32W/* + - src/platform/K32W/**/* + +linux: + - changed-files: + - any-glob-to-any-file: + - src/platform/Linux/* + - src/platform/Linux/**/* + +nrf connect: + - changed-files: + - any-glob-to-any-file: + - src/platform/nrfconnect/* + - src/platform/nrfconnect/**/* + +openthread: + - changed-files: + - any-glob-to-any-file: + - src/platform/openthread/* + - src/platform/openthread/**/* + +zephyr: + - changed-files: + - any-glob-to-any-file: + - src/platform/Zephyr/* + - src/platform/Zephyr/**/* + +telink: + - changed-files: + - any-glob-to-any-file: + - src/platform/telink/* + - src/platform/telink/**/* + +tizen: + - changed-files: + - any-glob-to-any-file: + - src/platform/Tizen/* + - src/platform/Tizen/**/* diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000000..d33d2a3e6d --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,76 @@ +# .github/release.yml + +changelog: + exclude: + labels: + - scripts + - external dependency + - submodules + - integrations + - documentation + authors: + - restyled-io + - octocat + - pullapprove + - jira + - issue-label-bot + - github-actions + - github-labels + - buildjet + categories: + - title: Highlighted Fixes + labels: + - release note + - title: Security Fixes + labels: + - security + - title: Bug Fixes + labels: + - bug + - title: Bluetooth Related Changes + labels: + - ble + - title: Spec Alignment Changes + labels: + - spec + - title: Transport/Messaging Layer Changes + labels: + - inet + - transport + - messaging + - protocols + - lwip + - title: Crypto Changes + labels: + - crypto + - title: Core Library Changes + labels: + - lib + - title: Core Changes + labels: + - core + - title: Controller Changes + labels: + - controller + - title: System Level Changes + labels: + - system + - attestation + - title: App Level Changes + labels: + - app + - title: Platform Changes + labels: + - platform + - darwin + - android + - title: Example App Changes + labels: + - examples + - title: Test Changes + labels: + - tests + - title: Build Related Changes + labels: + - gn + - build diff --git a/.github/workflows/artifacts.yaml b/.github/workflows/artifacts.yaml new file mode 100644 index 0000000000..002d945ebc --- /dev/null +++ b/.github/workflows/artifacts.yaml @@ -0,0 +1,17 @@ +name: 'Delete old artifacts' +on: + schedule: + - cron: '0 * * * *' # every hour + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + delete-artifacts: + runs-on: ubuntu-latest + steps: + - uses: kolpav/purge-artifacts-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + expire-in: 14days diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml new file mode 100644 index 0000000000..7ec2a6bf69 --- /dev/null +++ b/.github/workflows/bloat_check.yaml @@ -0,0 +1,53 @@ +# Copyright (c) 2020 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. + +name: Bloat Check +on: + workflow_dispatch: + schedule: + - cron: "*/5 * * * *" + +concurrency: + group: ${{ github.workflow }} + # Don't cancel an already-running bloat check just because it took more + # than 5 minutes to run and our cron job is trying to schedule a new one. + cancel-in-progress: false + +jobs: + pull_request_update: + name: Report on pull requests + + # Don't run on forked repos + if: github.repository_owner == 'project-chip' + + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build:81 + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Report + run: | + scripts/tools/memory/gh_report.py \ + --verbose \ + --report-increases 0.2 \ + --report-pr \ + --github-comment \ + --github-limit-artifact-pages 50 \ + --github-limit-artifacts 500 \ + --github-limit-comments 20 \ + --github-repository project-chip/connectedhomeip \ + --github-api-token "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/build-cert-bins.yaml b/.github/workflows/build-cert-bins.yaml new file mode 100644 index 0000000000..52c274193b --- /dev/null +++ b/.github/workflows/build-cert-bins.yaml @@ -0,0 +1,21 @@ +name: Build Certification Image +on: + workflow_call: + workflow_dispatch: +jobs: + build-cert-bin: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: ghcr.io/project-chip/chip-cert-bins + tags: latest + dockerfile: ./integrations/docker/images/chip-cert-bins/Dockerfile + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + platforms: linux/amd64,linux/arm64,linux/arm diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000000..490d7e79d7 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,476 @@ +# Copyright (c) 2020-2021 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. + +name: Builds + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + workflow_call: + inputs: + run-codeql: + required: false + type: boolean + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + build_linux_gcc_debug: + name: Build on Linux (gcc_debug) + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/:/runner-root-volume" + - "/tmp/log_output:/tmp/test_logs" + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Dump Concurrency context + env: + CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + run: echo "$CONCURRENCY_CONTEXT" + - name: Checkout + uses: actions/checkout@v4 + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + - name: Initialize CodeQL + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/init@v3 + with: + languages: "cpp" + - name: Setup Build + run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false chip_data_model_check_die_on_failure=true" + - name: Run Build + run: scripts/run_in_build_env.sh "ninja -C ./out" + - name: Run Tests + run: scripts/tests/gn_tests.sh + # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 + # TODO https://github.com/project-chip/connectedhomeip/issues/1512 + # - name: Run Code Coverage + # if: ${{ contains('main', env.BUILD_TYPE) }} + # run: scripts/tools/codecoverage.sh + # - name: Upload Code Coverage + # if: ${{ contains('main', env.BUILD_TYPE) }} + # run: bash <(curl -s https://codecov.io/bash) + - name: Set up Build Without Detail Logging + run: scripts/build/gn_gen.sh --args="chip_detail_logging=false" + - name: Run Build Without Detail Logging + run: scripts/run_in_build_env.sh "ninja -C ./out" + - name: Set up Build Without Progress Logging + run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false" + - name: Run Build Without Progress Logging + run: scripts/run_in_build_env.sh "ninja -C ./out" + - name: Set up Build Without Error Logging + run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false chip_error_logging=false" + - name: Run Build Without Error Logging + run: scripts/run_in_build_env.sh "ninja -C ./out" + - name: Set up Build Without Logging + run: scripts/build/gn_gen.sh --args="chip_logging=false" + - name: Run Build Without Logging + run: scripts/run_in_build_env.sh "ninja -C ./out" + - name: Uploading core files + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-core-linux-gcc-debug + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: ./.github/actions/perform-codeql-analysis + with: + language: cpp + # OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually + # having the job timeout. + # + # If re-enabling, some subset of this should be picked + # + # - name: Uploading objdir for debugging + # uses: actions/upload-artifact@v4 + # if: ${{ failure() && !env.ACT }} + # with: + # name: crash-objdir-linux-gcc-debug + # path: out/ + # # objdirs are big; don't hold on to them too long. + # retention-days: 5 + + build_linux: + name: Build on Linux (fake, gcc_release, clang, simulated) + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/:/runner-root-volume" + - "/tmp/log_output:/tmp/test_logs" + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Dump Concurrency context + env: + CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + run: echo "$CONCURRENCY_CONTEXT" + - name: Checkout + uses: actions/checkout@v4 + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + - name: Initialize CodeQL + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/init@v3 + with: + languages: "cpp" + - name: Setup and Build Simulated Device + run: | + BUILD_TYPE=simulated + GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' + CHIP_ROOT_PATH=examples/placeholder/linux + CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" + scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" + - name: Setup Build, Run Build and Run Tests + run: | + BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false chip_data_model_check_die_on_failure=true" + scripts/run_in_build_env.sh "ninja -C ./out/gcc_release" + BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh + - name: Clean output + run: rm -rf ./out + - name: Run Tests with sanitizers + env: + LSAN_OPTIONS: detect_leaks=1 + run: | + for BUILD_TYPE in asan tsan ubsan; do + case $BUILD_TYPE in + "asan") GN_ARGS='is_clang=true is_asan=true';; + "msan") GN_ARGS='is_clang=true is_msan=true';; + "tsan") GN_ARGS='is_clang=true is_tsan=true chip_enable_wifi=false';; + "ubsan") GN_ARGS='is_clang=true is_ubsan=true';; + esac + + rm -rf ./out/sanitizers + BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands + BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh + done + - name: Ensure codegen is done for sanitize + run: | + ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/sanitizers" + - name: Clang-tidy validation + # NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check. + # See https://github.com/llvm/llvm-project/issues/97426 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/run-clang-tidy-on-compile-commands.py \ + --compile-database out/sanitizers/compile_commands.json \ + --file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|-ReadImpl|-InvokeSubscribeImpl|CodegenDataModel_Write|QuieterReporting' \ + check \ + " + - name: Clean output + run: rm -rf ./out + - name: Build using build_examples.py + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-minmdns-ipv6only-clang \ + --target linux-x64-rpc-console \ + build \ + " + - name: Create a pre-generate directory and ensure compile-time codegen would fail + run: | + ./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated" + mv scripts/codegen.py scripts/codegen.py.renamed + mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed + - name: Clean output + run: rm -rf ./out + - name: Build using build_examples.py (pregen) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-all-clusters-ipv6only-clang \ + --target linux-x64-chip-tool-ipv6only-clang \ + --pregen-dir ./zzz_pregenerated \ + build \ + " + - name: Undo code pre-generation changes (make compile time codegen work again) + run: | + rm -rf ./zzz_pregenerated + mv scripts/codegen.py.renamed scripts/codegen.py + mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py + - name: Run fake linux tests with build_examples + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target linux-fake-tests build" + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: ./.github/actions/perform-codeql-analysis + with: + language: cpp + + - name: Uploading core files + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-core-linux + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + # OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually + # having the job timeout. + # + # If re-enabling, some subset of this should be picked + # + # - name: Uploading objdir for debugging + # uses: actions/upload-artifact@v4 + # if: ${{ failure() && !env.ACT }} + # with: + # name: crash-objdir-linux + # path: out/ + # # objdirs are big; don't hold on to them too long. + # retention-days: 5 + + build_linux_python_lib: + name: Build on Linux (python_lib) + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/:/runner-root-volume" + - "/tmp/log_output:/tmp/test_logs" + options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Dump Concurrency context + env: + CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + run: echo "$CONCURRENCY_CONTEXT" + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Setup Build, Run Build and Run Tests + run: | + scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false chip_data_model_check_die_on_failure=true" + scripts/run_in_build_env.sh "ninja -C ./out" + scripts/tests/gn_tests.sh + - name: Setup test python environment + shell: bash + run: | + scripts/run_in_build_env.sh 'virtualenv pyenv' + source pyenv/bin/activate + python -m ensurepip --upgrade + python -m pip install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl + python -m pip install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl + python -m pip install ./out/controller/python/chip_repl-0.0-py3-none-any.whl + + - name: Run Python tests + shell: bash + run: | + source pyenv/bin/activate + cd src/controller/python/test/unit_tests/ + python3 -m unittest -v + - name: Clean previous outputs + run: rm -rf out pyenv + - name: Run Python Setup Payload Generator Test + shell: bash + run: | + scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/' + scripts/run_in_build_env.sh 'virtualenv pyenv' + source pyenv/bin/activate + python -m ensurepip --upgrade + python -m pip install -r scripts/setup/requirements.setuppayload.txt + python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool + + build_linux_python_lighting_device: + name: Build on Linux (python lighting-app) + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/:/runner-root-volume" + - "/tmp/log_output:/tmp/test_logs" + options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Dump Concurrency context + env: + CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + run: echo "$CONCURRENCY_CONTEXT" + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Setup Build + run: | + scripts/build_python_device.sh --chip_detail_logging true + + build_darwin: + name: Build on Darwin (clang, python_lib, simulated) + runs-on: macos-13 + if: github.actor != 'restyled-io[bot]' + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: darwin + - name: Try to ensure the directory for diagnostic log collection exists + run: | + mkdir -p ~/Library/Logs/DiagnosticReports || true + - name: Initialize CodeQL + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/init@v3 + with: + languages: "cpp" + + - name: Setup and Build Simulated Device + run: | + BUILD_TYPE=simulated + GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' + CHIP_ROOT_PATH=examples/placeholder/linux + CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" + scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" + - name: Setup Build, Run Build and Run Tests + # We can't enable leak checking here in LSAN_OPTIONS, because on + # Darwin that's only supported with a new enough clang, and we're + # not building with the pigweed clang here. + 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';; + esac + BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands + scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" + BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh + done + - name: Ensure codegen is done for sanitize + run: | + ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/default" + - name: Clang-tidy validation + # NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check. + # See https://github.com/llvm/llvm-project/issues/97426 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/run-clang-tidy-on-compile-commands.py \ + --compile-database out/default/compile_commands.json \ + --file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|CodegenDataModel_Write|QuieterReporting' \ + check \ + " + - name: Uploading diagnostic logs + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-log-darwin + path: ~/Library/Logs/DiagnosticReports/ + + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: ./.github/actions/perform-codeql-analysis + with: + language: cpp + + # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 + # TODO https://github.com/project-chip/connectedhomeip/issues/1512 + + build_linux_gcc_coverage: + name: Build on Linux (coverage) + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/:/runner-root-volume" + - "/tmp/log_output:/tmp/test_logs" + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Run Build Coverage + run: ./scripts/build_coverage.sh diff --git a/.github/workflows/buildjet-cache-delete.yaml b/.github/workflows/buildjet-cache-delete.yaml new file mode 100644 index 0000000000..f5c4e0668b --- /dev/null +++ b/.github/workflows/buildjet-cache-delete.yaml @@ -0,0 +1,17 @@ +name: Manually Delete BuildJet Cache +on: + workflow_dispatch: + inputs: + cache_key: + description: 'BuildJet Cache Key to Delete' + required: true + type: string +jobs: + manually-delete-buildjet-cache: + runs-on: buildjet-2vcpu-ubuntu-2204 + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: buildjet/cache-delete@v1 + with: + cache_key: ${{ inputs.cache_key }} \ No newline at end of file diff --git a/.github/workflows/cert_test_checks.yaml b/.github/workflows/cert_test_checks.yaml new file mode 100644 index 0000000000..44d545a663 --- /dev/null +++ b/.github/workflows/cert_test_checks.yaml @@ -0,0 +1,35 @@ +# 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. + +name: Certification test checks + +on: + pull_request: + paths: + - "src/app/tests/suites/certification/**" + +jobs: + check-certification-tests: + name: Check for common problems in certification tests + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Run checks + run: | + python3 scripts/tests/matter_yaml_linter.py diff --git a/.github/workflows/check-data-model-directory-updates.yaml b/.github/workflows/check-data-model-directory-updates.yaml new file mode 100644 index 0000000000..305da81d9d --- /dev/null +++ b/.github/workflows/check-data-model-directory-updates.yaml @@ -0,0 +1,31 @@ +# 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. + +name: Check for changes to data_model directory without a sha update + +on: + pull_request: + paths: + - "data_model/**" + +jobs: + check-submodule-update-label: + name: Check for changes to data_model directory without a sha update + runs-on: ubuntu-latest + if: "git diff --name-only HEAD^..HEAD data_model/ | grep -q spec_sha" + steps: + - name: Error Message + run: echo This pull request attempts to update data_model directory, but is missing updates to spec_sha file with the latest version of the sha. Files in the data_model directory are generated automatically and should not be updated manually. + - name: Fail Job + run: exit 1 diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml new file mode 100644 index 0000000000..ca3f42e47c --- /dev/null +++ b/.github/workflows/chef.yaml @@ -0,0 +1,117 @@ +# Copyright (c) 2021 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. + +name: Build Chef CI examples on all platforms + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + chef_linux: + name: Chef - Linux CI Examples + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + options: --user root + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + - name: CI Examples Linux + shell: bash + run: | + ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t linux" + + chef_esp32: + name: Chef - ESP32 CI Examples + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-esp32:81 + options: --user root + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: esp32 + - name: CI Examples ESP32 + shell: bash + run: | + ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t esp32" + + chef_nrfconnect: + name: Chef - NRFConnect CI Examples + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nrf-platform:81 + options: --user root + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nrfconnect + - name: CI Examples NRFConnect + shell: bash + run: | + ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect" + + chef_telink: + name: Chef - Telink CI Examples + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-telink:81 + options: --user root + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: telink + # - name: Update Zephyr to specific revision (for developers purpose) + # shell: bash + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18" + - name: CI Examples Telink + shell: bash + run: | + ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t telink" diff --git a/.github/workflows/cherry-picks.yaml b/.github/workflows/cherry-picks.yaml new file mode 100644 index 0000000000..a062aa5fcf --- /dev/null +++ b/.github/workflows/cherry-picks.yaml @@ -0,0 +1,37 @@ +name: Cherry-Pick Merges + +on: + pull_request_target: + branches: + - master + types: ["closed"] + +jobs: + cherry_pick_release_v1_0: + runs-on: ubuntu-latest + name: Cherry-Pick into SVE + if: | + (github.event.pull_request.merged == true) + && ( + (contains(github.event.pull_request.labels.*.name, 'sve')) + || (contains(github.event.pull_request.labels.*.name, 'request sve')) + || (contains(github.event.pull_request.labels.*.name, 'cert blocker')) + ) + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Cherry-Pick into sve branch + uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 + with: + token: ${{ secrets.MATTER_PAT }} + branch: 1.3-sve + labels: | + sve cherry pick + reviewers: | + woody-apple + andy31415 + raju-apple +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml new file mode 100644 index 0000000000..6fe17c3558 --- /dev/null +++ b/.github/workflows/cirque.yaml @@ -0,0 +1,136 @@ +# Copyright (c) 2020-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. + +name: Cirque + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + cirque: + name: Cirque + + env: + GITHUB_CACHE_PATH: /tmp/cirque-cache + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + # 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: + # volumes: + # - "/tmp:/tmp" + # - "/dev/pts:/dev/pts" + # env: + # LOG_DIR: /tmp/cirque_test_output/ + # CLEANUP_DOCKER_FOR_CI: 1 + # options: "--privileged" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules + uses: ./.github/actions/checkout-submodules + with: + platform: linux + + # TODO: Is what's being cached here actually compatible with a regular bootstrap? + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache + - name: Bootstrap Cirque + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + -- sh -c " \ + git config --global --add safe.directory '*' \ + && bash scripts/bootstrap.sh \ + && chown -R $(id -u):$(id -g) .environment \ + " + + - name: Get Cirque Bootstrap cache key + id: cirque-bootstrap-cache-key + run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT + - uses: Wandalen/wretry.action@v1.4.10 + name: Cirque Bootstrap cache + if: ${{ !env.ACT }} + continue-on-error: true + timeout-minutes: 10 + with: + action: buildjet/cache@v3 + attempt_limit: 3 + attempt_delay: 2000 + with: | + key: ${{ runner.os }}-cirque-${{ steps.cirque-bootstrap-cache-key.outputs.val }} + restore-keys: ${{ runner.os }}-cirque- + path: ${{ env.GITHUB_CACHE_PATH }} + - name: Cirque Bootstrap + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + --env GITHUB_ACTION_RUN=1 \ + --env GITHUB_CACHE_PATH=${{ env.GITHUB_CACHE_PATH }} \ + --volume /tmp:/tmp \ + -- sh -c " \ + git config --global --add safe.directory '*' \ + && scripts/tests/cirque_tests.sh bootstrap \ + " + + - name: Artifact suffix + id: outsuffix + uses: haya14busa/action-cond@v1 + if: ${{ !env.ACT }} + with: + cond: ${{ github.event.pull_request.number == '' }} + if_true: "${{ github.sha }}" + if_false: "pull-${{ github.event.pull_request.number }}" + - name: Build Binaries + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + -- sh -c " \ + git config --global --add safe.directory '*' \ + && scripts/build/gn_gen_cirque.sh \ + " + - name: Run Tests + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + --env LOG_DIR=/tmp/cirque_test_output \ + --env CLEANUP_DOCKER_FOR_CI=1 \ + --env GITHUB_ACTION_RUN=1 \ + --privileged \ + --volume /tmp:/tmp \ + --volume /dev/pts:/dev/pts \ + -- sh -c " \ + git config --global --add safe.directory '*' \ + && scripts/tests/cirque_tests.sh run_all_tests \ + " + + + - name: Uploading Binaries + uses: actions/upload-artifact@v4 + if: ${{ always() && !env.ACT }} + with: + name: cirque_log-${{steps.outsuffix.outputs.value}}-logs + path: /tmp/cirque_test_output/ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..6b15039778 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,29 @@ +# Copyright (c) 2020-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. +name: "CodeQL" + +on: + workflow_dispatch: +# push: +# branches: [ "master", "sve*", "test_event_*", "v1.*" ] +# pull_request: + schedule: + - cron: '0 5 * * *' + +jobs: + analyze: + uses: project-chip/connectedhomeip/.github/workflows/build.yaml@master + with: + run-codeql: true + diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml new file mode 100644 index 0000000000..6178273668 --- /dev/null +++ b/.github/workflows/darwin-tests.yaml @@ -0,0 +1,161 @@ +# Copyright (c) 2022 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. + +name: Darwin Tests + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + test_suites_chip_tool_darwin: + name: Test Suites - Darwin + + strategy: + matrix: + build_variant: [no-ble-no-shell-asan-clang] + env: + BUILD_VARIANT: ${{matrix.build_variant}} + + # We can't use the pigweed clang to build the Darwin framework once we start using + # Swift, because it does not handle CLANG_ENABLE_MODULES correctly. + # + # But the Xcode clang does not handle LSan correctly. Since we can't easily apply + # LSAN_OPTIONS to just everything except darwin-framework-tool, instead disable asan for + # it. + BUILD_VARIANT_FRAMEWORK_TOOL: no-ble + 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 + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Environment + # coreutils for stdbuf + run: brew install coreutils + - name: + Try to ensure the directories for core dumping and diagnostic + log collection exist and we can write them. + run: | + sudo chown ${USER} /cores || true + mkdir -p ~/Library/Logs/DiagnosticReports || true + mkdir objdir-clone || true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }} + + - name: Run macOS Darwin Framework Tool Build Debug + working-directory: src/darwin/Framework + run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug + - name: Delete Defaults + run: defaults delete com.apple.dt.xctest.tool + continue-on-error: true + - name: Clean Build + run: xcodebuild clean + working-directory: src/darwin/Framework + - name: Build Apps + 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-x64-network-manager-${BUILD_VARIANT} \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Run Tests + run: | + ./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 \ + --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 \ + --network-manager-app ./out/darwin-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-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 \ + --ota-data-file /tmp/rawImage \ + --ota-image-file /tmp/otaImage \ + --ota-destination-file /tmp/downloadedImage \ + --ota-candidate-file /tmp/otaCandidateJSON \ + " + - name: Uploading core files + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-core-darwin-${{ matrix.build_variant }} + path: /cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading diagnostic logs + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-log-darwin-${{ matrix.build_variant }} + path: ~/Library/Logs/DiagnosticReports/ + - name: Uploading framework build log + uses: actions/upload-artifact@v4 + 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 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-objdir-darwin-${{ matrix.build_variant }} + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml new file mode 100644 index 0000000000..4c25026840 --- /dev/null +++ b/.github/workflows/darwin.yaml @@ -0,0 +1,133 @@ +# Copyright (c) 2020-2021 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. + +name: Darwin + +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + framework: + name: Build framework + if: github.actor != 'restyled-io[bot]' + runs-on: macos-13 + strategy: + matrix: + options: # We don't need a full matrix + - flavor: macos-release + arguments: -sdk macosx -configuration Release + - flavor: ios-release + arguments: -sdk iphoneos -configuration Release + - flavor: tvos-debug + arguments: -sdk appletvos -configuration Debug + - flavor: watchos-debug + arguments: -sdk watchos -configuration Debug + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: darwin + bootstrap-log-name: + bootstrap-logs-framework-${{ matrix.options.flavor }} + - name: Block zap-cli from being used + env: + PW_ENVSETUP_NO_BANNER: 1 + run: | + # Framework builds are NOT expected to require zap-cli + scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"' + # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli + scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0' + - name: Build + working-directory: src/darwin/Framework + run: xcodebuild -target "Matter" ${{ matrix.options.arguments }} + + tests: + 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 + strategy: + matrix: + options: # We don't need a full matrix + - flavor: asan + arguments: + -enableAddressSanitizer YES + -enableUndefinedBehaviorSanitizer YES + - flavor: tsan + arguments: -enableThreadSanitizer YES + # "leaks" does not seem to be very compatible with asan or tsan + - flavor: leaks + defines: ENABLE_LEAK_DETECTION=1 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: darwin + bootstrap-log-name: + bootstrap-logs-framework-${{ matrix.options.flavor }} + - name: Build example All Clusters Server + run: | + scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/all-clusters-app chip_config_network_layer_ble=false + - name: Build example OTA Provider + run: | + scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug/ota-provider-app chip_config_network_layer_ble=false + - name: Build example OTA Requestor + run: | + scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 + - name: Run Framework Tests + # We want to ensure that our log upload runs on timeout, so use a timeout here shorter + # than the 6-hour overall job timeout. 4.5 hours should be plenty. + timeout-minutes: 270 + working-directory: src/darwin/Framework + run: | + mkdir -p /tmp/darwin/framework-tests + ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & + + export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 + + # Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI. + xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx ${{ matrix.options.arguments }} \ + CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \ + > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2) + - name: Collect crash logs + if: failure() && !env.ACT + run: | + mkdir -p /tmp/darwin/framework-tests + find ~/Library/Developer/Xcode/DerivedData /Library/Logs/DiagnosticReports -name '*.ips' -print0 | xargs -0 -J % cp % /tmp/darwin/framework-tests + - name: Uploading log files + uses: actions/upload-artifact@v4 + if: failure() && !env.ACT + with: + name: darwin-framework-test-logs-${{ matrix.options.flavor }} + path: /tmp/darwin/framework-tests + retention-days: 5 diff --git a/.github/workflows/docbuild.yaml b/.github/workflows/docbuild.yaml new file mode 100644 index 0000000000..2d28a2a537 --- /dev/null +++ b/.github/workflows/docbuild.yaml @@ -0,0 +1,54 @@ +name: Documentation Build + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - master + paths: + - '.github/workflows/docbuild.yaml' + - '**.md' + - 'docs/**' + push: + branches: + - master + +permissions: + contents: write + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout the code + uses: actions/checkout@v4 + with: + path: matter + fetch-depth: 0 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: 3.8 + cache-dependency-path: matter/docs/requirements.txt + cache: pip + - name: Install base dependencies + working-directory: matter + run: | + sudo pip3 install -U pip + pip3 install -r docs/requirements.txt + - name: Build documentation + working-directory: matter/docs + run: | + mkdir -p _build/src + make html + touch _build/html/.nojekyll + - name: Deploy to gh-pages + if: github.repository == 'project-chip/connectedhomeip' && github.event_name == 'push' && github.ref_name == 'master' + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }} + external_repository: project-chip/connectedhomeip-doc + publish_dir: matter/docs/_build/html + # Keep only the latest version of the documentation + force_orphan: true diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml new file mode 100644 index 0000000000..8921a55cb2 --- /dev/null +++ b/.github/workflows/docker_img.yaml @@ -0,0 +1,171 @@ +# Copyright (c) 2020-2021 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. + +name: Docker CHIP images + +on: + workflow_call: + inputs: + push_images: + required: false + type: boolean + default: false + push: + paths: + - "integrations/docker/**" + pull_request: + paths: + - "integrations/docker/**" + workflow_dispatch: + inputs: + push_images: + required: false + type: boolean + default: false + +jobs: + build_images_base: + name: Build Docker CHIP Build images - base + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + strategy: + fail-fast: false + matrix: + img: + - "" + - "-minimal" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/base/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/base/chip-build${{ matrix.img }} + ./build.sh --latest + build_images_stage_1: + needs: [build_images_base] + name: Build Docker CHIP Build images - stage 1 + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + strategy: + fail-fast: false + matrix: + img: + - "-crosscompile" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/stage-1/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/stage-1/chip-build${{ matrix.img }} + ./build.sh --latest + build_images_stage_2: + needs: [build_images_base, build_images_stage_1] + name: Build Docker CHIP Build images - stage 2 + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + strategy: + fail-fast: false + matrix: + img: + - "-ameba" + - "-asr" + - "-bouffalolab" + - "-doxygen" + - "-efr32" + - "-esp32" + - "-infineon" + # NOTE: imx image requires too much space for GitHub-hosted runners. It fails with: + # ApplyLayer exit status 1 stdout: stderr: write /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/opt/ltp/testcases/bin/fanotify15: no space left on device + # - "-imx" + - "-java" + - "-nxp" + - "-nrf-platform" + - "-telink" + - "-ti" + - "-tizen" + - "-openiotsdk" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/stage-2/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/stage-2/chip-build${{ matrix.img }} + ./build.sh --latest + + build_images_stage_3: + needs: [build_images_base, build_images_stage_1, build_images_stage_2] + name: Build Docker CHIP Build images - stage 3 + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + strategy: + fail-fast: false + matrix: + img: + - "-android" + - "-esp32-qemu" + - "-tizen-qemu" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/stage-3/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/stage-3/chip-build${{ matrix.img }} + ./build.sh --latest + build_images_vscode: + needs: [build_images_base, build_images_stage_1, build_images_stage_2, build_images_stage_3] + name: Build Docker CHIP Build images - vscode + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' && false + strategy: + fail-fast: false + matrix: + img: + - "-vscode" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/vscode/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/vscode-3/chip-build${{ matrix.img }} + ./build.sh --latest diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml new file mode 100644 index 0000000000..e255ddce53 --- /dev/null +++ b/.github/workflows/doxygen.yaml @@ -0,0 +1,107 @@ +# Copyright (c) 2020 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. + +name: Doxygen + +on: + push: + paths: + - "**.do[xc]" + - "**.c[cs]?" + - "**.cxx" + - "**.cpp" + - "**.c\\+\\+" + - "**.ii" + - "**.ixx" + - "**.ipp" + - "**.i\\+\\+" + - "**.inl" + - "**.[hH]" + - "**.hh" + - "**.HH" + - "**.hxx" + - "**.hpp" + - "**.h\\+\\+" + - "**.mm" + - "**.txt" + - "**.[ido]dl" + - "**.java" + - "**.d" + - "**.php[45]?" + - "**.inc" + - "**.phtml" + - "**.[mM]" + pull_request: + paths: + - "**.do[xc]" + - "**.c[cs]?" + - "**.cxx" + - "**.cpp" + - "**.c\\+\\+" + - "**.ii" + - "**.ixx" + - "**.ipp" + - "**.i\\+\\+" + - "**.inl" + - "**.[hH]" + - "**.hh" + - "**.HH" + - "**.hxx" + - "**.hpp" + - "**.h\\+\\+" + - "**.mm" + - "**.txt" + - "**.[ido]dl" + - "**.java" + - "**.d" + - "**.php[45]?" + - "**.inc" + - "**.phtml" + - "**.[mM]" + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + doxygen: + name: Build Doxygen + + runs-on: ubuntu-latest + container: + image: ghcr.io/project-chip/chip-build-doxygen:81 + + if: github.actor != 'restyled-io[bot]' + + steps: + - name: "Print Actor" + run: echo ${{github.actor}} + - name: Checkout + uses: actions/checkout@v4 + - name: Generate + run: scripts/helpers/doxygen.sh + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" + id: extract_branch + - name: Deploy if master + if: steps.extract_branch.outputs.branch == 'master' && github.repository == 'project-chip/connectedhomeip' + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }} + external_repository: project-chip/connectedhomeip-doc + publish_dir: ./docs/html + # Keep only the latest version of the documentation + force_orphan: true diff --git a/.github/workflows/example-tv-casting-darwin.yaml b/.github/workflows/example-tv-casting-darwin.yaml new file mode 100644 index 0000000000..d8b7b7895e --- /dev/null +++ b/.github/workflows/example-tv-casting-darwin.yaml @@ -0,0 +1,49 @@ +# Copyright (c) 2020-2021 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. + +name: TV Casting Example - Darwin + +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + tv-casting-bridge: + name: Build TV Casting Bridge example + if: github.actor != 'restyled-io[bot]' + runs-on: macos-14 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: darwin + - name: Build + working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge + run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml new file mode 100644 index 0000000000..c2bb69cd6f --- /dev/null +++ b/.github/workflows/examples-ameba.yaml @@ -0,0 +1,60 @@ +# Copyright (c) 2021 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. + +name: Build example - Ameba + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + ameba: + name: Ameba + env: + BUILD_TYPE: ameba + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-ameba:81 + options: --user root + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: ameba + - name: Build example Ameba All Clusters App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target ameba-amebad-all-clusters \ + --target ameba-amebad-all-clusters-minimal \ + --target ameba-amebad-light \ + --target ameba-amebad-pigweed \ + build \ + " diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml new file mode 100644 index 0000000000..531709a302 --- /dev/null +++ b/.github/workflows/examples-asr.yaml @@ -0,0 +1,65 @@ +# 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. + +name: Build example - ASR + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + asr: + name: ASR + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-asr:81 + options: --user root + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: asr + - name: Build all ASR582X examples + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target asr-asr582x-all-clusters \ + --target asr-asr582x-all-clusters-minimal \ + --target asr-asr582x-lighting-ota \ + --target asr-asr582x-light-switch-shell \ + --target asr-asr582x-lock-no_logging \ + --target asr-asr582x-ota-requestor \ + --target asr-asr582x-bridge-factory \ + --target asr-asr582x-temperature-measurement-rotating_id \ + --target asr-asr582x-thermostat-rio \ + --target asr-asr582x-dishwasher \ + --target asr-asr582x-refrigerator \ + build \ + " diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml new file mode 100644 index 0000000000..3ff00c6c3e --- /dev/null +++ b/.github/workflows/examples-bouffalolab.yaml @@ -0,0 +1,147 @@ +# Copyright (c) 2020 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. + +name: Build example - BouffaloLab + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + bouffalolab: + name: Bouffalo Lab + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-bouffalolab:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: bouffalolab + extra-submodule-parameters: " --recursive" + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + - name: Build example BL602 Lighting App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target bouffalolab-bl602dk-light-easyflash \ + --target bouffalolab-bl602dk-light-mfd-littlefs \ + --target bouffalolab-bl602dk-light-rpc-115200-littlefs \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare some bloat report from the previous builds + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl602 bl602 lighting-app \ + out/artifacts/bouffalolab-bl602dk-light-easyflash/chip-bl602-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl602 bl602+mfd lighting-app \ + out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs/chip-bl602-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl602 bl602+rpc lighting-app \ + out/artifacts/bouffalolab-bl602dk-light-rpc-115200-littlefs/chip-bl602-lighting-example.out \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + + - name: Build example BL702 Lighting App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target bouffalolab-bl706dk-light-easyflash \ + --target bouffalolab-bl706dk-light-mfd-littlefs \ + --target bouffalolab-bl706dk-light-ethernet-littlefs \ + --target bouffalolab-bl706dk-light-wifi-littlefs \ + --target bouffalolab-bl706dk-light-rpc-115200-littlefs \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare some bloat report from the previous builds + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702 bl702 lighting-app \ + out/artifacts/bouffalolab-bl706dk-light-easyflash/chip-bl702-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702 bl702+mfd lighting-app \ + out/artifacts/bouffalolab-bl706dk-light-mfd-littlefs/chip-bl702-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702 bl706-eth lighting-app \ + out/artifacts/bouffalolab-bl706dk-light-ethernet-littlefs/chip-bl702-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702 bl706-wifi lighting-app \ + out/artifacts/bouffalolab-bl706dk-light-wifi-littlefs/chip-bl702-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702 bl702+rpc lighting-app \ + out/artifacts/bouffalolab-bl706dk-light-rpc-115200-littlefs/chip-bl702-lighting-example.out \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + + - name: Build example BL702L Lighting App + timeout-minutes: 30 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target bouffalolab-bl704ldk-light-easyflash \ + --target bouffalolab-bl704ldk-light-mfd-littlefs \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare some bloat report from the previous builds + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702l bl702l lighting-app \ + out/artifacts/bouffalolab-bl704ldk-light-easyflash/chip-bl702l-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702l bl702l+mfd lighting-app \ + out/artifacts/bouffalolab-bl704ldk-light-mfd-littlefs/chip-bl702l-lighting-example.out \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: BouffaloLab diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml new file mode 100644 index 0000000000..80184cb4b4 --- /dev/null +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -0,0 +1,100 @@ +# Copyright (c) 2021 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. + +name: Build example - TI CC13XX_26XX + +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: + merge_group: + +concurrency: + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + cc13xx_26xx: + name: cc13xx_26xx + + env: + BUILD_TYPE: gn_cc13xx_26xx + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-ti:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: cc13xx_26xx + extra-submodule-parameters: " --recursive" + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build examples + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target ti-cc13x4_26x4-lighting-ftd \ + --target ti-cc13x4_26x4-lock-ftd \ + --target ti-cc13x4_26x4-pump-mtd \ + --target ti-cc13x4_26x4-pump-controller-mtd \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get lock FTD size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cc13x4_26x4 LP_EM_CC1354P10_6 lock-ftd \ + out/artifacts/ti-cc13x4_26x4-lock-ftd/chip-LP_EM_CC1354P10_6-lock-example.out \ + /tmp/bloat_reports/ + - name: Get Pump App size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cc13x4_26x4 LP_EM_CC1354P10_6 pump-app \ + out/artifacts/ti-cc13x4_26x4-pump-mtd/chip-LP_EM_CC1354P10_6-pump-example.out \ + /tmp/bloat_reports/ + - name: Get Pump Controller MTD size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cc13x4_26x4 LP_EM_CC1354P10_6 pump-controller-app \ + out/artifacts/ti-cc13x4_26x4-pump-controller-mtd/chip-LP_EM_CC1354P10_6-pump-controller-example.out \ + /tmp/bloat_reports/ + - name: Get Lighting FTD size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \ + out/artifacts/ti-cc13x4_26x4-lighting-ftd/chip-LP_EM_CC1354P10_6-lighting-example.out \ + /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: cc13x4_26x4 diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml new file mode 100644 index 0000000000..537621bcf3 --- /dev/null +++ b/.github/workflows/examples-cc32xx.yaml @@ -0,0 +1,84 @@ +# Copyright (c) 2021 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. + +name: Build example - TI CC32XX + +on: + workflow_dispatch: + push: + branches-ignore: + - "dependabot/**" + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + cc32xx: + name: cc32xx + + env: + BUILD_TYPE: gn_cc32xx + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-ti:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: cc32xx + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build examples + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target cc32xx-lock --target cc32xx-air-purifier build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get lock app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cc32xx CC3235SF_LAUNCHXL lock \ + out/artifacts/cc32xx-lock/chip-CC3235SF_LAUNCHXL-lock-example.out \ + /tmp/bloat_reports/ + + - name: Get air purifier app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cc32xx CC3235SF_LAUNCHXL air-purifier \ + out/artifacts/cc32xx-air-purifier/chip-CC3235SF_LAUNCHXL-air-purifier-example.out \ + /tmp/bloat_reports/ + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: cc32xx diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml new file mode 100644 index 0000000000..498a250dc9 --- /dev/null +++ b/.github/workflows/examples-efr32.yaml @@ -0,0 +1,167 @@ +# Copyright (c) 2020 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. + +name: Build example - EFR32 + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + efr32: + name: EFR32 + + env: + SILABS_BOARD: BRD4187C + BUILD_TYPE: gn_efr32 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-efr32:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: silabs_docker + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Test SLC gen + timeout-minutes: 30 + run: | + scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker + rm -rf ./out/ + - name: Build some BRD4187C variants (1) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd4187c-thermostat-openthread-mtd \ + --target efr32-brd4187c-air-quality-sensor-app-openthread-mtd \ + --target efr32-brd4187c-switch-shell-use-ot-coap-lib \ + --target efr32-brd4187c-unit-test \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Clean out build output + run: rm -rf ./out + - name: Build some BRD4187C variants (2) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd4187c-light-use-ot-lib \ + --target efr32-brd4187c-pump \ + --target efr32-brd4187c-lock-shell-heap-monitoring \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Clean out build output + run: rm -rf ./out + - name: Build BRD4187C variants (3) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd4187c-window-covering-additional-data-advertising \ + --target efr32-brd4187c-light-rpc \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare some bloat report from the previous builds + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + efr32 BRD4187C lighting-app \ + out/efr32-brd4187c-light-rpc/matter-silabs-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + efr32 BRD4187C window-app \ + out/efr32-brd4187c-window-covering-additional-data-advertising/matter-silabs-window-example.out \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build BRD4338A WiFi Soc variants + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd4338a-light-skip-rps-generation \ + --target efr32-brd4338a-lock-skip-rps-generation \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare bloat report for brd4338a lock app + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + efr32 BRD4338a lock-app \ + out/efr32-brd4338a-lock-skip-rps-generation/matter-silabs-lock-example.out \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build BRD2605A WiFi Soc variants + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd2605a-light-skip-rps-generation \ + --target efr32-brd2605a-lock-skip-rps-generation \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare bloat report for brd2605a lock app + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + efr32 BRD2605a lock-app \ + out/efr32-brd2605a-lock-skip-rps-generation/matter-silabs-lock-example.out \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build EFR32 with WiFi NCP + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd4187c-lock-wifi-siwx917 \ + --target efr32-brd4187c-light-wifi-rs9116 \ + --target efr32-brd4187c-lock-wifi-wf200 \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Clean out build output + run: rm -rf ./out + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: EFR32 diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml new file mode 100644 index 0000000000..dc1446a93f --- /dev/null +++ b/.github/workflows/examples-esp32.yaml @@ -0,0 +1,169 @@ +# Copyright (c) 2020 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. + +name: Build example - ESP32 + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + esp32: + name: ESP32 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-esp32:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: esp32 + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build some M5Stack variations + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target esp32-m5stack-all-clusters \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare bloat report + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + esp32 m5stack all-clusters-app \ + out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \ + /tmp/bloat_reports/ + - name: Prepare code pregen and ensure compile time pregen not possible + run: | + ./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated" + mv scripts/codegen.py scripts/codegen.py.renamed + mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed + - name: Clean output + run: rm -rf ./out + - name: Build some M5Stack variations with pregen + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target esp32-m5stack-all-clusters-minimal \ + --target esp32-m5stack-all-clusters-rpc-ipv6only \ + --pregen-dir ./zzz_pregenerated \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Undo code pregeneration changes + run: | + rm -rf ./zzz_pregenerated + mv scripts/codegen.py.renamed scripts/codegen.py + mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py + - name: Build example All Clusters App(Target:ESP32C3) + run: scripts/examples/esp_example.sh all-clusters-app sdkconfig.defaults.esp32c3 esp32c3 + - name: Copy aside build products + run: | + mkdir -p example_binaries/esp32-build + cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \ + example_binaries/esp32-build/chip-all-clusters-app.elf + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + esp32 c3devkit all-clusters-app \ + example_binaries/esp32-build/chip-all-clusters-app.elf \ + /tmp/bloat_reports/ + + - name: Build example Pigweed App + run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults + + - name: Build example Lighting App (Target:ESP32H2) + run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults.esp32h2 esp32h2 + + - name: Build example Lock App (Target:ESP32C6) + run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults.esp32c6 esp32c6 + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: ESP32 + + esp32_1: + name: ESP32_1 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-esp32:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: esp32 + + - name: Build example Bridge App + run: scripts/examples/esp_example.sh bridge-app + + - name: Build example Persistent Storage App + run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults + + - name: Build example Shell App + run: scripts/examples/esp_example.sh shell sdkconfig.defaults + + - name: Build example Temperature Measurement App + run: scripts/examples/esp_example.sh temperature-measurement-app sdkconfig.optimize.defaults + + - name: Build example OTA Requestor App + run: scripts/examples/esp_example.sh ota-requestor-app sdkconfig.defaults + + - name: Build example OTA Provider App + run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults + + - name: Build example Light Switch App (Target:ESP32C3) + run: scripts/examples/esp_example.sh light-switch-app sdkconfig.defaults.esp32c3 esp32c3 + + - name: Build example Lighting App (external platform) + run: scripts/examples/esp_example.sh lighting-app sdkconfig.ext_plat.defaults + + - name: Build example Energy Management App + run: scripts/examples/esp_example.sh energy-management-app sdkconfig.defaults + + - name: Build example LIT ICD App (Target:ESP32H2) + run: scripts/examples/esp_example.sh lit-icd-app sdkconfig.defaults esp32h2 diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml new file mode 100644 index 0000000000..9a3b4191c0 --- /dev/null +++ b/.github/workflows/examples-infineon.yaml @@ -0,0 +1,226 @@ +# Copyright (c) 2021 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. + +name: Build example - Infineon + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + infineon: + name: Infineon examples building + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-infineon:81 + env: + # TODO: this should probably be part of the dockerfile itself + CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: infineon + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build PSoC6 lock-app example + run: | + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py \ + --enable-flashbundle \ + --target infineon-psoc6-lock \ + build \ + --copy-artifacts-to out/artifacts \ + " + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + psoc6 cy8ckit_062s2_43012 lock \ + out/artifacts/infineon-psoc6-lock/chip-psoc6-lock-example.out \ + /tmp/bloat_reports/ + - name: Build PSoC6 all-clusters-app example + run: | + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py \ + --enable-flashbundle \ + --target infineon-psoc6-all-clusters \ + build \ + --copy-artifacts-to out/artifacts \ + " + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + psoc6 cy8ckit_062s2_43012 all-clusters \ + out/artifacts/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.out \ + /tmp/bloat_reports/ + - name: Build PSoC6 all-clusters-minimal-app example + run: | + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py \ + --enable-flashbundle \ + --target infineon-psoc6-all-clusters-minimal \ + build \ + --copy-artifacts-to out/artifacts \ + " + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + psoc6 cy8ckit_062s2_43012 all-clusters-minimal \ + out/artifacts/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.out \ + /tmp/bloat_reports/ + - name: Build PSoC6 lighting-app example + run: | + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py \ + --enable-flashbundle \ + --target infineon-psoc6-light \ + build \ + --copy-artifacts-to out/artifacts \ + " + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + psoc6 cy8ckit_062s2_43012 light \ + out/artifacts/infineon-psoc6-light/chip-psoc6-lighting-example.out \ + /tmp/bloat_reports/ + + - name: Build CYW30739 Lighting App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target cyw30739-cyw30739b2_p5_evk_01-light \ + --target cyw30739-cyw30739b2_p5_evk_02-light \ + --target cyw30739-cyw30739b2_p5_evk_03-light \ + --target cyw30739-cyw930739m2evb_02-light \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get light size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-01 light \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_01-light/lighting_app-CYW30739B2-P5-EVK-01.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-02 light \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_02-light/lighting_app-CYW30739B2-P5-EVK-02.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-03 light \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light/lighting_app-CYW30739B2-P5-EVK-03.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW930739M2EVB-02 light \ + out/artifacts/cyw30739-cyw930739m2evb_02-light/lighting_app-CYW930739M2EVB-02.elf \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build CYW30739 Light Switch App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target cyw30739-cyw30739b2_p5_evk_01-light-switch \ + --target cyw30739-cyw30739b2_p5_evk_02-light-switch \ + --target cyw30739-cyw30739b2_p5_evk_03-light-switch \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get light-switch size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-01 light-switch \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_01-light-switch/light_switch_app-CYW30739B2-P5-EVK-01.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-02 light-switch \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_02-light-switch/light_switch_app-CYW30739B2-P5-EVK-02.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-03 light-switch \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light-switch/light_switch_app-CYW30739B2-P5-EVK-03.elf \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build CYW30739 Lock App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target cyw30739-cyw30739b2_p5_evk_01-lock \ + --target cyw30739-cyw30739b2_p5_evk_02-lock \ + --target cyw30739-cyw30739b2_p5_evk_03-lock \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get lock size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-01 lock \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_01-lock/lock_app-CYW30739B2-P5-EVK-01.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-02 lock \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_02-lock/lock_app-CYW30739B2-P5-EVK-02.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-03 lock \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_03-lock/lock_app-CYW30739B2-P5-EVK-03.elf \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build CYW30739 Thermostat App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target cyw30739-cyw30739b2_p5_evk_01-thermostat \ + --target cyw30739-cyw30739b2_p5_evk_02-thermostat \ + --target cyw30739-cyw30739b2_p5_evk_03-thermostat \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get thermostat size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-01 thermostat \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_01-thermostat/thermostat-CYW30739B2-P5-EVK-01.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-02 thermostat \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_02-thermostat/thermostat-CYW30739B2-P5-EVK-02.elf \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + cyw30739 CYW30739B2-P5-EVK-03 thermostat \ + out/artifacts/cyw30739-cyw30739b2_p5_evk_03-thermostat/thermostat-CYW30739B2-P5-EVK-03.elf \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: Infineon diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml new file mode 100644 index 0000000000..f93e295011 --- /dev/null +++ b/.github/workflows/examples-linux-arm.yaml @@ -0,0 +1,90 @@ +# Copyright (c) 2020 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. + +name: Build example - Linux ARM + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + arm_crosscompile: + name: Linux ARM Cross compile + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-crosscompile:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build Some samples + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-arm64-chip-cert-clang \ + --target linux-arm64-all-clusters-clang \ + --target linux-arm64-chip-tool-ipv6only-clang \ + --target linux-arm64-chip-tool-nodeps-ipv6only \ + --target linux-arm64-lock-clang \ + --target linux-arm64-minmdns-clang \ + --target linux-arm64-light-rpc-ipv6only-clang \ + --target linux-arm64-thermostat-no-ble-clang \ + --target linux-arm64-lit-icd-no-ble-clang \ + --target linux-arm64-fabric-admin-clang-rpc \ + --target linux-arm64-fabric-bridge-no-ble-clang-rpc \ + build \ + " + - name: Bloat report - chip-tool + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux arm64 chip-tool-ipv6only \ + out/linux-arm64-chip-tool-ipv6only-clang/chip-tool \ + /tmp/bloat_reports/ + - name: Bloat report - thermostat + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux arm64 thermostat-no-ble \ + out/linux-arm64-thermostat-no-ble-clang/thermostat-app \ + /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: Linux diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml new file mode 100644 index 0000000000..f964f07f1e --- /dev/null +++ b/.github/workflows/examples-linux-imx.yaml @@ -0,0 +1,96 @@ +# Copyright (c) 2022 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. + +name: Build example - i.MX Linux + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + imx: + name: Linux i.MX Build + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-imx:81 + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Build lighting-app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target imx-lighting-app \ + build" + - name: Clean out build output + run: rm -rf ./out + - name: Build chip-tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target imx-chip-tool \ + build" + - name: Clean out build output + run: rm -rf ./out + - name: Build thermostat + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target imx-thermostat \ + build" + - name: Clean out build output + run: rm -rf ./out + - name: Build all-cluster + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target imx-all-clusters-app \ + build" + - name: Clean out build output + run: rm -rf ./out + - name: Build all-cluster-minimal + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target imx-all-clusters-minimal-app \ + build" + - name: Clean out build output + run: rm -rf ./out + - name: Build ota-provider-app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target imx-ota-provider-app \ + build" + - name: Clean out build output + run: rm -rf ./out diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml new file mode 100644 index 0000000000..ff3762c211 --- /dev/null +++ b/.github/workflows/examples-linux-standalone.yaml @@ -0,0 +1,225 @@ +# Copyright (c) 2020 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. + +name: Build example - Linux Standalone + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + linux_standalone: + name: Linux Standalone + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build Standalone cert tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-chip-cert \ + build" + - name: Build minmdns example with platform dns + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-address-resolve-tool-platform-mdns-ipv6only \ + build" + - name: Build example Standalone chip tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-chip-tool \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug chip-tool \ + out/linux-x64-chip-tool/chip-tool \ + /tmp/bloat_reports/ + - name: Build example Standalone Shell + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-shell \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug shell \ + out/linux-x64-shell/chip-shell \ + /tmp/bloat_reports/ + - name: Build example Standalone All Clusters Server + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-all-clusters \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug all-clusters-app \ + out/linux-x64-all-clusters/chip-all-clusters-app \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build example Standalone All Clusters Minimal Server + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-all-clusters-minimal \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug all-clusters-minimal-app \ + out/linux-x64-all-clusters-minimal/chip-all-clusters-minimal-app \ + /tmp/bloat_reports/ + - name: Build example TV app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-tv-app \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug tv-app \ + out/linux-x64-tv-app/chip-tv-app \ + /tmp/bloat_reports/ + - name: Build example Standalone TV Casting App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-tv-casting-app \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug tv-casting-app \ + out/linux-x64-tv-casting-app/chip-tv-casting-app \ + /tmp/bloat_reports/ + - name: Build example lighting app with RPCs and UI + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-light-rpc-with-ui \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug+rpc+ui lighting-app \ + out/linux-x64-light-rpc-with-ui/chip-lighting-app \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build example Standalone Bridge + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-bridge \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug bridge-app \ + out/linux-x64-bridge/chip-bridge-app \ + /tmp/bloat_reports/ + - name: Build example OTA Provider + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-ota-provider \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug ota-provider-app \ + out/linux-x64-ota-provider/chip-ota-provider-app \ + /tmp/bloat_reports/ + - name: Build example OTA Requestor + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-ota-requestor \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug ota-requestor-app \ + out/linux-x64-ota-requestor/chip-ota-requestor-app \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out + - name: Build example Standalone Lock App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-lock-no-thread \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug lock-app \ + out/linux-x64-lock-no-thread/chip-lock-app \ + /tmp/bloat_reports/ + - name: Build example contact sensor with UI + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-contact-sensor-no-ble-with-ui \ + build" + - name: Build example Air Purifier + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-air-purifier \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug air-purifier-app \ + out/linux-x64-air-purifier/chip-air-purifier-app \ + /tmp/bloat_reports/ + - name: Build example Fabric Admin + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-fabric-admin-rpc \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug fabric-admin \ + out/linux-x64-fabric-admin-rpc/fabric-admin \ + /tmp/bloat_reports/ + - name: Build example Fabric Bridge App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-fabric-bridge-no-ble-rpc \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug fabric-bridge-app \ + out/linux-x64-fabric-bridge-no-ble-rpc/fabric-bridge-app \ + /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: Linux-Standalone diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml new file mode 100644 index 0000000000..64000e45f4 --- /dev/null +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -0,0 +1,89 @@ +# 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. + +name: Test TV Casting Example + +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: + merge_group: + +concurrency: + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + Linux-test: + name: Linux Test + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Set Up Environment for Size Reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build Linux tv-app + run: | + ./scripts/run_in_build_env.sh \ + "scripts/examples/gn_build_example.sh examples/tv-app/linux/ out/tv-app" + + - name: Build Linux tv-casting-app + run: | + ./scripts/run_in_build_env.sh \ + "scripts/examples/gn_build_example.sh examples/tv-casting-app/linux/ out/tv-casting-app chip_casting_simplified=true" + + - name: + Test casting from Linux tv-casting-app to Linux tv-app - + Commissionee Generated Passcode + run: | + ./scripts/run_in_build_env.sh \ + "python3 ./scripts/tests/run_tv_casting_test.py" + timeout-minutes: 2 # Comment this out to debug if GitHub Action times out. + + # TODO: this test is flaky and was disabled + # https://github.com/project-chip/connectedhomeip/issues/34598 + # + # - name: + # Test casting from Linux tv-casting-app to Linux tv-app - + # Commissioner Generated Passcode + # run: | + # ./scripts/run_in_build_env.sh \ + # "python3 ./scripts/tests/run_tv_casting_test.py --commissioner-generated-passcode=True" + # timeout-minutes: 2 # Comment this out to debug if GitHub Action times out. + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: Linux diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml new file mode 100644 index 0000000000..45daa41dce --- /dev/null +++ b/.github/workflows/examples-mw320.yaml @@ -0,0 +1,71 @@ +# Copyright (c) 2020-2021 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. + +name: Build example - MW320 + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + mw320: + name: MW320 + + env: + BUILD_TYPE: gn_mw320 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: mw320 + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build MW320 all clusters example app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target 'mw320-all-clusters-app' \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: MW320 diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml new file mode 100644 index 0000000000..19fdeca62d --- /dev/null +++ b/.github/workflows/examples-nrfconnect.yaml @@ -0,0 +1,211 @@ +# Copyright (c) 2020 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. + +name: Build example - nRF Connect SDK + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + nrfconnect: + name: nRF Connect SDK + + env: + BUILD_TYPE: nrfconnect + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nrf-platform:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nrfconnect + - name: Detect changed paths + uses: dorny/paths-filter@v3 + id: changed_paths + with: + filters: | + nrfconnect: + - '**/nrfconnect/**' + - '**/Zephyr/**' + - '**/zephyr/**' + tests: + - '**/tests/**' + shell: + - 'examples/shell/nrfconnect/**' + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Check nRF Connect SDK revision. + run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --check" + - name: Run unit tests of factory data generation script + run: | + scripts/run_in_build_env.sh 'pip3 install -r scripts/setup/requirements.nrfconnect.txt' + scripts/run_in_build_env.sh "./scripts/tools/nrfconnect/tests/test_generate_factory_data.py" + - name: Build example nRF Connect SDK Lock App on nRF52840 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh lock-app nrf52840dk/nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 lock-app \ + examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle/nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dongle_nrf52840 lighting-app \ + examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk/nrf52840 -DOVERLAY_CONFIG=rpc.overlay + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840+rpc lighting-app \ + examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Light Switch App on nRF52840 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk/nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 light-switch-app \ + examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Shell on nRF52840 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true' + run: | + scripts/examples/nrfconnect_example.sh shell nrf52840dk/nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 shell \ + examples/shell/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Pump App on nRF52840 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh pump-app nrf52840dk/nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 pump-app \ + examples/pump-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Pump Controller App on nRF52840 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk/nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 pump-controller-app \ + examples/pump-controller-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK All Clusters App on nRF52840 DK + run: | + scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk/nrf52840 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 all-clusters-app \ + examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK All Clusters Minimal App on nRF52840 DK + run: | + scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk/nrf52840 -DFILE_SUFFIX=dfu + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf52840dk_nrf52840 all-clusters-minimal-app \ + examples/all-clusters-minimal-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lock App on nRF5340 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh lock-app nrf5340dk/nrf5340/cpuapp + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \ + examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lighting App on nRF5340 DK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk/nrf5340/cpuapp + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \ + examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lock App on nRF7002 PDK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh lock-app nrf7002dk/nrf5340/cpuapp + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf7002dk_nrf5340_cpuapp lock-app \ + examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Light Switch App on nRF7002 PDK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk/nrf5340/cpuapp + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf7002dk_nrf5340_cpuapp light-switch-app \ + examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK Lighting App on nRF7002 PDK + if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk/nrf5340/cpuapp + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf7002dk_nrf5340_cpuapp lighting-app \ + examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK + run: | + scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk/nrf5340/cpuapp -DFILE_SUFFIX=release + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \ + examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Run unit tests for Zephyr native_posix_64 platform + if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true' + run: | + scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build" + - name: Uploading Failed Test Logs + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: test-log + path: | + src/test_driver/nrfconnect/build/Testing/Temporary/LastTest.log + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: nRFConnect diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml new file mode 100644 index 0000000000..6006cea181 --- /dev/null +++ b/.github/workflows/examples-nuttx.yaml @@ -0,0 +1,55 @@ +# 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. + +name: Build example - NuttX + +on: + push: + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + nuttx: + name: NuttX + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nuttx:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nuttx + extra-submodule-parameters: " --recursive" + - name: Build example simulator NuttX Lighting App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target nuttx-x64-light \ + build \ + " diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml new file mode 100644 index 0000000000..c03b9a118c --- /dev/null +++ b/.github/workflows/examples-nxp.yaml @@ -0,0 +1,301 @@ +# Copyright (c) 2021 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. + +name: Build example - NXP + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + k32w0: + name: K32W0 + + env: + BUILD_TYPE: gn_k32w + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nxp:80 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nxp + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build examples + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-k32w0-freertos-lighting \ + --target nxp-k32w0-freertos-lighting-factory \ + --target nxp-k32w0-freertos-lighting-rotating-id \ + --target nxp-k32w0-freertos-contact-sensor \ + --target nxp-k32w0-freertos-contact-sensor-low-power \ + --target nxp-k32w0-freertos-contact-sensor-low-power-factory \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get lighting app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp k32w0+release light \ + out/artifacts/nxp-k32w0-freertos-lighting/chip-k32w0x-light-example.elf \ + /tmp/bloat_reports/ + - name: Get contact sensor size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp k32w0+release contact \ + out/artifacts/nxp-k32w0-freertos-contact-sensor-low-power/chip-k32w0x-contact-example.elf \ + /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: K32W0 + k32w1: + name: K32W1 + + env: + BUILD_TYPE: gn_k32w + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nxp:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nxp + extra-submodule-parameters: --recursive + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build examples + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-k32w1-freertos-lighting \ + --target nxp-k32w1-freertos-contact-sensor-low-power \ + --target nxp-k32w1-freertos-lock-app \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get lighting app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp k32w1+release light \ + out/artifacts/nxp-k32w1-freertos-lighting/chip-k32w1-light-example.elf \ + /tmp/bloat_reports/ + - name: Get contact sensor size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp k32w1+release contact \ + out/artifacts/nxp-k32w1-freertos-contact-sensor-low-power/chip-k32w1-contact-example.elf \ + /tmp/bloat_reports/ + - name: Get lock app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp k32w1+release lock \ + out/artifacts/nxp-k32w1-freertos-lock-app/chip-k32w1-lock-example.elf \ + /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: K32W1 + mcxw71: + name: MCXW71 + + env: + BUILD_TYPE: gn_k32w + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nxp:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nxp + extra-submodule-parameters: --recursive + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build examples + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-mcxw71-freertos-lighting \ + --target nxp-mcxw71-freertos-contact-sensor-low-power \ + --target nxp-mcxw71-freertos-lock-app \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Get lighting app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp mcxw71+release light \ + out/artifacts/nxp-mcxw71-freertos-lighting/chip-mcxw71-light-example.elf \ + /tmp/bloat_reports/ + - name: Get contact sensor size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp mcxw71+release contact \ + out/artifacts/nxp-mcxw71-freertos-contact-sensor-low-power/chip-mcxw71-contact-example.elf \ + /tmp/bloat_reports/ + - name: Get lock app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp mcxw71+release lock \ + out/artifacts/nxp-mcxw71-freertos-lock-app/chip-mcxw71-lock-example.elf \ + /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: MCXW71 + rw61x: + name: RW61X + + env: + BUILD_TYPE: gn_rw61x + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nxp:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nxp + extra-submodule-parameters: --recursive + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build RW61X all clusters example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rw61x-freertos-all-clusters-wifi \ + --target nxp-rw61x-freertos-all-clusters-thread \ + --target nxp-rw61x-freertos-all-clusters-wifi-ota-cmake \ + build \ + --copy-artifacts-to out/artifacts \ + " + + - name: Build RW61X thermostat example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rw61x-freertos-thermostat-wifi \ + --target nxp-rw61x-freertos-thermostat-thread \ + --target nxp-rw61x-freertos-thermostat-thread-wifi \ + build \ + --copy-artifacts-to out/artifacts \ + " + + - name: Build RW61X laundry-washer example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rw61x-freertos-laundry-washer-wifi \ + --target nxp-rw61x-freertos-laundry-washer-thread \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: RW61X + zephyr: + name: ZEPHYR + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-nxp-zephyr:81 + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nxp + + - name: Build NXP Zephyr examples + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rw61x-zephyr-all-clusters \ + --target nxp-rw61x-zephyr-thermostat \ + --target nxp-rw61x-zephyr-laundry-washer-factory \ + --target nxp-rw61x_eth-zephyr-thermostat-ethernet \ + build \ + " diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml new file mode 100644 index 0000000000..95389cb157 --- /dev/null +++ b/.github/workflows/examples-openiotsdk.yaml @@ -0,0 +1,216 @@ +# Copyright (c) 2021 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. + +name: Build example - Open IoT SDK + +on: + # Workflow disabled due to lack of maintainer + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + openiotsdk: + name: Open IoT SDK examples building + + env: + TEST_NETWORK_NAME: OIStest + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-openiotsdk:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + options: --privileged + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: openiotsdk linux + extra-submodule-parameters: " --recursive" + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build and install Python controller + run: | + scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' + scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.openiotsdk.txt' + + - name: Build shell example + id: build_shell + run: | + scripts/examples/openiotsdk_example.sh shell + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + openiotsdk release shell \ + examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \ + /tmp/bloat_reports/ + + - name: "Test: shell example" + if: github.event_name == 'workflow_dispatch' && steps.build_shell.outcome == 'success' + run: | + scripts/run_in_python_env.sh out/venv \ + 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' + + - name: Clean shell output + run: rm -rf examples/shell/openiotsdk/build + + - name: Build lock-app example (mbedtls) + # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 + if: false + id: build_lock_app_mbedtls + run: | + scripts/examples/openiotsdk_example.sh -b mbedtls lock-app + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + openiotsdk release lock-app-mbedtls \ + examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ + /tmp/bloat_reports/ + + - name: Build tv-app example + id: build_tv_app + timeout-minutes: 10 + run: | + scripts/examples/openiotsdk_example.sh tv-app + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + openiotsdk release tv-app \ + examples/tv-app/openiotsdk/build/chip-openiotsdk-tv-app-example.elf \ + /tmp/bloat_reports/ + + - name: "Test: tv-app example" + if: github.event_name == 'workflow_dispatch' && steps.build_tv_app.outcome == 'success' + timeout-minutes: 10 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean tv-app output + run: rm -rf examples/tv-app/openiotsdk/build + + - name: Build all-clusters-app example + id: build_all_clusters_app + timeout-minutes: 10 + run: | + scripts/examples/openiotsdk_example.sh all-clusters-app + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + openiotsdk release all-clusters-app \ + examples/all-clusters-app/openiotsdk/build/chip-openiotsdk-all-clusters-app-example.elf \ + /tmp/bloat_reports/ + + - name: "Test: all-clusters-app example" + if: github.event_name == 'workflow_dispatch' && steps.build_all_clusters_app.outcome == 'success' + timeout-minutes: 5 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean all-clusters-app output + run: rm -rf examples/all-clusters-app/openiotsdk/build + + - name: Build ota-requestor-app example + id: build_ota_requestor_app + timeout-minutes: 10 + run: | + scripts/examples/openiotsdk_example.sh -v 1 -V 0.0.1 ota-requestor-app + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + openiotsdk release ota-requestor-app \ + examples/ota-requestor-app/openiotsdk/build/chip-openiotsdk-ota-requestor-app-example.elf \ + /tmp/bloat_reports/ + + - name: Build unit tests (mbedtls) + # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 + if: false + id: build_unit_tests_mbedtls + run: | + scripts/examples/openiotsdk_example.sh -b mbedtls unit-tests + + - name: Build the OTA provider (Linux) + id: build_ota_provider_app + if: steps.build_ota_requestor_app.outcome == 'success' + timeout-minutes: 10 + run: | + scripts/examples/gn_build_example.sh examples/ota-provider-app/linux/ out/ota-provider chip_config_network_layer_ble=false + + - name: "Test: lock-app example (mbedtls)" + if: github.event_name == 'workflow_dispatch' && steps.build_lock_app_mbedtls.outcome == 'success' + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: "Test: ota-requestor-app example" + if: github.event_name == 'workflow_dispatch' && steps.build_ota_requestor_app.outcome == 'success' && steps.build_ota_provider_app.outcome == 'success' + timeout-minutes: 30 + run: | + mkdir out/binaries + cp examples/ota-requestor-app/openiotsdk/build/chip-openiotsdk-ota-requestor-app-example.elf out/binaries/ + scripts/examples/openiotsdk_example.sh -c -v 2 -V 0.0.2 ota-requestor-app + cp examples/ota-requestor-app/openiotsdk/build/chip-openiotsdk-ota-requestor-app-example.ota out/binaries/ + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -p out/binaries -v 2 -V 0.0.2 -C test -n ${TEST_NETWORK_NAME}tap ota-requestor-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: "Test: unit-tests (mbedtls)" + if: github.event_name == 'workflow_dispatch' && steps.build_unit_tests_mbedtls.outcome == 'success' + run: | + scripts/run_in_python_env.sh out/venv \ + 'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests' + + - name: Build lock-app example (psa) + # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 + if: false + id: build_lock_app_psa + run: | + scripts/examples/openiotsdk_example.sh -c -b psa lock-app + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + openiotsdk release lock-app-psa \ + examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ + /tmp/bloat_reports/ + + - name: "Test: lock-app example (psa)" + if: github.event_name == 'workflow_dispatch' && steps.build_lock_app_psa.outcome == 'success' + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Build unit tests (psa) + id: build_unit_tests_psa + run: | + scripts/examples/openiotsdk_example.sh -b psa unit-tests + + - name: "Test: unit-tests (psa)" + if: github.event_name == 'workflow_dispatch' && steps.build_unit_tests_psa.outcome == 'success' + run: | + scripts/run_in_python_env.sh out/venv \ + 'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests' diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml new file mode 100644 index 0000000000..e0cf4c6ecf --- /dev/null +++ b/.github/workflows/examples-qpg.yaml @@ -0,0 +1,89 @@ +# Copyright (c) 2020-2021 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. + +name: Build example - QPG + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + qpg: + name: QPG + + env: + BUILD_TYPE: gn_qpg + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: qpg + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build QPG6105 example apps + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target qpg-qpg6105-lock \ + --target qpg-qpg6105-light \ + --target qpg-qpg6105-light-switch \ + --target qpg-qpg6105-thermostat \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Build Matter SDK library + run: | + config/qpg/chip-gn/build.sh + + - name: Prepare some bloat report from the previous builds + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + qpg qpg6105+debug lighting-app \ + out/qpg-qpg6105-light/chip-qpg6105-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + qpg qpg6105+debug lock-app \ + out/qpg-qpg6105-lock/chip-qpg6105-lock-example.out \ + /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: QPG diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml new file mode 100644 index 0000000000..c0bc9af19a --- /dev/null +++ b/.github/workflows/examples-stm32.yaml @@ -0,0 +1,79 @@ +# Copyright (c) 2020-2021 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. + +name: Build example - stm32 + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + stm32: + name: stm32 + timeout-minutes: 60 + + env: + BUILD_TYPE: gn_stm32 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: stm32 + extra-submodule-parameters: --recursive + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build stm32 example apps + timeout-minutes: 20 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target stm32-STM32WB5MM-DK-light build \ + " + + - name: Gather size reports + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + stm32 STM32WB5MM-DK light \ + out/stm32-stm32wb5mm-dk-light/chip-stm32-lighting-example.elf \ + /tmp/bloat_reports/ + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: stm32 diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml new file mode 100644 index 0000000000..757f11254b --- /dev/null +++ b/.github/workflows/examples-telink.yaml @@ -0,0 +1,283 @@ +# Copyright (c) 2022-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. + +name: Build example - Telink + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + telink: + name: Telink + env: + BUILD_TYPE: telink + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-telink:81 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: telink + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + # - name: Update Zephyr to specific revision (for developers purpose) + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18" + + - name: Build example Telink (B92 retention) Air Quality Sensor App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-air-quality-sensor' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9528a_retention air-quality-sensor-app \ + out/telink-tlsr9528a_retention-air-quality-sensor/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (W91) All Clusters App + continue-on-error: true + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-all-clusters' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9118bdk40d all-clusters-app \ + out/telink-tlsr9118bdk40d-all-clusters/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B92) All Clusters Minimal App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-all-clusters-minimal' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9528a all-clusters-minimal-app \ + out/telink-tlsr9528a-all-clusters-minimal/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B95) Bridge App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9258a-bridge' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9258a bridge-app \ + out/telink-tlsr9258a-bridge/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B92 retention) Contact Sensor App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-contact-sensor' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9528a_retention contact-sensor-app \ + out/telink-tlsr9528a_retention-contact-sensor/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build tools required for Factory Data + run: | + ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + ./scripts/build/gn_gen.sh + ./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p" + mv ./out/$BUILD_TYPE/chip-cert ./out/$BUILD_TYPE/chip-tool ./out/$BUILD_TYPE/spake2p ./out + + - name: clean out build output (keep tools) + run: rm -rf ./out/telink* + + - name: Build example Telink (W91) Lighting App with OTA, Factory Data + continue-on-error: true + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-light-ota-factory-data' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9118bdk40d lighting-app-ota-factory-data \ + out/telink-tlsr9118bdk40d-light-ota-factory-data/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output (keep tools) + run: rm -rf ./out/telink* + + - name: Build example Telink (B91) Lighting App with OTA, RPC, Factory Data and 4Mb flash + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-ota-rpc-factory-data-4mb' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d lighting-app-ota-rpc-factory-data-4mb \ + out/telink-tlsr9518adk80d-light-ota-rpc-factory-data-4mb/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output (keep tools) + run: rm -rf ./out/telink* + + - name: Build example Telink (B92) Light Switch App with OTA, Shell, Factory Data + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-switch-ota-shell-factory-data' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9528a light-switch-app-ota-shell-factory-data \ + out/telink-tlsr9528a-light-switch-ota-shell-factory-data/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B92) Lock App with DFU + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-lock-dfu' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9528a lock-app-dfu \ + out/telink-tlsr9528a-lock-dfu/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B95) OTA Requestor App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9258a-ota-requestor' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9258a ota-requestor-app \ + out/telink-tlsr9258a-ota-requestor/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B91 USB) Pump App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-usb' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d pump-app-usb \ + out/telink-tlsr9518adk80d-pump-usb/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B91) Pump Controller App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-controller' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d pump-controller-app \ + out/telink-tlsr9518adk80d-pump-controller/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B91) Shell App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-shell' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d shell \ + out/telink-tlsr9518adk80d-shell/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B92 retention) Smoke CO Alarm App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-smoke-co-alarm' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9528a_retention smoke_co_alarm-app \ + out/telink-tlsr9528a_retention-smoke-co-alarm/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B91 Mars) Temperature Measurement App with OTA + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-temperature-measurement-mars-ota' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d temperature-measurement-app-mars-ota \ + out/telink-tlsr9518adk80d-temperature-measurement-mars-ota/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (B91) Thermostat App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-thermostat' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d thermostat \ + out/telink-tlsr9518adk80d-thermostat/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink (W91) Window Covering App + continue-on-error: true + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-window-covering' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9118bdk40d window-covering \ + out/telink-tlsr9118bdk40d-window-covering/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: Telink diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml new file mode 100644 index 0000000000..8c6024ee1f --- /dev/null +++ b/.github/workflows/examples-tizen.yaml @@ -0,0 +1,86 @@ +# Copyright (c) 2021 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. + +name: Build example - Tizen + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + tizen: + name: Tizen + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-tizen:81 + options: --user root + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + - "/tmp/output_binaries:/tmp/output_binaries" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: tizen + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build Tizen examples + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target tizen-arm-all-clusters \ + --target tizen-arm-chip-tool-ubsan \ + --target tizen-arm-light-with-ui \ + build \ + --copy-artifacts-to out/artifacts \ + " + + - name: Bloat report - chip-tool + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + tizen arm chip-tool-ubsan out/tizen-arm-chip-tool-ubsan/chip-tool \ + /tmp/bloat_reports/ + - name: Bloat report - all-clusters-app + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + tizen arm all-clusters-app out/tizen-arm-all-clusters/chip-all-clusters-app \ + /tmp/bloat_reports/ + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: Tizen diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml new file mode 100644 index 0000000000..54561c68e2 --- /dev/null +++ b/.github/workflows/full-android.yaml @@ -0,0 +1,117 @@ +# Copyright (c) 2020 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. + +name: Full builds - Android + +on: + push: + branches-ignore: + - 'dependabot/**' + workflow_dispatch: + +concurrency: + group: full-${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + full_android: + name: Run + + env: + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/ + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-android:81 + volumes: + - "/tmp/log_output:/tmp/test_logs" + + steps: + - uses: actions/checkout@v4 + name: Checkout + with: + token: ${{ github.token }} + # To use act like: + # act -j full_android + # + # Note you likely still need to have non submodules setup for the + # local machine, like: + # git submodule deinit --all + - uses: actions/checkout@v4 + if: ${{ env.ACT }} + name: Checkout (ACT for local build) + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: android + + - name: Cleanup pigweed CIPD packages + # This should not generally be needed, however android CI runs out of space + # We do not need pigweed cross compile here because we use android NDK + # compilers. Removing this package saves a significant amount of space. + continue-on-error: true + run: | + du -sh .environment/cipd/packages/arm + rm -rf .environment/cipd/packages/arm + - name: Build Android arm-chip-tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target android-arm-chip-tool build" + - name: Clean out build output + run: rm -rf ./out examples/android/CHIPTool/app/libs/jniLibs/* examples/android/CHIPTool/app/libs/*.jar + - name: Build Android arm-tv-casting-app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target android-arm-tv-casting-app build" + - name: Clean out build output + run: rm -rf ./out examples/tv-casting-app/android/App/app/libs/jniLibs/* examples/tv-casting-app/android/App/app/libs/*.jar + - name: Build Android arm-tv-server + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target android-arm-tv-server build" + - name: Clean out build output + run: rm -rf ./out examples/tv-app/android/App/app/libs/jniLibs/* examples/tv-app/android/App/app/libs/*.jar + - name: Build Android arm64-tv-casting-app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target android-arm64-tv-casting-app build" + - name: Clean out build output + run: rm -rf ./out examples/tv-casting-app/android/app/libs/jniLibs/* examples/android/CHIPTool/app/libs/*.jar + - name: Build Android arm64-tv-server + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target android-arm64-tv-server build" + - name: Clean out build output + run: rm -rf ./out examples/tv-app/android/App/app/libs/jniLibs/* examples/tv-app/android/App/app/libs/*.jar + - name: Build Android arm64-chip-tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target android-arm64-chip-tool build" + - name: Run Android build rule tests + run: | + ./scripts/run_in_build_env.sh \ + "ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test" + - name: Clean out build output + run: rm -rf ./out examples/android/CHIPTool/app/libs/jniLibs/* examples/android/CHIPTool/app/libs/*.jar + - name: Build Android arm64-chip-test + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target android-arm64-chip-test build" + - name: Clean out build output + run: rm -rf ./out examples/android/CHIPTest/app/libs/jniLibs/* examples/android/CHIPTest/app/libs/*.jar diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml new file mode 100644 index 0000000000..c37ca98e1a --- /dev/null +++ b/.github/workflows/fuzzing-build.yaml @@ -0,0 +1,101 @@ +# Copyright (c) 2021 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. + +name: Fuzzing Builds + +on: + # For now, only manual triggers. + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + build_linux_fuzzing: + name: Build on Linux + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/tmp/log_output:/tmp/test_logs" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - run: apt-get update + - run: apt-get install --fix-missing llvm-10 clang-10 + - name: Try to ensure the objdir-clone dir exists + run: | + mkdir objdir-clone || true + + - name: Bootstrap + uses: ./.github/actions/bootstrap + + - name: Build all-clusters-app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-all-clusters-no-ble-libfuzzer \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Uploading binaries + uses: actions/upload-artifact@v4 + if: ${{ !env.ACT }} + with: + name: objdir-linux + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 + + build_darwin_fuzzing: + name: Build on Darwin + runs-on: macos-13 + if: github.actor != 'restyled-io[bot]' + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Environment + run: brew install llvm + - name: Try to ensure the objdir-clone dir exists + run: | + mkdir objdir-clone || true + + - name: Bootstrap + uses: ./.github/actions/bootstrap + + - name: Build all-clusters-app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target darwin-x64-all-clusters-no-ble-asan-libfuzzer-clang \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Uploading binaries + uses: actions/upload-artifact@v4 + if: ${{ !env.ACT }} + with: + name: crash-darwin + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml new file mode 100644 index 0000000000..ab3f499423 --- /dev/null +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -0,0 +1,20 @@ +name: "Validate Gradle Wrapper" +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + +jobs: + validation: + name: "Validation" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Wandalen/wretry.action@v1.4.5 + name: Gradle Validation + continue-on-error: true + with: + action: gradle/wrapper-validation-action@v1 + attempt_limit: 3 + attempt_delay: 2000 diff --git a/.github/workflows/issue-labeler.yaml b/.github/workflows/issue-labeler.yaml new file mode 100644 index 0000000000..a92a4c212d --- /dev/null +++ b/.github/workflows/issue-labeler.yaml @@ -0,0 +1,20 @@ +name: "Issue Labeler" +on: + issues: + types: [opened, edited] + +permissions: + issues: write + contents: read + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v3.4 #May not be the latest version + with: + configuration-path: .github/issue-labeler.yml + not-before: 2020-01-15T02:54:34Z + enable-versioned-regex: 0 + sync-labels: 1 + repo-token: ${{ github.token }} \ No newline at end of file diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml new file mode 100644 index 0000000000..cc6dbc9060 --- /dev/null +++ b/.github/workflows/java-tests.yaml @@ -0,0 +1,308 @@ +# 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. + +name: Java Tests + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + java_tests_linux: + name: Linux + + env: + TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" + + if: github.actor != 'restyled-io[bot]' + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build-java:81 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true + mkdir objdir-clone || true + - name: Generate unit tests + run: | + scripts/run_in_build_env.sh \ + './scripts/build/build_examples.py \ + --target linux-x64-tests \ + gen \ + ' + - name: Build unit tests + run: scripts/run_in_build_env.sh 'ninja -C out/linux-x64-tests src:java_controller_tests' + + - name: Run unit tests + # TODO: this direct path loading is not maintainable. Our build system should define and + # support test classes. + run: | + $JAVA_PATH/bin/java \ + -cp 'third_party/java_deps/artifacts/*:out/linux-x64-tests/lib/src/controller/java/*' \ + org.junit.runner.JUnitCore \ + matter.tlv.TlvWriterTest \ + matter.tlv.TlvReadWriteTest \ + matter.tlv.TlvReaderTest \ + matter.jsontlv.JsonToTlvToJsonTest \ + matter.onboardingpayload.ManualCodeTest \ + matter.onboardingpayload.QRCodeTest + - name: Build Java Matter Controller and all clusters app + run: | + scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' + scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.build.txt' + scripts/run_in_python_env.sh out/venv 'pip install colorama' + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-java-matter-controller \ + --target linux-x64-lit-icd-ipv6only \ + build \ + " + - name: Build Kotlin Matter Controller + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-kotlin-matter-controller \ + build \ + " + - name: Run Discover Commissionables Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "discover" \ + --tool-args "commissionables" \ + --factoryreset \ + ' + - name: Run Pairing Onnetwork Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "pairing" \ + --tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run IM Invoke Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run IM Extendable Invoke Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-extendable-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run IM Read Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-read --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ + --factoryreset \ + ' + - name: Run IM Write Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-write --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run IM Subscribe Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-subscribe --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ + --factoryreset \ + ' + - name: Run Pairing AlreadyDiscovered Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "pairing" \ + --tool-args "already-discovered --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \ + --factoryreset \ + ' + # Disabled due to failure: https://github.com/project-chip/connectedhomeip/issues/27361 + # - name: Run Pairing Address-PaseOnly Test + # run: | + # scripts/run_in_python_env.sh out/venv \ + # './scripts/tests/run_java_test.py \ + # --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + # --app-args "--discriminator 3840 --interface-id -1" \ + # --tool-path out/linux-x64-java-matter-controller \ + # --tool-cluster "pairing" \ + # --tool-args "address-paseonly --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \ + # --factoryreset \ + # ' + - name: Run Pairing SetupQRCode Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "pairing" \ + --tool-args "code --nodeid 1 --setup-payload MT:-24J0AFN00KA0648G00 --discover-once 1 --use-only-onnetwork-discovery 0 -t 1000" \ + --factoryreset \ + ' + - name: Run Pairing ManualCode Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "pairing" \ + --tool-args "code --nodeid 1 --setup-payload 34970112332 --discover-once 1 --use-only-onnetwork-discovery 0 -t 1000" \ + --factoryreset \ + ' + - name: Run Pairing ICD Onnetwork Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_java_test.py \ + --app out/linux-x64-lit-icd-ipv6only/lit-icd-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-java-matter-controller \ + --tool-cluster "pairing" \ + --tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run Pairing Onnetwork Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_kotlin_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-kotlin-matter-controller \ + --tool-cluster "pairing" \ + --tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run Kotlin IM Invoke Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_kotlin_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-kotlin-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run Kotlin IM Read Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_kotlin_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-kotlin-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-read --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ + --factoryreset \ + ' + - name: Run Kotlin IM Write Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_kotlin_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-kotlin-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-write --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \ + --factoryreset \ + ' + - name: Run Kotlin IM Subscribe Test + run: | + scripts/run_in_python_env.sh out/venv \ + './scripts/tests/run_kotlin_test.py \ + --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \ + --app-args "--discriminator 3840 --interface-id -1" \ + --tool-path out/linux-x64-kotlin-matter-controller \ + --tool-cluster "im" \ + --tool-args "onnetwork-long-im-subscribe --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000" \ + --factoryreset \ + ' + - name: Uploading core files + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-core-linux-java-controller + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-objdir-linux-java-controller + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 diff --git a/.github/workflows/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml new file mode 100644 index 0000000000..a8d3282689 --- /dev/null +++ b/.github/workflows/kotlin-style.yaml @@ -0,0 +1,70 @@ +name: Kotlin + +on: + pull_request: + paths: + - "**/*.kt" + - ".github/workflows/kotlin-style.yaml" + - "kotlin-detect-config.yaml" + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + + +jobs: + detekt: + name: Static code analysis + runs-on: ubuntu-latest + + steps: + - name: "checkout" + uses: actions/checkout@v4 + + - name: "detekt" + uses: natiginfo/action-detekt-all@1.23.6 + # Detekt seems not to like circular symlinks, so we set up + # explicit paths below + # + # In particular, if symlinks exist and recurse, detekt tries to + # follow, so for example `examples/android/CHIPTest` as a path + # will never end (and eventually run out of HEAP) because + # `examples/android/CHIPTest/third_party/connectedhomeip` is + # circular + with: + args: --parallel --build-upon-default-config --config kotlin-detect-config.yaml --input examples/android/CHIPTest/app,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java + + ktlint: + name: "Format check" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: '17' + + - name: Download ktfmt + run: | + cd /tmp + wget "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.44/ktfmt-0.44-jar-with-dependencies.jar" + + - name: Format kotlin files + run: | + find src examples -name '*.kt' \ + | xargs java -jar /tmp/ktfmt-0.44-jar-with-dependencies.jar --google-style + + - name: Ensure git works in current working directory + run: git config --global --add safe.directory `pwd` + + - name: Check for uncommited changes + run: | + git add . + # Show the full diff + git diff-index -p HEAD -- + # Also show just the files that are different, to make it easy + # to tell at a glance what might be going on. And throw in + # --exit-code to make this job fail if there is a difference. + git diff-index --exit-code HEAD -- diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000000..59f56fdb54 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,15 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + triage: + name: Label Triage + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..ddcfed3607 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,347 @@ +# Copyright (c) 2020-2021 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. + +name: Lint Code Base + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + code-lints: + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:81 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + # Bootstrap and checkout for internal scripts (like idl_lint) + # to run + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Check for orphaned gn files + if: always() + # We should enforce that ALL new files are referenced in our build scripts. + # Several things do not have a clear fix path: + # - various platform implementations (including darwin-specific files as they + # are not using GN) + # - app/clusters (they are fetched dynamically - this should probably be fixed) + # + # All the rest of the exceptions should be driven down to 0: chip should fully + # be defined in build rules. + # + # This check enforces that for any newly added file, it must be part of some + # BUILD.gn file + run: | + ./scripts/run_in_build_env.sh "./scripts/tools/not_known_to_gn.py \ + src \ + --skip-dir app/clusters \ + --skip-dir darwin \ + --skip-dir include \ + --skip-dir platform/Ameba \ + --skip-dir platform/android \ + --skip-dir platform/ASR \ + --skip-dir platform/Beken \ + --skip-dir platform/bouffalolab \ + --skip-dir platform/cc13xx_26xx \ + --skip-dir platform/cc32xx \ + --skip-dir platform/Darwin \ + --skip-dir platform/ESP32 \ + --skip-dir platform/fake \ + --skip-dir platform/FreeRTOS \ + --skip-dir platform/Infineon \ + --skip-dir platform/Linux \ + --skip-dir platform/mbed \ + --skip-dir platform/mt793x \ + --skip-dir platform/nxp \ + --skip-dir platform/OpenThread \ + --skip-dir platform/qpg \ + --skip-dir platform/silabs \ + --skip-dir platform/telink \ + --skip-dir platform/webos \ + --skip-dir platform/Zephyr \ + --skip-dir test_driver \ + --skip-dir platform/NuttX \ + --known-failure app/app-platform/ContentApp.cpp \ + --known-failure app/app-platform/ContentApp.h \ + --known-failure app/app-platform/ContentAppPlatform.cpp \ + --known-failure app/app-platform/ContentAppPlatform.h \ + --known-failure controller/ExamplePersistentStorage.cpp \ + --known-failure controller/ExamplePersistentStorage.h \ + --known-failure app/AttributeAccessToken.h \ + --known-failure app/CommandResponseSender.h \ + --known-failure app/CommandSenderLegacyCallback.h \ + --known-failure app/ReadHandler.h \ + --known-failure app/reporting/reporting.cpp \ + --known-failure app/reporting/tests/MockReportScheduler.cpp \ + --known-failure app/reporting/tests/MockReportScheduler.h \ + --known-failure app/util/attribute-storage.cpp \ + --known-failure app/util/attribute-storage-detail.h \ + --known-failure app/util/attribute-storage.h \ + --known-failure app/util/attribute-table.cpp \ + --known-failure app/util/attribute-table-detail.h \ + --known-failure app/util/attribute-table.h \ + --known-failure app/util/binding-table.cpp \ + --known-failure app/util/binding-table.h \ + --known-failure app/util/config.h \ + --known-failure app/util/DataModelHandler.cpp \ + --known-failure app/util/DataModelHandler.h \ + --known-failure app/util/ember-compatibility-functions.cpp \ + --known-failure app/util/ember-compatibility-functions.h \ + --known-failure app/util/ember-global-attribute-access-interface.cpp \ + --known-failure app/util/ember-global-attribute-access-interface.h \ + --known-failure app/util/ember-io-storage.cpp \ + --known-failure app/util/ember-io-storage.h \ + --known-failure app/util/endpoint-config-api.h \ + --known-failure app/util/generic-callbacks.h \ + --known-failure app/util/generic-callback-stubs.cpp \ + --known-failure app/util/im-client-callbacks.h \ + --known-failure app/util/IMClusterCommandHandler.h \ + --known-failure app/util/util.cpp \ + --known-failure app/util/util.h \ + --known-failure app/WriteHandler.h \ + --known-failure platform/DeviceSafeQueue.cpp \ + --known-failure platform/DeviceSafeQueue.h \ + --known-failure platform/GLibTypeDeleter.h \ + --known-failure platform/SingletonConfigurationManager.cpp \ + " + + - name: Check for matter lint errors + if: always() + run: | + for idl_file in $(find . -name '*.matter'); do + # TODO: all these conformance failures should be fixed + # Issues exist for most of them: + # https://github.com/project-chip/connectedhomeip/issues/19176 + # https://github.com/project-chip/connectedhomeip/issues/19175 + # https://github.com/project-chip/connectedhomeip/issues/19173 + if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi + if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi + if [ "$idl_file" = './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi + if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi + # Example is intentionally not spe compliant for use in cert testing + if [ "$idl_file" = './examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter' ]; then continue; fi + + # Test files are intentionally small and not spec-compilant, just parse-compliant + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/cluster_struct_attribute.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/global_struct_attribute.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/optional_argument.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/simple_attribute.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/large_lighting_app.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter" ]; then continue; fi + + ./scripts/run_in_build_env.sh "./scripts/idl_lint.py --log-level warn $idl_file" >/dev/null || exit 1 + done + + - name: Check broken links + # On-push disabled until the job can run fully green + # At that point the step should be enabled. + if: github.event_name == 'workflow_dispatch' + uses: gaurav-nelson/github-action-markdown-link-check@v1 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: Check for incorrect error use in VerifyOrExit + if: always() + run: | + git grep -I -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: + Check for use of PRI*8, which are not supported on some libcs. + if: always() + run: | + git grep -I -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: + Check for use of PRI*16, which are not supported on some + libcs. + if: always() + run: | + git grep -I -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: + Check for use of PRI*64, which are not supported on some + libcs. + if: always() + run: | + # TODO: MessageDefHelper should ideally not be excluded here. + # TODO: chip_im_initiatore should ideally not be excluded here. + # TODO: TLVDebug should ideally not be excluded here. + # TODO: protocol_decoder.cpp should ideally not be excluded here. + # TODO: PersistentStorageMacros.h should ideally not be excluded here. + git grep -I -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/Darwin' ':(exclude)src/darwin' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' ':(exclude)src/platform/NuttX' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: Check for use of %zu, which are not supported on some libcs. + if: always() + run: | + git grep -I -n "%zu" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # Comments like '{{! ... }}' should be used in zap files + - name: Do not allow TODO in generated files + if: always() + run: | + git grep -n 'TODO:' -- ./zzz_generated './*/zap-generated/*' && exit 1 || exit 0 + + - name: Check for disallowed include files + if: always() + run: scripts/tools/check_includes.sh + + - name: Check for zcl.json and extension sync status + if: always() + run: scripts/tools/check_zcl_file_sync.py . + + - name: Ensure all PICS are set for tests (to true or false) + if: always() + run: | + scripts/tools/check_test_pics.py src/app/tests/suites/certification/ci-pics-values src/app/tests/suites/certification/PICS.yaml + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: + Check for use of 0x%u and the like, which lead to misleading + output. + if: always() + run: | + git grep -I -n '0x%[0-9l.*-]*[^xX"0-9l.*-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: + Check for use of '"0x" PRIu*' and the like, which lead to + misleading output. + if: always() + run: | + git grep -I -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. + - name: + Check for use of NSLog instead of Matter logging in Matter + framework + if: always() + run: | + git grep -n 'NSLog(' -- src/darwin/Framework/CHIP && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself, as well as excluding the files + # that implement the type-safe accessors + - name: + Check for use of 'emberAfReadAttribute' instead of the + type-safe getters + if: always() + run: | + git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/attribute-table.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself, as well as excluding the files + # that implement the type-safe accessors, attribute writing from the wire, and some + # Pigweed RPC code that seems hard to update. + - name: + Check for use of 'emberAfWriteAttribute' instead of the + type-safe setters + if: always() + run: | + git grep -I -n 'emberAfWriteAttribute' -- './*' \ + ':(exclude).github/workflows/lint.yml' \ + ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' \ + ':(exclude)src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp' \ + ':(exclude)src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp' \ + ':(exclude)src/app/util/attribute-table.cpp' \ + ':(exclude)src/app/util/attribute-table.h' \ + ':(exclude)src/app/util/ember-compatibility-functions.cpp' \ + ':(exclude)src/app/util/mock/CodegenEmberMocks.cpp' \ + ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' \ + ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' \ + && exit 1 || exit 0 + + # Run ruff python linter + - name: Check for errors using ruff Python linter + if: always() + run: | + ruff check + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: + Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should + probably be "SuccessOrExit(err = CHIP_ERROR_*)" + if: always() + run: | + git grep -I -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: + Check for use of + "SuccessOrExit(something-without-assignment(", which should + probably be "SuccessOrExit(err = something(" + if: always() + run: | + git grep -I -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. + - name: + Check for use of "using namespace" outside of a class/function + in headers. + if: always() + run: | + # Various platforms have `using namespace chip::Ble` in their BLEManager* headers; just exclude those for now. + # + # Exclude platform openiotsdk bits that do this in their persistent storage header. + # + # Also exclude examples (for now) and third_party, which have various instances of this. + # + # Ignore uses of `System::Clock::Literals`, because that's the only way to have things using _ms32 or whatnot + # in a header file. + git grep -I -n -e '^using namespace' --and --not -e 'System::Clock::Literals' -- './**/*.h' ':(exclude)src/platform/*/BLEManager*.h' ':(exclude)src/platform/openiotsdk/KVPsaPsStore.h' ':(exclude)./examples' ':(exclude)./third_party' && exit 1 || exit 0 diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml new file mode 100644 index 0000000000..5e364f32d6 --- /dev/null +++ b/.github/workflows/minimal-build.yaml @@ -0,0 +1,71 @@ +# 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. + +name: Minimal Build (Linux / configure) + +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + minimal-all-clusters: + name: Linux / configure build of all-clusters-app + + if: github.actor != 'restyled-io[bot]' + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build-minimal:81 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Checkout submodules # but don't bootstrap! + uses: ./.github/actions/checkout-submodules + with: + platform: linux + + - name: Configure and build All Clusters App + run: | + CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux --enable-recommended=no && ./ninja-build + + minimal-network-manager: + name: Linux / configure build of network-manager-app + + if: github.actor != 'restyled-io[bot]' + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build-minimal:81 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Checkout submodules # but don't bootstrap! + uses: ./.github/actions/checkout-submodules + with: + platform: linux + + - name: Configure and build Network Manager App + run: | + CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux --enable-recommended=no && ./ninja-build diff --git a/.github/workflows/protocol_compatibility.yaml b/.github/workflows/protocol_compatibility.yaml new file mode 100644 index 0000000000..6c8960072e --- /dev/null +++ b/.github/workflows/protocol_compatibility.yaml @@ -0,0 +1,49 @@ +# Copyright (c) 2020-2021 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. + +name: Backwards compatibility check +on: + pull_request: + paths: + - "src/controller/data_model/controller-clusters.matter" + +jobs: + check_clusters_matter: + name: Check controller-clusters.matter backwards compatibility + runs-on: ubuntu-latest + if: github.event.pull_request && !(contains(github.event.pull_request.labels.*.name, 'skip-protocol-compatibility')) + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install click coloredlogs lark + - name: Create old/new copies + run: | + mkdir -p out + cp src/controller/data_model/controller-clusters.matter out/new_version.matter + wget '${{github.event.pull_request.diff_url}}' --output-document out/patch.diff + patch -p1 --reverse /dev/null || (sudo apt update && sudo apt install curl -y) + curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ + && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ + && sudo apt update \ + && sudo apt install gh -y + + - name: Tag Release & Generate Notes + env: + GH_TOKEN: ${{ github.token }} + run: | + export BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) + echo "Tagging against branch: $BRANCH_NAME" + ./scripts/tagging/tag_new_release.sh --generate-notes --target "$BRANCH_NAME" -d # Note this is a draft for now. + + diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000000..180d374b40 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,624 @@ +# Copyright (c) 2020-2021 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. + +name: Tests + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + test_suites_linux: + name: Test Suites - Linux + + strategy: + matrix: + build_variant: [no-ble-no-shell-tsan-clang] + chip_tool: [""] + env: + BUILD_VARIANT: ${{matrix.build_variant}} + CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} + TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" + LSAN_OPTIONS: detect_leaks=1 + + if: github.actor != 'restyled-io[bot]' + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build:81 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + + steps: + - name: Checkout + uses: actions/checkout@v4 + # To use act like: + # act -j test_suites_linux + # + # Note you likely still need to have non submodules setup for the + # local machine, like: + # git submodule deinit --all + - uses: actions/checkout@v4 + if: ${{ env.ACT }} + name: Checkout (ACT for local build) + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true + mkdir objdir-clone || true + + - name: Validate that xml are parsable + # The sub-items being run here are the same as the input XMLs listed + # at src/app/zap-templates/zcl/zcl.json + # + # This ensures that the syntax of the XML can always be parsed/validated, however it + # does not enforce that the content is understood (that part is covered by parser + # unit tests) + # + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/py_matter_idl/matter_idl/zapxml_parser.py \ + --no-print \ + --log-level info \ + src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \ + src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \ + src/app/zap-templates/zcl/data-model/chip/global-enums.xml \ + src/app/zap-templates/zcl/data-model/chip/global-structs.xml \ + src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \ + src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \ + src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml \ + src/app/zap-templates/zcl/data-model/chip/chip-ota.xml \ + src/app/zap-templates/zcl/data-model/chip/chip-types.xml \ + src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml \ + src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml \ + src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/fault-injection-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \ + src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/proxy-configuration-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/proxy-discovery-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/proxy-valid-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml \ + src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/scene.xml \ + src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/test-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/window-covering.xml \ + src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \ + src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \ + " + - 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${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ + --target linux-x64-all-clusters-${BUILD_VARIANT} \ + --target linux-x64-lock-${BUILD_VARIANT} \ + --target linux-x64-ota-provider-${BUILD_VARIANT} \ + --target linux-x64-ota-requestor-${BUILD_VARIANT} \ + --target linux-x64-tv-app-${BUILD_VARIANT} \ + --target linux-x64-bridge-${BUILD_VARIANT} \ + --target linux-x64-lit-icd-${BUILD_VARIANT} \ + --target linux-x64-microwave-oven-${BUILD_VARIANT} \ + --target linux-x64-rvc-${BUILD_VARIANT} \ + --target linux-x64-network-manager-${BUILD_VARIANT} \ + build \ + --copy-artifacts-to objdir-clone \ + " + + - name: Run Tests using the python parser sending commands to chip-tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/tests/run_test_suite.py \ + --runner chip_tool_python \ + --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ + run \ + --iterations 1 \ + --test-timeout-seconds 120 \ + --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ + --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ + --rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ + --network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ + " + + - name: Run purposeful failure tests using the python parser sending commands to chip-tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/tests/run_test_suite.py \ + --runner chip_tool_python \ + --include-tags PURPOSEFUL_FAILURE \ + --chip-tool ./out/linux-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/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + " + + - name: Run Tests using chip-repl (skip slow) + if: github.event_name == 'pull_request' + run: | + ./scripts/run_in_python_env.sh out/venv \ + "./scripts/tests/run_test_suite.py \ + --runner chip_repl_python \ + --exclude-tags MANUAL \ + --exclude-tags FLAKY \ + --exclude-tags IN_DEVELOPMENT \ + --exclude-tags EXTRA_SLOW \ + --exclude-tags SLOW \ + --exclude-tags PURPOSEFUL_FAILURE \ + run \ + --iterations 1 \ + --test-timeout-seconds 120 \ + --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ + --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ + --rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ + --network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ + " + - name: Run Tests using chip-repl (including slow) + if: github.event_name == 'push' + run: | + ./scripts/run_in_python_env.sh out/venv \ + "./scripts/tests/run_test_suite.py \ + --runner chip_repl_python \ + run \ + --iterations 1 \ + --test-timeout-seconds 120 \ + --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ + --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ + --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ + --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ + --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ + --microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \ + --rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \ + --network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ + " + - name: Uploading core files + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-core-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-objdir-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 + + test_suites_darwin: + name: Test Suites - Darwin + + strategy: + matrix: + build_variant: [no-ble-no-shell-asan-clang, no-ble-no-shell-tsan-clang] + chip_tool: [""] + env: + BUILD_VARIANT: ${{matrix.build_variant}} + CHIP_TOOL_VARIANT: ${{matrix.chip_tool}} + TSAN_OPTIONS: "halt_on_error=1" + LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt + + if: github.actor != 'restyled-io[bot]' + runs-on: macos-13 + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Environment + # coreutils for stdbuf + run: brew install coreutils + - name: + Try to ensure the directories for core dumping and diagnostic + log collection exist and we can write them. + run: | + sudo chown ${USER} /cores || true + mkdir -p ~/Library/Logs/DiagnosticReports || true + mkdir objdir-clone || true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + 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-x64-network-manager-${BUILD_VARIANT} \ + build \ + --copy-artifacts-to objdir-clone \ + " + + - name: Run Tests using the python parser sending commands to chip-tool + run: | + ./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 \ + --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 \ + --network-manager-app ./out/darwin-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \ + " + + - name: Run purposeful failure tests using the python parser sending commands to chip-tool + run: | + ./scripts/run_in_build_env.sh \ + "./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 \ + 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 \ + " + + - name: Uploading core files + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: /cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading diagnostic logs + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: ~/Library/Logs/DiagnosticReports/ + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 + + repl_tests_linux: + name: REPL Tests - Linux + + env: + TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" + + if: github.actor != 'restyled-io[bot]' + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build:81 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + - name: Try to ensure the directories for core dumping exist and we + can write them. + run: | + mkdir /tmp/cores || true + sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true + mkdir objdir-clone || true + + - name: Build Python REPL and example apps + # NOTE: the data-mode-check + check-failure-die is not 100% perfect as different + # encoding sizes for data that keeps changing may alter over time (e.g. anything relating to time + # or resources such as packet counts or other similar counters) + # + # This may result in invalid errors, however for most purposes of our testing, we are unlikely to + # hit such cases so we remain very strict on testing here. + 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-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die \ + --target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-fabric-admin-rpc-ipv6only-clang \ + --target linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang \ + --target linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang \ + --target linux-x64-python-bindings \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Generate an argument environment file + run: | + echo -n "" >/tmp/test_env.yaml + echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app" >> /tmp/test_env.yaml + echo "CHIP_LOCK_APP: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app" >> /tmp/test_env.yaml + echo "ENERGY_MANAGEMENT_APP: out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app" >> /tmp/test_env.yaml + echo "LIT_ICD_APP: out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app" >> /tmp/test_env.yaml + echo "CHIP_MICROWAVE_OVEN_APP: out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app" >> /tmp/test_env.yaml + echo "CHIP_RVC_APP: out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app" >> /tmp/test_env.yaml + echo "NETWORK_MANAGEMENT_APP: out/linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test/matter-network-manager-app" >> /tmp/test_env.yaml + echo "FABRIC_ADMIN_APP: out/linux-x64-fabric-admin-rpc-ipv6only-clang/fabric-admin" >> /tmp/test_env.yaml + echo "FABRIC_BRIDGE_APP: out/linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang/fabric-bridge-app" >> /tmp/test_env.yaml + echo "LIGHTING_APP_NO_UNIQUE_ID: out/linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang/chip-lighting-app" >> /tmp/test_env.yaml + echo "TRACE_APP: out/trace_data/app-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml + echo "TRACE_TEST_JSON: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml + echo "TRACE_TEST_PERFETTO: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml + + - name: Run Tests + run: | + mkdir -p out/trace_data + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing' + scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_ICDM_2_1.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py' + + + - name: Uploading core files + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-core-linux-python-repl + path: /tmp/cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-objdir-linux-python-repl + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 + + repl_tests_darwin: + name: REPL Tests - Darwin + + strategy: + matrix: + build_variant: [no-ble-no-wifi-tsan-clang] + env: + BUILD_VARIANT: ${{matrix.build_variant}} + TSAN_OPTIONS: "halt_on_error=1" + + if: github.actor != 'restyled-io[bot]' && false + runs-on: macos-13 + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Environment + # coreutils for stdbuf + run: brew install coreutils + - name: + Try to ensure the directories for core dumping and diagnostic + log collection exist and we can write them. + run: | + sudo chown ${USER} /cores || true + mkdir -p ~/Library/Logs/DiagnosticReports || true + mkdir objdir-clone || true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + + - name: Build Python REPL and example 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 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-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 }} + with: + name: crash-core-darwin-python-repl + path: /cores/ + # Cores are big; don't hold on to them too long. + retention-days: 5 + - name: Uploading traces on failure + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: trace-data-python-repl + path: out/trace_data/ + retention-days: 5 + - name: Uploading diagnostic logs + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-log-darwin-python-repl + path: ~/Library/Logs/DiagnosticReports/ + - name: Uploading objdir for debugging + uses: actions/upload-artifact@v4 + if: ${{ failure() && !env.ACT }} + with: + name: crash-objdir-darwin-python-repl + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 diff --git a/.github/workflows/third-party-check.yaml b/.github/workflows/third-party-check.yaml new file mode 100644 index 0000000000..beda0af41b --- /dev/null +++ b/.github/workflows/third-party-check.yaml @@ -0,0 +1,39 @@ +# 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. + +name: Check for Unintentional Submodule Updates + +on: + pull_request: + branches-ignore: + - "dependabot/**" + paths: + - "third_party/**" + - ".gitmodules" + +jobs: + check-submodule-update-label: + name: Check For Submodule Update Label + runs-on: ubuntu-latest + steps: + - if: ${{ !contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }} + name: Fail + run: | + echo This pull request attempts to update submodules without the changing-submodules-on-purpose label. Please apply that label if the changes are intentional, or remove those changes. + exit 1 + - if: ${{ contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }} + name: Success + run: | + echo PR looks good. + exit 0 diff --git a/.github/workflows/todos.yaml b/.github/workflows/todos.yaml new file mode 100644 index 0000000000..cc2148da4e --- /dev/null +++ b/.github/workflows/todos.yaml @@ -0,0 +1,38 @@ +name: Create issues from To-Dos + +on: + workflow_dispatch: + inputs: + importAll: + default: "false" + required: false + type: boolean + description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing. +# push: Will move this to a cadence +# branches: +# - master + +permissions: + issues: write + repository-projects: read + contents: read + +jobs: + todos: + name: Scan for To-Dos + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Run Issue Bot + uses: derjuulsn/todo-issue@main + with: + # autoAssign: false + reopenClosed: false + # label: "todo" + # disabled until this works: https://github.com/DerJuulsn/todo-issue/issues/9 + keywords: "todo,fixme,bug,TODO,FIXME,BUG" + excludePattern: "^(node_modules/|third_party/|zzz_generated/|docs/|.vscode/)" + env: + GITHUB_TOKEN: ${{ secrets.MATTER_PAT }} diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml new file mode 100644 index 0000000000..e593630fa5 --- /dev/null +++ b/.github/workflows/unit_integration_test.yaml @@ -0,0 +1,88 @@ +# Copyright (c) 2020 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. + +name: Unit / Integration Tests + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + unit_tests: + name: Unit / Integration Tests + if: github.actor != 'restyled-io[bot]' + + strategy: + matrix: + type: [main, clang, mbedtls, rotating_device_id, icd] + env: + BUILD_TYPE: ${{ matrix.type }} + + runs-on: ubuntu-latest + + container: + image: ghcr.io/project-chip/chip-build:81 + volumes: + - "/:/runner-root-volume" + - "/tmp/log_output:/tmp/test_logs" + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-unittest-${{ matrix.type }} + - name: Artifact suffix + id: outsuffix + uses: haya14busa/action-cond@v1 + if: ${{ !env.ACT }} + with: + cond: ${{ github.event.pull_request.number == '' }} + if_true: "${{ github.sha }}" + if_false: "pull-${{ github.event.pull_request.number }}" + - name: Setup Build + # TODO: If rotating_device_id is ever removed/combined, we have to cover boringssl otherwise + run: | + case $BUILD_TYPE in + "main") GN_ARGS='';; + "clang") GN_ARGS='is_clang=true';; + "mbedtls") GN_ARGS='chip_crypto="mbedtls"';; + "rotating_device_id") GN_ARGS='chip_crypto="boringssl" chip_enable_rotating_device_id=true';; + "icd") GN_ARGS='chip_enable_icd_server=true chip_enable_icd_lit=true';; + *) ;; + esac + + scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" + - name: Run Build + run: scripts/run_in_build_env.sh "ninja -C out/$BUILD_TYPE" + - name: Run Tests + run: scripts/tests/gn_tests.sh + # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 + # TODO https://github.com/project-chip/connectedhomeip/issues/1512 + # - name: Run Code Coverage + # if: ${{ contains('main', env.BUILD_TYPE) }} + # run: scripts/tools/codecoverage.sh + # - name: Upload Code Coverage + # if: ${{ contains('main', env.BUILD_TYPE) }} + # run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml new file mode 100644 index 0000000000..483b9486d1 --- /dev/null +++ b/.github/workflows/zap_regeneration.yaml @@ -0,0 +1,54 @@ +# Copyright (c) 2020 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. + +name: ZAP - Regenerate + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + zap_regeneration: + name: ZAP Regeneration + + runs-on: ubuntu-20.04 + container: + image: ghcr.io/project-chip/chip-build:81 + defaults: + run: + shell: sh + if: github.actor != 'restyled-io[bot]' + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + + - name: Generate all + run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py + - uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: Regenerating ZAP diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml new file mode 100644 index 0000000000..45a3611691 --- /dev/null +++ b/.github/workflows/zap_templates.yaml @@ -0,0 +1,75 @@ +# Copyright (c) 2020 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. + +name: ZAP + +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + zap_templates: + name: ZAP templates generation + + runs-on: ubuntu-20.04 + container: + image: ghcr.io/project-chip/chip-build:81 + defaults: + run: + shell: sh + if: github.actor != 'restyled-io[bot]' + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + # Java formatting requires a newer java to run ktfmt + # TODO: this should be eventually inside Docker files + - name: Update java + run: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -fy --fix-missing openjdk-17-jre + # Clean out java generated files: since java codegen will generate one file per + # structure/cluster, if clusters and structures are ever changed (for in progress work) + # this may leave obsolete files. Ensure we always check for clean regen. + - name: Ensure clean java + run: rm -rf src/controller/java/generated/ + - name: Generate all + run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py + - name: Generate script-maintained items (ERROR_CODES.md) + run: ./scripts/run_in_build_env.sh "scripts/error_table.py > docs/ERROR_CODES.md" + - name: Ensure git works in current working directory + run: git config --global --add safe.directory `pwd` + - name: Check for uncommited changes + run: | + git add . + # Show the full diff + git diff-index -p HEAD -- + # Also show just the files that are different, to make it easy + # to tell at a glance what might be going on. And throw in + # --exit-code to make this job fail if there is a difference. + git diff-index --exit-code HEAD -- From 5335054bb013d2cd2e72aa41a3abfc72caddec48 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Tue, 15 Oct 2024 06:28:56 -0700 Subject: [PATCH 15/15] [ICD] Improve ICDClientStorage (#36036) (#36055) * Improve ICDClientStorage -- when DeleteAllEntries is triggered, and all fabric are removed, we need remove ICDFabricList from persistent storage, if there is at least 1 fabric in table, we would update fabricList vector and persistent storage. -- when fabric does not exist, storeEntry needs to return invalid fabric error, and deleteEntry or deleteAllEntries needs to return no error. -- Add multiple unit tests to cover DeleteAllEntries/StoreEntry/CheckInHandling for multiple fabrics * Update DefaultICDClientStorage.cpp * Update DefaultICDClientStorage.cpp * Update DefaultICDClientStorage.cpp * Update DefaultICDClientStorage.cpp * Update DefaultICDClientStorage.cpp * address comments * Restyled by whitespace * Restyled by clang-format * address comments * address comments and add more tests * Restyled by whitespace * Restyled by clang-format --------- Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Co-authored-by: Restyled.io --- src/app/icd/client/CheckInHandler.cpp | 5 + .../icd/client/DefaultICDClientStorage.cpp | 51 ++- src/app/icd/client/DefaultICDClientStorage.h | 9 + src/app/tests/BUILD.gn | 2 + src/app/tests/TestCheckInHandler.cpp | 300 ++++++++++++++++++ src/app/tests/TestDefaultICDClientStorage.cpp | 172 +++++++++- 6 files changed, 531 insertions(+), 8 deletions(-) create mode 100644 src/app/tests/TestCheckInHandler.cpp diff --git a/src/app/icd/client/CheckInHandler.cpp b/src/app/icd/client/CheckInHandler.cpp index e0edc649cc..f4eaa48b11 100644 --- a/src/app/icd/client/CheckInHandler.cpp +++ b/src/app/icd/client/CheckInHandler.cpp @@ -52,8 +52,12 @@ CHIP_ERROR CheckInHandler::Init(Messaging::ExchangeManager * exchangeManager, IC { VerifyOrReturnError(exchangeManager != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(clientStorage != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(engine != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(mpExchangeManager == nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mpICDClientStorage == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mpCheckInDelegate == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mpImEngine == nullptr, CHIP_ERROR_INCORRECT_STATE); mpExchangeManager = exchangeManager; mpICDClientStorage = clientStorage; @@ -113,6 +117,7 @@ CHIP_ERROR CheckInHandler::OnMessageReceived(Messaging::ExchangeContext * ec, co if (refreshKey) { + ChipLogProgress(ICD, "Key Refresh is required"); RefreshKeySender * refreshKeySender = mpCheckInDelegate->OnKeyRefreshNeeded(clientInfo, mpICDClientStorage); if (refreshKeySender == nullptr) { diff --git a/src/app/icd/client/DefaultICDClientStorage.cpp b/src/app/icd/client/DefaultICDClientStorage.cpp index 2b6b3a1aff..0c6a0f7e13 100644 --- a/src/app/icd/client/DefaultICDClientStorage.cpp +++ b/src/app/icd/client/DefaultICDClientStorage.cpp @@ -51,6 +51,11 @@ CHIP_ERROR DefaultICDClientStorage::UpdateFabricList(FabricIndex fabricIndex) mFabricList.push_back(fabricIndex); + return StoreFabricList(); +} + +CHIP_ERROR DefaultICDClientStorage::StoreFabricList() +{ Platform::ScopedMemoryBuffer backingBuffer; size_t counter = mFabricList.size(); size_t total = kFabricIndexTlvSize * counter + kArrayOverHead; @@ -68,7 +73,7 @@ CHIP_ERROR DefaultICDClientStorage::UpdateFabricList(FabricIndex fabricIndex) const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); return mpClientInfoStore->SyncSetKeyValue(DefaultStorageKeyAllocator::ICDFabricList().KeyName(), backingBuffer.Get(), static_cast(len)); } @@ -211,6 +216,7 @@ CHIP_ERROR DefaultICDClientStorage::Load(FabricIndex fabricIndex, std::vector 0, CHIP_NO_ERROR); size_t len = clientInfoSize * count + kArrayOverHead; Platform::ScopedMemoryBuffer backingBuffer; VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); @@ -344,8 +350,21 @@ CHIP_ERROR DefaultICDClientStorage::SerializeToTlv(TLV::TLVWriter & writer, cons return writer.EndContainer(arrayType); } +bool DefaultICDClientStorage::FabricExists(FabricIndex fabricIndex) +{ + for (auto & fabric_idx : mFabricList) + { + if (fabric_idx == fabricIndex) + { + return true; + } + } + return false; +} + CHIP_ERROR DefaultICDClientStorage::StoreEntry(const ICDClientInfo & clientInfo) { + VerifyOrReturnError(FabricExists(clientInfo.peer_node.GetFabricIndex()), CHIP_ERROR_INVALID_FABRIC_INDEX); std::vector clientInfoVector; size_t clientInfoSize = MaxICDClientInfoSize(); ReturnErrorOnFailure(Load(clientInfo.peer_node.GetFabricIndex(), clientInfoVector, clientInfoSize)); @@ -359,7 +378,6 @@ CHIP_ERROR DefaultICDClientStorage::StoreEntry(const ICDClientInfo & clientInfo) break; } } - clientInfoVector.push_back(clientInfo); size_t total = clientInfoSize * clientInfoVector.size() + kArrayOverHead; Platform::ScopedMemoryBuffer backingBuffer; @@ -371,7 +389,7 @@ CHIP_ERROR DefaultICDClientStorage::StoreEntry(const ICDClientInfo & clientInfo) const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); ReturnErrorOnFailure(mpClientInfoStore->SyncSetKeyValue( DefaultStorageKeyAllocator::ICDClientInfoKey(clientInfo.peer_node.GetFabricIndex()).KeyName(), backingBuffer.Get(), static_cast(len))); @@ -416,7 +434,7 @@ CHIP_ERROR DefaultICDClientStorage::UpdateEntryCountForFabric(FabricIndex fabric const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); return mpClientInfoStore->SyncSetKeyValue(DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricIndex).KeyName(), backingBuffer.Get(), static_cast(len)); @@ -424,9 +442,11 @@ CHIP_ERROR DefaultICDClientStorage::UpdateEntryCountForFabric(FabricIndex fabric CHIP_ERROR DefaultICDClientStorage::DeleteEntry(const ScopedNodeId & peerNode) { + VerifyOrReturnError(FabricExists(peerNode.GetFabricIndex()), CHIP_NO_ERROR); size_t clientInfoSize = 0; std::vector clientInfoVector; ReturnErrorOnFailure(Load(peerNode.GetFabricIndex(), clientInfoVector, clientInfoSize)); + VerifyOrReturnError(clientInfoVector.size() > 0, CHIP_NO_ERROR); for (auto it = clientInfoVector.begin(); it != clientInfoVector.end(); it++) { @@ -440,7 +460,6 @@ CHIP_ERROR DefaultICDClientStorage::DeleteEntry(const ScopedNodeId & peerNode) ReturnErrorOnFailure( mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::ICDClientInfoKey(peerNode.GetFabricIndex()).KeyName())); - size_t total = clientInfoSize * clientInfoVector.size() + kArrayOverHead; Platform::ScopedMemoryBuffer backingBuffer; ReturnErrorCodeIf(!backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); @@ -451,7 +470,7 @@ CHIP_ERROR DefaultICDClientStorage::DeleteEntry(const ScopedNodeId & peerNode) const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); ReturnErrorOnFailure( mpClientInfoStore->SyncSetKeyValue(DefaultStorageKeyAllocator::ICDClientInfoKey(peerNode.GetFabricIndex()).KeyName(), backingBuffer.Get(), static_cast(len))); @@ -461,6 +480,8 @@ CHIP_ERROR DefaultICDClientStorage::DeleteEntry(const ScopedNodeId & peerNode) CHIP_ERROR DefaultICDClientStorage::DeleteAllEntries(FabricIndex fabricIndex) { + VerifyOrReturnError(FabricExists(fabricIndex), CHIP_NO_ERROR); + size_t clientInfoSize = 0; std::vector clientInfoVector; ReturnErrorOnFailure(Load(fabricIndex, clientInfoVector, clientInfoSize)); @@ -471,7 +492,23 @@ CHIP_ERROR DefaultICDClientStorage::DeleteAllEntries(FabricIndex fabricIndex) } ReturnErrorOnFailure( mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricIndex).KeyName())); - return mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricIndex).KeyName()); + ReturnErrorOnFailure( + mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricIndex).KeyName())); + + for (auto fabric = mFabricList.begin(); fabric != mFabricList.end(); fabric++) + { + if (*fabric == fabricIndex) + { + mFabricList.erase(fabric); + break; + } + } + + if (mFabricList.size() == 0) + { + return mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::ICDFabricList().KeyName()); + } + return StoreFabricList(); } CHIP_ERROR DefaultICDClientStorage::ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo, diff --git a/src/app/icd/client/DefaultICDClientStorage.h b/src/app/icd/client/DefaultICDClientStorage.h index 76faeb9afc..13064fe649 100644 --- a/src/app/icd/client/DefaultICDClientStorage.h +++ b/src/app/icd/client/DefaultICDClientStorage.h @@ -120,6 +120,12 @@ class DefaultICDClientStorage : public ICDClientStorage CHIP_ERROR ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo, Protocols::SecureChannel::CounterType & counter) override; +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST + size_t GetFabricListSize() { return mFabricList.size(); } + + PersistentStorageDelegate * GetClientInfoStore() { return mpClientInfoStore; } +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST + protected: enum class ClientInfoTag : uint8_t { @@ -173,9 +179,12 @@ class DefaultICDClientStorage : public ICDClientStorage private: friend class ICDClientInfoIteratorImpl; + CHIP_ERROR StoreFabricList(); CHIP_ERROR LoadFabricList(); CHIP_ERROR LoadCounter(FabricIndex fabricIndex, size_t & count, size_t & clientInfoSize); + bool FabricExists(FabricIndex fabricIndex); + CHIP_ERROR IncreaseEntryCountForFabric(FabricIndex fabricIndex); CHIP_ERROR DecreaseEntryCountForFabric(FabricIndex fabricIndex); CHIP_ERROR UpdateEntryCountForFabric(FabricIndex fabricIndex, bool increase); diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 104a57a2fc..09dcb304ea 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -194,6 +194,7 @@ chip_test_suite("tests") { "TestBasicCommandPathRegistry.cpp", "TestBindingTable.cpp", "TestBuilderParser.cpp", + "TestCheckInHandler.cpp", "TestCommandHandlerInterfaceRegistry.cpp", "TestCommandInteraction.cpp", "TestCommandPathParams.cpp", @@ -236,6 +237,7 @@ chip_test_suite("tests") { "${chip_root}/src/app", "${chip_root}/src/app/codegen-data-model-provider:instance-header", "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/icd/client:handler", "${chip_root}/src/app/icd/client:manager", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_codegen_data_model", diff --git a/src/app/tests/TestCheckInHandler.cpp b/src/app/tests/TestCheckInHandler.cpp new file mode 100644 index 0000000000..0d57eb6b42 --- /dev/null +++ b/src/app/tests/TestCheckInHandler.cpp @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace app; +using namespace System; +using TestSessionKeystoreImpl = Crypto::DefaultSessionKeystore; + +constexpr uint8_t kKeyBuffer1[] = { + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f +}; + +constexpr uint8_t kKeyBuffer2[] = { + 0xf1, 0xe1, 0xd1, 0xc1, 0xb1, 0xa1, 0x91, 0x81, 0x71, 0x61, 0x51, 0x14, 0x31, 0x21, 0x11, 0x01 +}; + +class TestCheckInHandler : public chip::Test::AppContext +{ +}; + +class CheckInHandlerWrapper : public chip::app::CheckInHandler +{ +public: + CHIP_ERROR ValidateOnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && payload) + { + return OnMessageReceived(ec, payloadHeader, std::move(payload)); + } +}; + +TEST_F(TestCheckInHandler, TestOnMessageReceived) +{ + InteractionModelEngine * engine = InteractionModelEngine::GetInstance(); + EXPECT_EQ(engine->Init(&GetExchangeManager(), &GetFabricTable(), app::reporting::GetDefaultReportScheduler()), CHIP_NO_ERROR); + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + + DefaultICDClientStorage manager; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + + DefaultCheckInDelegate checkInDelegate; + EXPECT_EQ(checkInDelegate.Init(&manager, engine), CHIP_NO_ERROR); + + CheckInHandlerWrapper checkInHandler; + EXPECT_EQ(checkInHandler.Init(&GetExchangeManager(), &manager, &checkInDelegate, engine), CHIP_NO_ERROR); + + FabricIndex fabricIdA = 1; + NodeId nodeIdA = 6666; + + ICDClientInfo clientInfoA; + clientInfoA.peer_node = ScopedNodeId(nodeIdA, fabricIdA); + clientInfoA.start_icd_counter = 0; + clientInfoA.offset = 0; + EXPECT_EQ(manager.UpdateFabricList(fabricIdA), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoA, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoA), CHIP_NO_ERROR); + + FabricIndex fabricIdB = 2; + NodeId nodeIdB = 6667; + + ICDClientInfo clientInfoB; + clientInfoB.peer_node = ScopedNodeId(nodeIdB, fabricIdB); + clientInfoB.offset = 0; + EXPECT_EQ(manager.UpdateFabricList(fabricIdB), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoB, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoB), CHIP_NO_ERROR); + + PayloadHeader payloadHeader; + payloadHeader.SetExchangeID(0); + payloadHeader.SetMessageType(chip::Protocols::SecureChannel::MsgType::ICD_CheckIn); + + uint32_t counter = 1; + System::PacketBufferHandle buffer1 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output1{ buffer1->Start(), buffer1->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output1), + CHIP_NO_ERROR); + + buffer1->SetDataLength(static_cast(output1.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer1)), CHIP_NO_ERROR); + + ICDClientInfo clientInfo1; + auto * iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo1)) + { + if (clientInfo1.peer_node.GetNodeId() == nodeIdA && clientInfo1.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + + EXPECT_EQ(clientInfo1.offset, counter - clientInfoA.start_icd_counter); + + // Validate duplicate check-in message handling + chip::System::PacketBufferHandle buffer2 = + MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output2{ buffer2->Start(), buffer2->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output2), + CHIP_NO_ERROR); + + buffer2->SetDataLength(static_cast(output2.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer2)), CHIP_NO_ERROR); + + ICDClientInfo clientInfo2; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo2)) + { + if (clientInfo2.peer_node.GetNodeId() == nodeIdA && clientInfo2.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo2.offset, counter - clientInfoA.start_icd_counter); + + // Validate second check-in message with increased counter + counter++; + System::PacketBufferHandle buffer3 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output3{ buffer3->Start(), buffer3->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output3), + CHIP_NO_ERROR); + buffer3->SetDataLength(static_cast(output3.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer3)), CHIP_NO_ERROR); + ICDClientInfo clientInfo3; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo3)) + { + if (clientInfo3.peer_node.GetNodeId() == nodeIdA && clientInfo3.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo3.offset, counter - clientInfoA.start_icd_counter); + + // Validate check-in message from fabricB + counter++; + System::PacketBufferHandle buffer4 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output4{ buffer4->Start(), buffer4->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoB.aes_key_handle, clientInfoB.hmac_key_handle, counter, ByteSpan(), output4), + CHIP_NO_ERROR); + buffer4->SetDataLength(static_cast(output4.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer4)), CHIP_NO_ERROR); + ICDClientInfo clientInfo4; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo4)) + { + if (clientInfo4.peer_node.GetNodeId() == nodeIdB && clientInfo4.peer_node.GetFabricIndex() == fabricIdB) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo4.offset, counter - clientInfoB.start_icd_counter); + + // Validate check-in message from removed fabricB + counter++; + System::PacketBufferHandle buffer5 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output5{ buffer5->Start(), buffer5->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoB.aes_key_handle, clientInfoB.hmac_key_handle, counter, ByteSpan(), output5), + CHIP_NO_ERROR); + + EXPECT_EQ(manager.DeleteAllEntries(fabricIdB), CHIP_NO_ERROR); + buffer5->SetDataLength(static_cast(output5.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer5)), CHIP_NO_ERROR); + ICDClientInfo clientInfo5; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + bool located = false; + while (iterator->Next(clientInfo5)) + { + if (clientInfo5.peer_node.GetFabricIndex() == fabricIdB) + { + located = true; + break; + } + } + iterator->Release(); + EXPECT_FALSE(located); + + // Add back fabricB and validate check-in message again + EXPECT_EQ(manager.UpdateFabricList(fabricIdB), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoB, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoB), CHIP_NO_ERROR); + counter++; + System::PacketBufferHandle buffer6 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output6{ buffer6->Start(), buffer6->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoB.aes_key_handle, clientInfoB.hmac_key_handle, counter, ByteSpan(), output6), + CHIP_NO_ERROR); + buffer6->SetDataLength(static_cast(output4.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer6)), CHIP_NO_ERROR); + ICDClientInfo clientInfo6; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo6)) + { + if (clientInfo6.peer_node.GetNodeId() == nodeIdB && clientInfo6.peer_node.GetFabricIndex() == fabricIdB) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo6.offset, counter - clientInfoB.start_icd_counter); + + // Clear fabric table + EXPECT_EQ(manager.DeleteAllEntries(fabricIdA), CHIP_NO_ERROR); + EXPECT_EQ(manager.DeleteAllEntries(fabricIdB), CHIP_NO_ERROR); + // Add back fabricA and validate check-in message again + EXPECT_EQ(manager.UpdateFabricList(fabricIdA), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoA, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoA), CHIP_NO_ERROR); + counter++; + System::PacketBufferHandle buffer7 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output7{ buffer7->Start(), buffer7->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output7), + CHIP_NO_ERROR); + buffer7->SetDataLength(static_cast(output7.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer7)), CHIP_NO_ERROR); + ICDClientInfo clientInfo7; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo7)) + { + if (clientInfo7.peer_node.GetNodeId() == nodeIdA && clientInfo7.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo7.offset, counter - clientInfoA.start_icd_counter); + + // Validate IcdclientInfo is not updated when handling overlimited counter and fail to create case session + uint32_t old_start_icd_counter = clientInfo7.start_icd_counter; + uint32_t old_counter = counter; + counter = (1U << 31) + 100U + clientInfo7.start_icd_counter; + System::PacketBufferHandle buffer8 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output8{ buffer8->Start(), buffer8->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output8), + CHIP_NO_ERROR); + + buffer8->SetDataLength(static_cast(output8.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer8)), CHIP_NO_ERROR); + ICDClientInfo clientInfo8; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo8)) + { + if (clientInfo8.peer_node.GetNodeId() == nodeIdA && clientInfo8.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo8.offset, old_counter - clientInfoA.start_icd_counter); + EXPECT_EQ(clientInfo8.start_icd_counter, old_start_icd_counter); + + checkInHandler.Shutdown(); +} diff --git a/src/app/tests/TestDefaultICDClientStorage.cpp b/src/app/tests/TestDefaultICDClientStorage.cpp index ac950fdbc7..0ea48d3326 100644 --- a/src/app/tests/TestDefaultICDClientStorage.cpp +++ b/src/app/tests/TestDefaultICDClientStorage.cpp @@ -103,6 +103,12 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCount) iterator->Release(); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDFabricList().KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId).KeyName())); + EXPECT_TRUE( + manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId).KeyName())); + // Delete all and verify iterator counts 0 EXPECT_EQ(manager.DeleteAllEntries(fabricId), CHIP_NO_ERROR); iterator = manager.IterateICDClientInfo(); @@ -116,6 +122,14 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCount) } iterator->Release(); EXPECT_EQ(count, 0u); + EXPECT_EQ(manager.GetFabricListSize(), 0u); + EXPECT_FALSE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDFabricList().KeyName())); + EXPECT_FALSE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId).KeyName())); + EXPECT_FALSE( + manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId).KeyName())); + + EXPECT_EQ(manager.DeleteAllEntries(fabricId), CHIP_NO_ERROR); } { @@ -174,6 +188,15 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCountMultipleFabric) EXPECT_EQ(manager.DeleteEntry(ScopedNodeId(nodeId3, fabricId2)), CHIP_NO_ERROR); EXPECT_EQ(iterator->Count(), 0u); + EXPECT_EQ(manager.GetFabricListSize(), 2u); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDFabricList().KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId1).KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId1).KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId2).KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId2).KeyName())); + // Verify ClientInfos manually count correctly size_t count = 0; ICDClientInfo clientInfo; @@ -183,6 +206,59 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCountMultipleFabric) } EXPECT_FALSE(count); + + EXPECT_EQ(manager.DeleteEntry(ScopedNodeId(nodeId3, fabricId2)), CHIP_NO_ERROR); +} + +TEST_F(TestDefaultICDClientStorage, TestClientInfoCountMultipleFabricWithRemovingFabric) +{ + + FabricIndex fabricId1 = 1; + FabricIndex fabricId2 = 2; + NodeId nodeId1 = 6666; + NodeId nodeId2 = 6667; + NodeId nodeId3 = 6668; + DefaultICDClientStorage manager; + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId1), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId2), CHIP_NO_ERROR); + + // Write some ClientInfos and see the counts are correct + ICDClientInfo clientInfo1; + clientInfo1.peer_node = ScopedNodeId(nodeId1, fabricId1); + ICDClientInfo clientInfo2; + clientInfo2.peer_node = ScopedNodeId(nodeId2, fabricId1); + ICDClientInfo clientInfo3; + clientInfo3.peer_node = ScopedNodeId(nodeId3, fabricId2); + + EXPECT_EQ(manager.SetKey(clientInfo1, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo1), CHIP_NO_ERROR); + + EXPECT_EQ(manager.SetKey(clientInfo2, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo2), CHIP_NO_ERROR); + + EXPECT_EQ(manager.SetKey(clientInfo3, ByteSpan(kKeyBuffer3)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo3), CHIP_NO_ERROR); + // Make sure iterator counts correctly + auto * iterator = manager.IterateICDClientInfo(); + EXPECT_EQ(iterator->Count(), 3u); + iterator->Release(); + + EXPECT_EQ(manager.DeleteAllEntries(fabricId1), CHIP_NO_ERROR); + + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + DefaultICDClientStorage::ICDClientInfoIteratorWrapper clientInfoIteratorWrapper(iterator); + EXPECT_EQ(iterator->Count(), 1u); + + EXPECT_EQ(manager.DeleteAllEntries(fabricId2), CHIP_NO_ERROR); + EXPECT_EQ(iterator->Count(), 0u); + + EXPECT_EQ(manager.StoreEntry(clientInfo1), CHIP_ERROR_INVALID_FABRIC_INDEX); + EXPECT_EQ(manager.StoreEntry(clientInfo2), CHIP_ERROR_INVALID_FABRIC_INDEX); + EXPECT_EQ(manager.StoreEntry(clientInfo3), CHIP_ERROR_INVALID_FABRIC_INDEX); } TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayload) @@ -214,9 +290,103 @@ TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayload) uint32_t checkInCounter = 0; ByteSpan payload{ buffer->Start(), buffer->DataLength() }; EXPECT_EQ(manager.ProcessCheckInPayload(payload, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); + + // Validate second check-in message with increased counter + counter++; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + buffer->SetDataLength(static_cast(output.size())); + ByteSpan payload1{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload1, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); - // 2. Use a key not available in the storage for encoding + // Use a key not available in the storage for encoding EXPECT_EQ(manager.SetKey(clientInfo, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ByteSpan payload2{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload2, decodeClientInfo, checkInCounter), CHIP_ERROR_NOT_FOUND); +} + +TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayloadWithRemovedKey) +{ + FabricIndex fabricId = 1; + NodeId nodeId = 6666; + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + + DefaultICDClientStorage manager; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId), CHIP_NO_ERROR); + // Populate clientInfo + ICDClientInfo clientInfo; + clientInfo.peer_node = ScopedNodeId(nodeId, fabricId); + + EXPECT_EQ(manager.SetKey(clientInfo, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo), CHIP_NO_ERROR); + + uint32_t counter = 1; + System::PacketBufferHandle buffer = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output{ buffer->Start(), buffer->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ICDClientInfo decodeClientInfo; + uint32_t checkInCounter = 0; + ByteSpan payload{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); + + // Use a removed key in the storage for encoding + manager.RemoveKey(clientInfo), CHIP_NO_ERROR; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ByteSpan payload1{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload1, decodeClientInfo, checkInCounter), CHIP_ERROR_NOT_FOUND); +} + +TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayloadWithEmptyIcdStorage) +{ + FabricIndex fabricId = 1; + NodeId nodeId = 6666; + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + + DefaultICDClientStorage manager; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId), CHIP_NO_ERROR); + // Populate clientInfo + ICDClientInfo clientInfo; + clientInfo.peer_node = ScopedNodeId(nodeId, fabricId); + + EXPECT_EQ(manager.SetKey(clientInfo, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo), CHIP_NO_ERROR); + + uint32_t counter = 1; + System::PacketBufferHandle buffer = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output{ buffer->Start(), buffer->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ICDClientInfo decodeClientInfo; + uint32_t checkInCounter = 0; + ByteSpan payload{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); + manager.DeleteAllEntries(fabricId); + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), CHIP_NO_ERROR);