Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into binding-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
gjc13 committed Mar 4, 2022
2 parents 44b2cc7 + 5a8ffc1 commit 94fe4c0
Show file tree
Hide file tree
Showing 127 changed files with 3,087 additions and 2,876 deletions.
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ peerNodeId
peerSessionId
pem
percentageLiftValue
periodicQueryTimeout
pexpect
pickString
PID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ name: Build example - nRF Connect SDK

on:
push:
workflow_dispatch:
pull_request:

concurrency:
group: full-${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
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:
nrfconnect:
name: nRF Connect SDK
timeout-minutes: 120

env:
BUILD_TYPE: nrfconnect

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

Expand All @@ -39,13 +43,26 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true

- name: Detect changed paths
uses: dorny/paths-filter@v2
id: changed_paths
with:
filters: |
nrfconnect:
- '**/nrfconnect/**'
- '**/Zephyr/**'
- '**/zephyr/**'
tests:
- '**/tests/**'
shell:
- 'examples/shell/nrfconnect/**'
pigweed-app:
- 'examples/pigweed-app/nrfconnect/**'
- 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: 25
run: scripts/build/gn_bootstrap.sh
Expand All @@ -61,6 +78,7 @@ jobs:
timeout-minutes: 10
run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --update --shallow"
- name: Build example nRF Connect SDK Lock App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840
Expand All @@ -69,6 +87,7 @@ jobs:
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840
Expand All @@ -77,6 +96,7 @@ jobs:
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y
Expand All @@ -85,6 +105,7 @@ jobs:
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay
Expand All @@ -93,6 +114,7 @@ jobs:
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Shell on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840
Expand All @@ -101,6 +123,7 @@ jobs:
examples/shell/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Pigweed on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.pigweed-app == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh pigweed-app nrf52840dk_nrf52840
Expand All @@ -109,6 +132,7 @@ jobs:
examples/pigweed-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lock App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp
Expand All @@ -117,6 +141,7 @@ jobs:
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp
Expand All @@ -125,6 +150,7 @@ jobs:
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Pump App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh pump-app nrf52840dk_nrf52840
Expand All @@ -133,6 +159,7 @@ jobs:
examples/pump-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Pump Controller App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk_nrf52840
Expand All @@ -143,12 +170,13 @@ jobs:
- name: Build example nRF Connect SDK All Clusters App on nRF52840 DK
timeout-minutes: 10
run: |
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840
scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840 -DBUILD_WITH_DFU=1
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 all-clusters-app \
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Run unit tests for Zephyr native_posix_64 platform
if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true'
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build"
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/smoketest-nrfconnect.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion config/nrfconnect/app/sample-defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ CONFIG_MATTER_LOG_LEVEL_DBG=y
CONFIG_PRINTK_SYNC=y
CONFIG_ASSERT=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_FPU=y
CONFIG_SHELL=y

# Enable getting reboot reasons information
Expand Down Expand Up @@ -63,6 +64,7 @@ CONFIG_BT_MAX_CONN=1
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_RX_STACK_SIZE=1120

# Enable NFC support
CONFIG_CHIP_NFC_COMMISSIONING=y
Expand All @@ -76,7 +78,6 @@ CONFIG_OPENTHREAD_FTD=n
CONFIG_OPENTHREAD_SLAAC=y
CONFIG_OPENTHREAD_MTD_NETDIAG=y
CONFIG_OPENTHREAD_MANUAL_START=y
CONFIG_OPENTHREAD_THREAD_STACK_SIZE=6144
CONFIG_OPENTHREAD_NUM_MESSAGE_BUFFERS=64

# Enable Thread 1.2 features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1458,8 +1458,8 @@ server cluster GeneralDiagnostics = 51 {

server cluster GroupKeyManagement = 63 {
enum GroupKeySecurityPolicy : ENUM8 {
kStandard = 0;
kTrustFirst = 1;
kTrustFirst = 0;
kCacheAndSync = 1;
}

struct GroupKeyMapStruct {
Expand Down
15 changes: 4 additions & 11 deletions examples/chip-tool/commands/clusters/ClusterCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class ClusterCommand : public ModelCommand, public chip::app::CommandSender::Cal

~ClusterCommand() {}

CHIP_ERROR SendCommand(ChipDevice * device, chip::EndpointId endpointId) override
CHIP_ERROR SendCommand(ChipDevice * device, std::vector<chip::EndpointId> endpointIds) override
{
return ClusterCommand::SendCommand(device, endpointId, mClusterId, mCommandId, mPayload);
return ClusterCommand::SendCommand(device, endpointIds.at(0), mClusterId, mCommandId, mPayload);
}

CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::NodeId senderNodeId) override
Expand Down Expand Up @@ -126,15 +126,8 @@ class ClusterCommand : public ModelCommand, public chip::app::CommandSender::Cal
VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY);
ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, value, mTimedInteractionTimeoutMs));

chip::Optional<chip::SessionHandle> session =
exchangeManager->GetSessionManager()->CreateGroupSession(groupId, fabricIndex, senderNodeId);
if (!session.HasValue())
{
return CHIP_ERROR_NO_MEMORY;
}
CHIP_ERROR err = commandSender->SendGroupCommandRequest(session.Value());
exchangeManager->GetSessionManager()->RemoveGroupSession(session.Value()->AsGroupSession());
ReturnErrorOnFailure(err);
chip::Transport::OutgoingGroupSession session(groupId, fabricIndex, senderNodeId);
ReturnErrorOnFailure(commandSender->SendGroupCommandRequest(chip::SessionHandle(session)));
commandSender.release();

return CHIP_NO_ERROR;
Expand Down
4 changes: 2 additions & 2 deletions examples/chip-tool/commands/clusters/ModelCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ModelCommand : public CHIPCommand
CHIP_ERROR RunCommand() override;
chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); }

virtual CHIP_ERROR SendCommand(ChipDevice * device, chip::EndpointId endPointId) = 0;
virtual CHIP_ERROR SendCommand(ChipDevice * device, std::vector<chip::EndpointId> endPointIds) = 0;

virtual CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::NodeId senderNodeId)
{
Expand All @@ -51,7 +51,7 @@ class ModelCommand : public CHIPCommand

private:
chip::NodeId mNodeId;
chip::EndpointId mEndPointId;
std::vector<chip::EndpointId> mEndPointId;

static void OnDeviceConnectedFn(void * context, ChipDevice * device);
static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error);
Expand Down
Loading

0 comments on commit 94fe4c0

Please sign in to comment.