Skip to content

Commit

Permalink
Merge branch 'master' into fix-verify-or-return
Browse files Browse the repository at this point in the history
  • Loading branch information
mlepage-google authored Dec 6, 2022
2 parents bfbb88f + 141df0c commit 745d9ad
Show file tree
Hide file tree
Showing 193 changed files with 15,253 additions and 320 deletions.
6 changes: 6 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ contrib
controllee
conv
CopperConcentrationMeasurement
Corstone
cortexa
cp
cpio
Expand Down Expand Up @@ -885,6 +886,7 @@ MyPASSWORD
MySSID
NAMESERVER
NAMESPACE
namespaces
namespacing
nano
natively
Expand Down Expand Up @@ -1143,11 +1145,13 @@ rsn
RSSI
RST
rsync
RTC
rtd
RTL
rtld
RTOS
RTT
RTX
RUNAS
RunMain
runtime
Expand Down Expand Up @@ -1253,6 +1257,7 @@ subdirectory
subfolder
submodule
submodules
subnet
subprocess
SubscribeResponse
SubscriptionId
Expand Down Expand Up @@ -1325,6 +1330,7 @@ Tizen
TKIP
tlsr
TLV
TLS
tmp
tngvndl
TODO
Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/examples-openiotsdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# 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:
pull_request:
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:
openiotsdk:
name: Open IoT SDK examples building
timeout-minutes: 140

env:
TEST_NETWORK_NAME: OIStest

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-openiotsdk:0.6.06
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
options: --privileged

steps:
- uses: Wandalen/[email protected]
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --recursive --platform openiotsdk

- name: Set up environment for size reports
if: ${{ !env.ACT }}
env:
GH_CONTEXT: ${{ toJson(github) }}
run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}"

- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh

- name: Build and install Python controller
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
- name: Build shell example
id: build_shell
timeout-minutes: 10
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: Build lock-app example
id: build_lock_app
timeout-minutes: 10
run: |
scripts/examples/openiotsdk_example.sh lock-app
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
openiotsdk release lock-app \
examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \
/tmp/bloat_reports/
- name: Build unit tests
id: build_unit_tests
timeout-minutes: 10
run: |
scripts/examples/openiotsdk_example.sh unit-tests
- 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
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
if: steps.build_unit_tests.outcome == 'success' && github.event_name == 'pull_request'
timeout-minutes: 90
run: |
scripts/examples/openiotsdk_example.sh -C run unit-tests
75 changes: 75 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,35 @@
"/tmp/ota-image.bin"
],
"cwd": "${workspaceFolder}"
},

{
"name": "Debug Open IoT SDK example application",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/${input:openiotsdkApp}/openiotsdk",
"executable": "./build/chip-openiotsdk-${input:openiotsdkApp}-example.elf",
"armToolchainPath": "${env:ARM_GCC_TOOLCHAIN_PATH}/bin",
"servertype": "external",
"gdbTarget": "${input:openiotsdkRemoteHost}:31627", //GDBserver port on FVP
"overrideLaunchCommands": ["-enable-pretty-printing"],
"runToEntryPoint": "main",
"preLaunchTask": "Debug Open IoT SDK example",
"showDevDebugOutput": "parsed"
},
{
"name": "Debug Open IoT SDK unit-tests application",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/src/test_driver/openiotsdk/unit-tests",
"executable": "./build/${input:openiotsdkUnittest}.elf",
"armToolchainPath": "${env:ARM_GCC_TOOLCHAIN_PATH}/bin",
"servertype": "external",
"gdbTarget": ":31627", //GDBserver port on FVP
"overrideLaunchCommands": ["-enable-pretty-printing"],
"runToEntryPoint": "main",
"preLaunchTask": "Debug Open IoT SDK unit-tests",
"showDevDebugOutput": "parsed"
}
],
"inputs": [
Expand Down Expand Up @@ -479,6 +508,52 @@
"description": "What mbed target do you want to use?",
"options": ["CY8CPROTO_062_4343W"],
"default": "CY8CPROTO_062_4343W"
},
{
"type": "pickString",
"id": "openiotsdkApp",
"description": "What Open IoT SDK example do you want to use?",
"options": ["shell", "lock-app"],
"default": "shell"
},
{
"type": "promptString",
"id": "openiotsdkRemoteHost",
"description": "Type the hostname/IP address of external GDB target that you want to connect to. Leave blank for internal GDB server",
"default": ""
},
{
"type": "pickString",
"id": "openiotsdkUnittest",
"description": "What Open IoT SDK unit test do you want to use?",
"options": [
"accesstest",
"AppTests",
"ASN1Tests",
"BDXTests",
"ChipCryptoTests",
"ControllerTests",
"CoreTests",
"CredentialsTest",
"DataModelTests",
"InetLayerTests",
"MdnsTests",
"MessagingLayerTests",
"MinimalMdnsCoreTests",
"MinimalMdnsRecordsTests",
"MinimalMdnsRespondersTests",
"PlatformTests",
"RawTransportTests",
"RetransmitTests",
"SecureChannelTests",
"SetupPayloadTests",
"SupportTests",
"SystemLayerTests",
"TestShell",
"TransportLayerTests",
"UserDirectedCommissioningTests"
],
"default": "accesstest"
}
]
}
Loading

0 comments on commit 745d9ad

Please sign in to comment.