Skip to content

Commit 6597aba

Browse files
Merge branch 'master' into YAML-Updates-2-23-2024
2 parents bd60354 + fb786aa commit 6597aba

File tree

228 files changed

+4919
-2740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+4919
-2740
lines changed

.github/actions/checkout-submodules-and-bootstrap/action.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ inputs:
1515
runs:
1616
using: "composite"
1717
steps:
18+
- name: Maximize runner disk
19+
uses: ./.github/actions/maximize-runner-disk
1820
- name: Dump disk info
1921
uses: ./.github/actions/dump-disk-info
2022
- name: Set git safe directory for local act runs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Maximize runner disk
2+
description: Free up disk space on the github runner
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Free up disk space on the github runner
7+
if: ${{ !env.ACT }}
8+
shell: bash
9+
run: |
10+
# maximize-runner-disk
11+
if [[ "$RUNNER_OS" == Linux ]]; then
12+
# Directories to prune to free up space. Candidates:
13+
# 1.6G /usr/share/dotnet
14+
# 1.1G /usr/local/lib/android/sdk/platforms
15+
# 1000M /usr/local/lib/android/sdk/build-tools
16+
# 8.9G /usr/local/lib/android/sdk
17+
# This list can be amended later to change the trade-off between the amount of
18+
# disk space freed up, and how long it takes to do so (deleting many files is slow).
19+
prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools)
20+
21+
if [[ "$UID" -eq 0 && -d /__w ]]; then
22+
root=/runner-root-volume
23+
if [[ ! -d "$root" ]]; then
24+
echo "Unable to maximize disk space, job is running inside a container and $root is not mounted"
25+
exit 0
26+
fi
27+
function sudo() { "$@"; } # we're already root (and sudo is probably unavailable)
28+
elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then
29+
root=
30+
else
31+
echo "Unable to maximize disk space, unknown runner environment"
32+
exit 0
33+
fi
34+
35+
echo "Freeing up runner disk space on ${root:-/}"
36+
function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; }
37+
function now() { date '+%s'; }
38+
before="$(avail)" start="$(now)"
39+
for dir in "${prune[@]}"; do
40+
if [[ -d "${root}${dir}" ]]; then
41+
echo "- $dir"
42+
# du -sh -- "${root}${dir}"
43+
sudo rm -rf -- "${root}${dir}"
44+
else
45+
echo "- $dir (not found)"
46+
fi
47+
done
48+
after="$(avail)" end="$(now)"
49+
echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds."
50+
fi

.github/workflows/build.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
container:
4343
image: ghcr.io/project-chip/chip-build:35
4444
volumes:
45+
- "/:/runner-root-volume"
4546
- "/tmp/log_output:/tmp/test_logs"
4647
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
4748
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -137,6 +138,7 @@ jobs:
137138
container:
138139
image: ghcr.io/project-chip/chip-build:35
139140
volumes:
141+
- "/:/runner-root-volume"
140142
- "/tmp/log_output:/tmp/test_logs"
141143
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
142144
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -285,6 +287,7 @@ jobs:
285287
container:
286288
image: ghcr.io/project-chip/chip-build:35
287289
volumes:
290+
- "/:/runner-root-volume"
288291
- "/tmp/log_output:/tmp/test_logs"
289292
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
290293
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -345,6 +348,7 @@ jobs:
345348
container:
346349
image: ghcr.io/project-chip/chip-build:35
347350
volumes:
351+
- "/:/runner-root-volume"
348352
- "/tmp/log_output:/tmp/test_logs"
349353
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
350354
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -453,6 +457,7 @@ jobs:
453457
container:
454458
image: ghcr.io/project-chip/chip-build:35
455459
volumes:
460+
- "/:/runner-root-volume"
456461
- "/tmp/log_output:/tmp/test_logs"
457462
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
458463
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"

.github/workflows/darwin.yaml

+10-9
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ jobs:
4949
- name: Validate zap-cli is NOT available
5050
# run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
5151
run: scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
52+
- name: Run watchOS Build Debug
53+
working-directory: src/darwin/Framework
54+
# Disable availability annotations, since we are not building a system
55+
# Matter.framework.
56+
run: xcodebuild -target "Matter" -sdk watchos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
5257
- name: Run iOS Build Debug
5358
working-directory: src/darwin/Framework
5459
# Disable availability annotations, since we are not building a system
@@ -103,8 +108,7 @@ jobs:
103108
# target versions instead?
104109
run: |
105110
mkdir -p /tmp/darwin/framework-tests
106-
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
107-
../../../out/debug/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) &
111+
../../../out/debug/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) &
108112
../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
109113
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
110114
@@ -120,13 +124,10 @@ jobs:
120124
run: |
121125
xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
122126
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
123-
- name: Uploading .ips files in Xcode derived data to debug the failure
124-
uses: actions/upload-artifact@v4
125-
if: ${{ failure() && !env.ACT }}
126-
with:
127-
name: darwin-framework-derived-data
128-
path: ~/Library/Developer/Xcode/DerivedData/**/*.ips
129-
retention-days: 5
127+
- name: Collect crash logs
128+
run: |
129+
mkdir -p /tmp/darwin/framework-tests
130+
find ~/Library/Developer/Xcode/DerivedData /Library/Logs/DiagnosticReports -name '*.ips' -print0 | xargs -0 -J % cp % /tmp/darwin/framework-tests
130131
- name: Uploading log files
131132
uses: actions/upload-artifact@v4
132133
if: ${{ failure() && !env.ACT }}

.github/workflows/java-tests.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,17 @@ jobs:
132132
--tool-cluster "im" \
133133
--tool-args "onnetwork-long-im-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \
134134
--factoryreset \
135+
'
136+
- name: Run IM Extendable Invoke Test
137+
run: |
138+
scripts/run_in_python_env.sh out/venv \
139+
'./scripts/tests/run_java_test.py \
140+
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
141+
--app-args "--discriminator 3840 --interface-id -1" \
142+
--tool-path out/linux-x64-java-matter-controller \
143+
--tool-cluster "im" \
144+
--tool-args "onnetwork-long-im-extendable-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \
145+
--factoryreset \
135146
'
136147
- name: Run IM Read Test
137148
run: |

.github/workflows/lint.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ jobs:
9696
--known-failure app/CommandHandler.h \
9797
--known-failure app/CommandHandlerInterface.h \
9898
--known-failure app/CommandSenderLegacyCallback.h \
99-
--known-failure app/CompatEnumNames.h \
10099
--known-failure app/data-model/ListLargeSystemExtensions.h \
101100
--known-failure app/EventHeader.h \
102101
--known-failure app/EventLoggingTypes.h \
@@ -124,12 +123,10 @@ jobs:
124123
--known-failure app/util/generic-callback-stubs.cpp \
125124
--known-failure app/util/im-client-callbacks.h \
126125
--known-failure app/util/MatterCallbacks.h \
127-
--known-failure app/util/message.cpp \
128126
--known-failure app/util/odd-sized-integers.h \
129127
--known-failure app/util/util.cpp \
130128
--known-failure app/util/util.h \
131129
--known-failure app/WriteHandler.h \
132-
--known-failure lib/core/CHIPVendorIdentifiers.hpp \
133130
--known-failure platform/DeviceSafeQueue.cpp \
134131
--known-failure platform/DeviceSafeQueue.h \
135132
--known-failure platform/GLibTypeDeleter.h \
@@ -204,7 +201,7 @@ jobs:
204201
# TODO: TLVDebug should ideally not be excluded here.
205202
# TODO: protocol_decoder.cpp should ideally not be excluded here.
206203
# TODO: PersistentStorageMacros.h should ideally not be excluded here.
207-
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/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0
204+
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' && exit 1 || exit 0
208205
209206
# git grep exits with 0 if it finds a match, but we want
210207
# to fail (exit nonzero) on match. And we want to exclude this file,

.github/workflows/smoketest-android.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
container:
4040
image: ghcr.io/project-chip/chip-build-android:35
4141
volumes:
42+
- "/:/runner-root-volume"
4243
- "/tmp/log_output:/tmp/test_logs"
4344

4445
steps:

.github/workflows/unit_integration_test.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
container:
4040
image: ghcr.io/project-chip/chip-build:35
4141
volumes:
42+
- "/:/runner-root-volume"
4243
- "/tmp/log_output:/tmp/test_logs"
4344
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
4445

build/chip/chip_codegen.gni

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ template("_chip_build_time_codegen") {
3535
include_dirs = [ target_gen_dir ]
3636
}
3737

38-
pw_python_action("${_name}_codegen") {
38+
pw_python_action("${_name}_generate") {
3939
script = "${chip_root}/scripts/codegen.py"
4040

4141
# TODO: this seems to touch internals. Is this ok? speeds up builds!
@@ -99,7 +99,7 @@ template("_chip_build_time_codegen") {
9999
if (!defined(deps)) {
100100
deps = []
101101
}
102-
deps += [ ":${_name}_codegen" ]
102+
deps += [ ":${_name}_generate" ]
103103
}
104104
}
105105

@@ -152,7 +152,7 @@ template("_chip_build_time_zapgen") {
152152
_output_subdir = "zap-generated"
153153
}
154154

155-
pw_python_action("${_name}_zap") {
155+
pw_python_action("${_name}_generate") {
156156
script = "${chip_root}/scripts/tools/zap/generate.py"
157157

158158
# TODO: this seems to touch internals. Is this ok? speeds up builds!
@@ -211,7 +211,7 @@ template("_chip_build_time_zapgen") {
211211
if (!defined(public_deps)) {
212212
public_deps = []
213213
}
214-
public_deps += [ ":${_name}_zap" ]
214+
public_deps += [ ":${_name}_generate" ]
215215
}
216216
}
217217

build/config/BUILDCONFIG.gn

+4-7
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ if (_chip_defaults.custom_toolchain != "") {
7676
} else {
7777
_target_compiler = "gcc"
7878
}
79-
8079
_default_toolchain = "${_build_overrides.build_root}/toolchain/linux:linux_${target_cpu}_${_target_compiler}"
81-
} else if (target_os == host_os &&
82-
(target_cpu == host_cpu ||
83-
(target_cpu == "arm64e" && host_cpu == "arm64"))) {
80+
} else if (host_os == "mac" && (target_os == "mac" || target_os == "ios")) {
81+
# On Mac the host toolchain supports building for all mac and ios targets
82+
_default_toolchain = host_toolchain
83+
} else if (target_os == host_os && target_cpu == host_cpu) {
8484
_default_toolchain = host_toolchain
8585
} else if (target_os == "freertos") {
8686
if (_chip_defaults.is_clang) {
@@ -113,9 +113,6 @@ if (_chip_defaults.custom_toolchain != "") {
113113
} else {
114114
assert(false, "Unsupported target_cpu: ${current_cpu}")
115115
}
116-
} else if (target_os == "ios") {
117-
_default_toolchain =
118-
"${_build_overrides.build_root}/toolchain/ios:ios_${target_cpu}"
119116
} else if (target_os == "tizen") {
120117
_default_toolchain =
121118
"${_build_overrides.build_root}/toolchain/tizen:tizen_${target_cpu}"

build/config/compiler/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ config("cosmetic_default") {
343343
}
344344

345345
config("runtime_default") {
346-
if (is_clang) {
346+
if (is_clang) { # Using Pigweed clang instead of Darwin host clang
347347
configs = [
348348
"$dir_pw_toolchain/host_clang:no_system_libcpp",
349349
"$dir_pw_toolchain/host_clang:xcode_sysroot",
@@ -402,7 +402,7 @@ config("sanitize_address") {
402402
]
403403
ldflags = cflags
404404

405-
if (target_os == "mac" || target_os == "ios") {
405+
if ((target_os == "mac" || target_os == "ios") && !is_clang) {
406406
defines += [ "_LIBCPP_HAS_NO_ASAN" ]
407407
}
408408
}

build/toolchain/ios/BUILD.gn

-42
This file was deleted.
Loading

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -7761,7 +7761,7 @@ endpoint 1 {
77617761
callback attribute eventList;
77627762
callback attribute attributeList;
77637763
ram attribute featureMap default = 0x0001;
7764-
ram attribute clusterRevision default = 5;
7764+
ram attribute clusterRevision default = 6;
77657765

77667766
handle command Off;
77677767
handle command On;
@@ -9134,7 +9134,7 @@ endpoint 2 {
91349134
callback attribute eventList;
91359135
callback attribute attributeList;
91369136
ram attribute featureMap default = 0x0001;
9137-
ram attribute clusterRevision default = 5;
9137+
ram attribute clusterRevision default = 6;
91389138

91399139
handle command Off;
91409140
handle command On;

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+3-3
Original file line numberDiff line numberDiff line change
@@ -6659,7 +6659,7 @@
66596659
"storageOption": "RAM",
66606660
"singleton": 0,
66616661
"bounded": 0,
6662-
"defaultValue": "5",
6662+
"defaultValue": "6",
66636663
"reportable": 1,
66646664
"minInterval": 0,
66656665
"maxInterval": 65344,
@@ -6895,7 +6895,7 @@
68956895
"storageOption": "RAM",
68966896
"singleton": 0,
68976897
"bounded": 0,
6898-
"defaultValue": "5",
6898+
"defaultValue": "6",
68996899
"reportable": 1,
69006900
"minInterval": 0,
69016901
"maxInterval": 65344,
@@ -23993,7 +23993,7 @@
2399323993
"storageOption": "RAM",
2399423994
"singleton": 0,
2399523995
"bounded": 0,
23996-
"defaultValue": "5",
23996+
"defaultValue": "6",
2399723997
"reportable": 1,
2399823998
"minInterval": 0,
2399923999
"maxInterval": 65344,

0 commit comments

Comments
 (0)