Skip to content

Commit 19a4aee

Browse files
committed
Addressed PR comments: improved return type checking and use to_underlying rather than static cast. Improved some poor logic. Regenerated Code.
2 parents d59c111 + ad5253a commit 19a4aee

File tree

1,873 files changed

+326892
-120359
lines changed

Some content is hidden

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

1,873 files changed

+326892
-120359
lines changed

.devcontainer/build.sh

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#!/bin/bash
2+
3+
#
4+
# Copyright (c) 2023 Project CHIP Authors
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
HERE="$(dirname "$0")"
20+
CHIP_ROOT="$(realpath "$HERE"/..)"
21+
BUILD_VERSION="latest"
22+
IMAGE_TAG="matter-dev-environment:local"
23+
USER_UID=$UID
24+
25+
function show_usage() {
26+
cat <<EOF
27+
Usage: $0
28+
29+
Build vscode dev environment docker image.
30+
31+
Options:
32+
-h,--help Show this help
33+
-t,--tag Image tag - default is matter-dev-environment:local
34+
-u,--uid User UIDa - default is the current user ID
35+
-v,--version Build version - default is the latest
36+
EOF
37+
}
38+
39+
SHORT=t:,u:,h:,v
40+
LONG=tag:,uid:,help:,version:
41+
OPTS=$(getopt -n build --options "$SHORT" --longoptions "$LONG" -- "$@")
42+
43+
eval set -- "$OPTS"
44+
45+
while :; do
46+
case "$1" in
47+
-h | --help)
48+
show_usage
49+
exit 0
50+
;;
51+
-t | --tag)
52+
IMAGE_TAG=$2
53+
shift 2
54+
;;
55+
-u | --uid)
56+
USER_UID=$2
57+
shift 2
58+
;;
59+
-v | --version)
60+
BUILD_VERSION=$2
61+
shift 2
62+
;;
63+
--)
64+
shift
65+
break
66+
;;
67+
*)
68+
echo "Unexpected option: $1"
69+
show_usage
70+
exit 2
71+
;;
72+
esac
73+
done
74+
75+
if [ "$USER_UID" = "0" ]; then
76+
USER_UID=1000
77+
fi
78+
79+
docker build \
80+
-t "$IMAGE_TAG" \
81+
--pull \
82+
--build-arg USER_UID="$USER_UID" \
83+
--build-arg BUILD_VERSION="$BUILD_VERSION" \
84+
--network=host \
85+
"$HERE"

.devcontainer/devcontainer.json

+36-31
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,43 @@
1414
"mounts": [
1515
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
1616
],
17-
"build": {
18-
"dockerfile": "Dockerfile",
19-
"args": {
20-
"BUILD_VERSION": "0.7.0"
21-
}
22-
},
17+
"initializeCommand": ".devcontainer/build.sh --tag matter-dev-environment:local --version 0.7.3",
18+
"image": "matter-dev-environment:local",
2319
"remoteUser": "vscode",
24-
// Add the IDs of extensions you want installed when the container is created in the array below.
25-
"extensions": [
26-
"aaron-bond.better-comments",
27-
"augustocdias.tasks-shell-input",
28-
"christian-kohler.path-intellisense",
29-
"eamodio.gitlens",
30-
"editorconfig.editorconfig",
31-
"esbenp.prettier-vscode",
32-
"foxundermoon.shell-format",
33-
"github.vscode-pull-request-github",
34-
"maelvalais.autoconf",
35-
"marus25.cortex-debug",
36-
"ms-azuretools.vscode-docker",
37-
"ms-vscode.cpptools",
38-
"msedge-dev.gnls",
39-
"redhat.vscode-yaml",
40-
"vadimcn.vscode-lldb",
41-
"xaver.clang-format",
42-
"yuichinukiyama.vscode-preview-server",
43-
"yzhang.markdown-all-in-one"
44-
],
45-
// Use 'settings' to set *default* container specific settings.json values on container create.
46-
// You can edit these settings after create using File > Preferences > Settings > Remote.
47-
"settings": {
48-
"terminal.integrated.shell.linux": "/bin/bash"
20+
"customizations": {
21+
"vscode": {
22+
// Add the IDs of extensions you want installed when the container is created in the array below.
23+
"extensions": [
24+
"mcu-debug.debug-tracker-vscode",
25+
"aaron-bond.better-comments",
26+
"augustocdias.tasks-shell-input",
27+
"christian-kohler.path-intellisense",
28+
"eamodio.gitlens",
29+
"editorconfig.editorconfig",
30+
"esbenp.prettier-vscode",
31+
"foxundermoon.shell-format",
32+
"github.vscode-pull-request-github",
33+
"maelvalais.autoconf",
34+
"marus25.cortex-debug",
35+
"ms-azuretools.vscode-docker",
36+
"ms-vscode.cpptools",
37+
"msedge-dev.gnls",
38+
"redhat.vscode-yaml",
39+
"vadimcn.vscode-lldb",
40+
"xaver.clang-format",
41+
"yuichinukiyama.vscode-preview-server",
42+
"yzhang.markdown-all-in-one"
43+
],
44+
"settings": {
45+
"terminal.integrated.defaultProfile.linux": "bash",
46+
"terminal.integrated.profiles.linux": {
47+
"bash": {
48+
"path": "/bin/bash",
49+
"args": ["-l"]
50+
}
51+
}
52+
}
53+
}
4954
},
5055
"remoteEnv": {
5156
"GIT_PS1_SHOWDIRTYSTATE": "1",

.github/.wordlist.txt

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ armv
8888
ASAN
8989
asdk
9090
AssertionError
91+
ASR
9192
AST
9293
ASYNC
9394
atomics
@@ -563,6 +564,7 @@ FW
563564
gbl
564565
gcloud
565566
GDB
567+
gdbgui
566568
gdbserver
567569
GeneralCommissioning
568570
GeneralDiagnostics
@@ -606,6 +608,7 @@ GroupKeyManagement
606608
groupKeySecurityPolicy
607609
groupKeySetID
608610
groupsettings
611+
gsdk
609612
gtk
610613
GUA
611614
Gv
@@ -717,6 +720,7 @@ Jupyter
717720
jupyterlab
718721
KA
719722
kAdminister
723+
kbd
720724
kBusy
721725
kCase
722726
Kconfig
@@ -1239,6 +1243,7 @@ softwareVersionStr
12391243
SoftwareVersionString
12401244
softwareVersionValid
12411245
sphinxcontrib
1246+
SparkFun
12421247
SPI
12431248
spiflash
12441249
spinel

.github/workflows/bloat_check.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ jobs:
3333
runs-on: ubuntu-latest
3434

3535
container:
36-
image: connectedhomeip/chip-build:0.7.0
36+
image: connectedhomeip/chip-build:0.7.3
3737

3838
steps:
3939
- uses: Wandalen/[email protected]
4040
name: Checkout
4141
with:
4242
action: actions/checkout@v3
4343
with: |
44-
submodules: true
4544
token: ${{ github.token }}
4645
attempt_limit: 3
4746
attempt_delay: 2000

.github/workflows/build.yaml

+11-9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ concurrency:
2626

2727
env:
2828
CHIP_NO_LOG_TIMESTAMPS: true
29+
# XXX: Workaround for https://github.com/actions/cache/issues/1141
30+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
2931

3032
jobs:
3133
build_linux_gcc_debug:
@@ -36,7 +38,7 @@ jobs:
3638
if: github.actor != 'restyled-io[bot]'
3739

3840
container:
39-
image: connectedhomeip/chip-build:0.7.0
41+
image: connectedhomeip/chip-build:0.7.3
4042
volumes:
4143
- "/tmp/log_output:/tmp/test_logs"
4244
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
@@ -77,7 +79,7 @@ jobs:
7779
build_overrides/pigweed_environment.gni
7880
- name: Bootstrap
7981
timeout-minutes: 10
80-
run: scripts/build/gn_bootstrap.sh
82+
run: bash scripts/bootstrap.sh
8183
- name: Uploading bootstrap logs
8284
uses: actions/upload-artifact@v3
8385
if: ${{ always() && !env.ACT }}
@@ -148,7 +150,7 @@ jobs:
148150
if: github.actor != 'restyled-io[bot]'
149151

150152
container:
151-
image: connectedhomeip/chip-build:0.7.0
153+
image: connectedhomeip/chip-build:0.7.3
152154
volumes:
153155
- "/tmp/log_output:/tmp/test_logs"
154156
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
@@ -194,7 +196,7 @@ jobs:
194196
build_overrides/pigweed_environment.gni
195197
- name: Bootstrap
196198
timeout-minutes: 10
197-
run: scripts/build/gn_bootstrap.sh
199+
run: bash scripts/bootstrap.sh
198200
- name: Uploading bootstrap logs
199201
uses: actions/upload-artifact@v3
200202
if: ${{ always() && !env.ACT }}
@@ -320,7 +322,7 @@ jobs:
320322
if: github.actor != 'restyled-io[bot]'
321323

322324
container:
323-
image: connectedhomeip/chip-build:0.7.0
325+
image: connectedhomeip/chip-build:0.7.3
324326
volumes:
325327
- "/tmp/log_output:/tmp/test_logs"
326328
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
@@ -356,7 +358,7 @@ jobs:
356358
build_overrides/pigweed_environment.gni
357359
- name: Bootstrap
358360
timeout-minutes: 10
359-
run: scripts/build/gn_bootstrap.sh
361+
run: bash scripts/bootstrap.sh
360362

361363
- name: Setup Build, Run Build and Run Tests
362364
timeout-minutes: 50
@@ -415,7 +417,7 @@ jobs:
415417
build_overrides/pigweed_environment.gni
416418
- name: Bootstrap
417419
timeout-minutes: 25
418-
run: scripts/build/gn_bootstrap.sh
420+
run: bash scripts/bootstrap.sh
419421
- name: Uploading bootstrap logs
420422
uses: actions/upload-artifact@v3
421423
if: ${{ always() && !env.ACT }}
@@ -487,7 +489,7 @@ jobs:
487489
if: github.actor != 'restyled-io[bot]'
488490

489491
container:
490-
image: connectedhomeip/chip-build:0.7.0
492+
image: connectedhomeip/chip-build:0.7.3
491493
volumes:
492494
- "/tmp/log_output:/tmp/test_logs"
493495
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
@@ -515,7 +517,7 @@ jobs:
515517
build_overrides/pigweed_environment.gni
516518
- name: Bootstrap
517519
timeout-minutes: 10
518-
run: scripts/build/gn_bootstrap.sh
520+
run: bash scripts/bootstrap.sh
519521
- name: Uploading bootstrap logs
520522
uses: actions/upload-artifact@v3
521523
if: ${{ always() && !env.ACT }}

.github/workflows/chef.yaml

+11-6
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,19 @@ concurrency:
2323
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
2424
cancel-in-progress: true
2525

26+
env:
27+
CHIP_NO_LOG_TIMESTAMPS: true
28+
# XXX: Workaround for https://github.com/actions/cache/issues/1141
29+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
30+
2631
jobs:
2732
chef_linux:
2833
name: Chef - Linux CI Examples
2934
runs-on: ubuntu-latest
3035
if: github.actor != 'restyled-io[bot]'
3136

3237
container:
33-
image: connectedhomeip/chip-build:0.7.0
38+
image: connectedhomeip/chip-build:0.7.3
3439
options: --user root
3540

3641
steps:
@@ -54,7 +59,7 @@ jobs:
5459
build_overrides/pigweed_environment.gni
5560
- name: Bootstrap
5661
timeout-minutes: 10
57-
run: scripts/build/gn_bootstrap.sh
62+
run: bash scripts/bootstrap.sh
5863
- name: CI Examples Linux
5964
shell: bash
6065
run: |
@@ -66,7 +71,7 @@ jobs:
6671
if: github.actor != 'restyled-io[bot]'
6772

6873
container:
69-
image: connectedhomeip/chip-build-esp32:0.7.0
74+
image: connectedhomeip/chip-build-esp32:0.7.3
7075
options: --user root
7176

7277
steps:
@@ -90,7 +95,7 @@ jobs:
9095
build_overrides/pigweed_environment.gni
9196
- name: Bootstrap
9297
timeout-minutes: 10
93-
run: scripts/build/gn_bootstrap.sh
98+
run: bash scripts/bootstrap.sh
9499
- name: CI Examples ESP32
95100
shell: bash
96101
run: |
@@ -102,7 +107,7 @@ jobs:
102107
if: github.actor != 'restyled-io[bot]'
103108

104109
container:
105-
image: connectedhomeip/chip-build-nrf-platform:0.7.0
110+
image: connectedhomeip/chip-build-nrf-platform:0.7.3
106111
options: --user root
107112

108113
steps:
@@ -126,7 +131,7 @@ jobs:
126131
build_overrides/pigweed_environment.gni
127132
- name: Bootstrap
128133
timeout-minutes: 10
129-
run: scripts/build/gn_bootstrap.sh
134+
run: bash scripts/bootstrap.sh
130135
- name: CI Examples NRFConnect
131136
shell: bash
132137
run: |

0 commit comments

Comments
 (0)