Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into bugfix/ble_advertisement_random_address
  • Loading branch information
shgutte committed May 17, 2023
2 parents 22c48f0 + 64bf867 commit eaf444b
Show file tree
Hide file tree
Showing 689 changed files with 124,044 additions and 28,574 deletions.
85 changes: 85 additions & 0 deletions .devcontainer/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash

#
# 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.
#

HERE="$(dirname "$0")"
CHIP_ROOT="$(realpath "$HERE"/..)"
BUILD_VERSION="latest"
IMAGE_TAG="matter-dev-environment:local"
USER_UID=$UID

function show_usage() {
cat <<EOF
Usage: $0
Build vscode dev environment docker image.
Options:
-h,--help Show this help
-t,--tag Image tag - default is matter-dev-environment:local
-u,--uid User UIDa - default is the current user ID
-v,--version Build version - default is the latest
EOF
}

SHORT=t:,u:,h:,v
LONG=tag:,uid:,help:,version:
OPTS=$(getopt -n build --options "$SHORT" --longoptions "$LONG" -- "$@")

eval set -- "$OPTS"

while :; do
case "$1" in
-h | --help)
show_usage
exit 0
;;
-t | --tag)
IMAGE_TAG=$2
shift 2
;;
-u | --uid)
USER_UID=$2
shift 2
;;
-v | --version)
BUILD_VERSION=$2
shift 2
;;
--)
shift
break
;;
*)
echo "Unexpected option: $1"
show_usage
exit 2
;;
esac
done

if [ "$USER_UID" = "0" ]; then
USER_UID=1000
fi

docker build \
-t "$IMAGE_TAG" \
--pull \
--build-arg USER_UID="$USER_UID" \
--build-arg BUILD_VERSION="$BUILD_VERSION" \
--network=host \
"$HERE"
67 changes: 36 additions & 31 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,43 @@
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"build": {
"dockerfile": "Dockerfile",
"args": {
"BUILD_VERSION": "0.7.3"
}
},
"initializeCommand": ".devcontainer/build.sh --tag matter-dev-environment:local --version 0.7.3",
"image": "matter-dev-environment:local",
"remoteUser": "vscode",
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"aaron-bond.better-comments",
"augustocdias.tasks-shell-input",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"github.vscode-pull-request-github",
"maelvalais.autoconf",
"marus25.cortex-debug",
"ms-azuretools.vscode-docker",
"ms-vscode.cpptools",
"msedge-dev.gnls",
"redhat.vscode-yaml",
"vadimcn.vscode-lldb",
"xaver.clang-format",
"yuichinukiyama.vscode-preview-server",
"yzhang.markdown-all-in-one"
],
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"mcu-debug.debug-tracker-vscode",
"aaron-bond.better-comments",
"augustocdias.tasks-shell-input",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"github.vscode-pull-request-github",
"maelvalais.autoconf",
"marus25.cortex-debug",
"ms-azuretools.vscode-docker",
"ms-vscode.cpptools",
"msedge-dev.gnls",
"redhat.vscode-yaml",
"vadimcn.vscode-lldb",
"xaver.clang-format",
"yuichinukiyama.vscode-preview-server",
"yzhang.markdown-all-in-one"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"args": ["-l"]
}
}
}
}
},
"remoteEnv": {
"GIT_PS1_SHOWDIRTYSTATE": "1",
Expand Down
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ armv
ASAN
asdk
AssertionError
ASR
AST
ASYNC
atomics
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/bloat_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
with:
action: actions/checkout@v3
with: |
submodules: true
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
Expand Down
74 changes: 2 additions & 72 deletions .github/workflows/examples-cc13x2x7_26x2x7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc13x2_26x2
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc13xx_26xx
- name: Set up environment for size reports
if: ${{ !env.ACT }}
env:
Expand All @@ -79,75 +79,5 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build examples
timeout-minutes: 100
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target cc13x2x7_26x2x7-all-clusters-mtd \
--target cc13x2x7_26x2x7-all-clusters-minimal \
--target cc13x2x7_26x2x7-lock-ftd \
--target cc13x2x7_26x2x7-lock-mtd \
--target cc13x2x7_26x2x7-pump \
--target cc13x2x7_26x2x7-pump-controller \
--target cc13x2x7_26x2x7-shell \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get lock FTD size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 lock-ftd \
out/artifacts/cc13x2x7_26x2x7-lock-ftd/chip-LP_CC2652R7-lock-example.out \
/tmp/bloat_reports/
- name: Get lock MTD size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 lock-mtd \
out/artifacts/cc13x2x7_26x2x7-lock-mtd/chip-LP_CC2652R7-lock-example.out \
/tmp/bloat_reports/
- name: Get Pump App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 pump-app \
out/artifacts/cc13x2x7_26x2x7-pump/chip-LP_CC2652R7-pump-example.out \
/tmp/bloat_reports/
- name: Get Pump Controller App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 pump-controller-app \
out/artifacts/cc13x2x7_26x2x7-pump-controller/chip-LP_CC2652R7-pump-controller-example.out \
/tmp/bloat_reports/
- name: Get All Clusters App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 all-clusters-app \
out/artifacts/cc13x2x7_26x2x7-all-clusters-mtd/chip-LP_CC2652R7-all-clusters-example.out \
/tmp/bloat_reports/
- name: Get All Clusters Minimal App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 all-clusters-minimal-app \
out/artifacts/cc13x2x7_26x2x7-all-clusters-minimal/chip-LP_CC2652R7-all-clusters-minimal-example.out \
/tmp/bloat_reports/
- name: Get Shell App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 shell \
out/artifacts/cc13x2x7_26x2x7-shell/chip-LP_CC2652R7-shell-example.out \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v3
if: ${{ !env.ACT }}
with:
name: Size,cc13x2x7_26x2x7-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }}
path: |
/tmp/bloat_reports/
21 changes: 9 additions & 12 deletions .github/workflows/examples-openiotsdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
jobs:
openiotsdk:
name: Open IoT SDK examples building
timeout-minutes: 140
timeout-minutes: 90

env:
TEST_NETWORK_NAME: OIStest
Expand Down Expand Up @@ -107,25 +107,22 @@ jobs:
run: |
scripts/examples/openiotsdk_example.sh unit-tests
- name: Test shell example
# Temporarily disable test due to performance issue with FVP
if: false #steps.build_shell.outcome == 'success'
- name: "Test: shell example"
if: steps.build_shell.outcome == 'success'
timeout-minutes: 5
run: |
scripts/examples/openiotsdk_example.sh -C test shell
- name: Test lock-app example
# Temporarily disable test due to performance issue with FVP
if: false #steps.build_lock_app.outcome == 'success'
- name: "Test: lock-app example"
if: steps.build_lock_app.outcome == 'success'
timeout-minutes: 5
run: |
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh -C test -n ${TEST_NETWORK_NAME}tap lock-app
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: Run unit tests
# Temporarily disable test due to performance issue with FVP
if: false #steps.build_unit_tests.outcome == 'success' && github.event_name == 'pull_request'
timeout-minutes: 90
- name: "Test: unit-tests"
if: steps.build_unit_tests.outcome == 'success'
timeout-minutes: 40
run: |
scripts/examples/openiotsdk_example.sh -C run unit-tests
scripts/examples/openiotsdk_example.sh -C test unit-tests
5 changes: 5 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,8 @@ jobs:
if: always()
run: |
git grep -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
- name: Check that our hardcoded SHA for clang-format on ARM mac matches the pigweed SHA.
if: always()
run: |
./scripts/lints/clang-format-version-matches.py
26 changes: 26 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
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 \
Expand Down Expand Up @@ -192,6 +193,7 @@ jobs:
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/replacable-monitoring-cluster.xml \
"
- name: Build Apps
timeout-minutes: 60
Expand Down Expand Up @@ -674,6 +676,30 @@ jobs:
--tool-args "address-paseonly --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \
--factoryreset \
'
- name: Run Pairing SetupQRCode Test
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
'./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
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
'./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: Uploading core files
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
Expand Down
Loading

0 comments on commit eaf444b

Please sign in to comment.