Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into buildjet-timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple committed Jun 21, 2023
2 parents 0f2ead5 + 3706e06 commit 0ca423f
Show file tree
Hide file tree
Showing 85 changed files with 12,668 additions and 3,992 deletions.
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ integrations:
- integrations/*
- integrations/**/*

docker:
- integrations/docker/*
- integrations/docker/**/*

vscode:
- .vscode/*
- .vscode/**/*
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ jobs:
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_TSAN=YES
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
working-directory: src/darwin/Framework
- name: Build Matter TV Casting Bridge
timeout-minutes: 20
run: |
xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
- name: Uploading log files
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- 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
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker
rm -rf ./out/
# - 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
# scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker
# rm -rf ./out/
- name: Build some BRD4187C variants
timeout-minutes: 90
run: |
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/fixit_rotation.yaml

This file was deleted.

81 changes: 0 additions & 81 deletions .github/workflows/smoketest-darwin.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ pull_request_rules:
- "#approved-reviews-by>=1"
- "#review-threads-unresolved=0"
- "-draft"
- "label!=docker" # Don't auto merge docker images
- "#check-failure=0" # Don't auto merge with a failure
- "#check-pending=0" # Don't auto merge with anything pending
- "check-success~=Build" # Don't auto merge unless a build has succeeded, needed because above is true on a fresh PR before builds
- or:
- "check-success=pullapprove"
- "check-skipped=pullapprove"
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

[![Builds](https://github.com/project-chip/connectedhomeip/workflows/Builds/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/build.yaml)

**Examples:**
**Builds**

[![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/android.yaml)
[![Ameba](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20Ameba/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-ameba.yaml)
[![ASR](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20ASR/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-asr.yaml)
[![BouffaloLab](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20BouffaloLab/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-bouffalolab.yaml)
[![Darwin](https://github.com/project-chip/connectedhomeip/workflows/Darwin/badge.svg)](https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/darwin.yaml)
[![TI CC26X2X7](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20TI%20CC26X2X7/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-cc13x2x7_26x2x7.yaml)
[![TI CC32XX](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20TI%20CC32XX/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-cc32xx.yaml)
[![EFR32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20EFR32/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-efr32.yaml)
Expand All @@ -24,19 +27,19 @@
[![Telink](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20Telink/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-telink.yaml)
[![Tizen](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20Tizen/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-tizen.yaml)

**Platforms:**
[![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/android.yaml)
[![Darwin](https://github.com/project-chip/connectedhomeip/workflows/Darwin/badge.svg)](https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/darwin.yaml)
**Tests**


**Tests:**
[![Unit / Integration Tests](https://github.com/project-chip/connectedhomeip/workflows/Unit%20/%20Integration%20Tests/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/unit_integration_test.yaml)
[![Cirque](https://github.com/project-chip/connectedhomeip/workflows/Cirque/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/cirque.yaml)
[![QEMU](https://github.com/project-chip/connectedhomeip/workflows/QEMU/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/qemu.yaml)

**Tools:**
**Tools**

[![ZAP Templates](https://github.com/project-chip/connectedhomeip/workflows/ZAP/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/zap_templates.yaml)

**Documentation:**
**Documentation**

[![Documentation Build](https://github.com/project-chip/connectedhomeip/actions/workflows/docbuild.yaml/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/docbuild.yaml)

- [Matter SDK documentation page](https://project-chip.github.io/connectedhomeip-doc/index.html)
Expand Down
50 changes: 40 additions & 10 deletions examples/darwin-framework-tool/commands/tests/TestCommandBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,25 +396,37 @@ class TestCommandBridge : public CHIPCommandBridge,

using ConstraintsChecker::CheckConstraintMinLength;

bool CheckConstraintMinLength(const char * _Nonnull itemName, NSString * _Nonnull current, uint64_t expected)
bool CheckConstraintMinLength(const char * _Nonnull itemName, NSString * _Nullable current, uint64_t expected)
{
if (current == nil) {
return true;
}
return CheckConstraintMinLength(itemName, [current length], expected);
}

bool CheckConstraintMinLength(const char * _Nonnull itemName, NSArray * _Nonnull current, uint64_t expected)
bool CheckConstraintMinLength(const char * _Nonnull itemName, NSArray * _Nullable current, uint64_t expected)
{
if (current == nil) {
return true;
}
return CheckConstraintMinLength(itemName, [current count], expected);
}

using ConstraintsChecker::CheckConstraintMaxLength;

bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSString * _Nonnull current, uint64_t expected)
bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSString * _Nullable current, uint64_t expected)
{
if (current == nil) {
return true;
}
return CheckConstraintMaxLength(itemName, [current length], expected);
}

bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSArray * _Nonnull current, uint64_t expected)
bool CheckConstraintMaxLength(const char * _Nonnull itemName, NSArray * _Nullable current, uint64_t expected)
{
if (current == nil) {
return true;
}
return CheckConstraintMaxLength(itemName, [current count], expected);
}

Expand All @@ -423,20 +435,29 @@ class TestCommandBridge : public CHIPCommandBridge,
// Used when the minValue is a saved variable, since ConstraintsChecker does
// not expect Core Foundation types.
template <typename T, std::enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value, int> = 0>
bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
{
if (expected == nil) {
return true;
}
return ConstraintsChecker::CheckConstraintMinValue(itemName, current, [expected longLongValue]);
}

template <typename T, std::enable_if_t<std::is_integral<T>::value && !std::is_signed<T>::value, int> = 0>
bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
{
if (expected == nil) {
return true;
}
return ConstraintsChecker::CheckConstraintMinValue(itemName, current, [expected unsignedLongLongValue]);
}

template <typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0>
bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
bool CheckConstraintMinValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
{
if (expected == nil) {
return true;
}
return ConstraintsChecker::CheckConstraintMinValue(itemName, current, [expected doubleValue]);
}

Expand All @@ -445,20 +466,29 @@ class TestCommandBridge : public CHIPCommandBridge,
// Used when the maxValue is a saved variable, since ConstraintsChecker does
// not expect Core Foundation types.
template <typename T, std::enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value, int> = 0>
bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
{
if (expected == nil) {
return true;
}
return ConstraintsChecker::CheckConstraintMaxValue(itemName, current, [expected longLongValue]);
}

template <typename T, std::enable_if_t<std::is_integral<T>::value && !std::is_signed<T>::value, int> = 0>
bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
{
if (expected == nil) {
return true;
}
return ConstraintsChecker::CheckConstraintMaxValue(itemName, current, [expected unsignedLongLongValue]);
}

template <typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0>
bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nonnull expected)
bool CheckConstraintMaxValue(const char * _Nonnull itemName, T current, const NSNumber * _Nullable expected)
{
if (expected == nil) {
return true;
}
return ConstraintsChecker::CheckConstraintMaxValue(itemName, current, [expected doubleValue]);
}

Expand Down
Loading

0 comments on commit 0ca423f

Please sign in to comment.