diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml deleted file mode 100644 index 4ef7da2a83..0000000000 --- a/.github/workflows/doxygen.yaml +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright (c) 2020 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: Doxygen - -on: - push: - paths: - - "**.do[xc]" - - "**.c[cs]?" - - "**.cxx" - - "**.cpp" - - "**.c++" - - "**.ii" - - "**.ixx" - - "**.ipp" - - "**.i++" - - "**.inl" - - "**.[hH]" - - "**.hh" - - "**.HH" - - "**.hxx" - - "**.hpp" - - "**.h++" - - "**.mm" - - "**.txt" - - "**.[ido]dl" - - "**.java" - - "**.d" - - "**.php[45]?" - - "**.inc" - - "**.phtml" - - "**.[mM]" - pull_request: - paths: - - "**.do[xc]" - - "**.c[cs]?" - - "**.cxx" - - "**.cpp" - - "**.c++" - - "**.ii" - - "**.ixx" - - "**.ipp" - - "**.i++" - - "**.inl" - - "**.[hH]" - - "**.hh" - - "**.HH" - - "**.hxx" - - "**.hpp" - - "**.h++" - - "**.mm" - - "**.txt" - - "**.[ido]dl" - - "**.java" - - "**.d" - - "**.php[45]?" - - "**.inc" - - "**.phtml" - - "**.[mM]" - 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: - doxygen: - name: Build Doxygen - timeout-minutes: 5 - - runs-on: ubuntu-20.04 - container: - image: connectedhomeip/chip-build-doxygen:0.5.91 - - if: github.actor != 'restyled-io[bot]' - - steps: - - name: "Print Actor" - run: echo ${{github.actor}} - - uses: Wandalen/wretry.action@v1.0.15 - name: Checkout - with: - action: actions/checkout@v3 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Generate - run: scripts/helpers/doxygen.sh - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" - id: extract_branch - - name: Deploy if master - if: steps.extract_branch.outputs.branch == 'master' && github.repository == 'project-chip/connectedhomeip' - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }} - external_repository: project-chip/connectedhomeip-doc - publish_dir: ./docs/html - # Keep only the latest version of the documentation - force_orphan: true diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 3c110ce1cc..8bd542ed99 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -83,11 +83,13 @@ jobs: - name: Update nRF Connect SDK revision to the currently recommended. timeout-minutes: 15 run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --update --shallow" + continue-on-error: true - name: Run unit tests of factory data generation script timeout-minutes: 15 run: scripts/run_in_build_env.sh "./scripts/tools/nrfconnect/tests/test_generate_factory_data.py" - name: Build example nRF Connect SDK Lock App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840 @@ -97,6 +99,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 @@ -106,6 +109,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONF_FILE=prj_no_dfu.conf -DCONFIG_CHIP_ROTATING_DEVICE_ID=y @@ -115,6 +119,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay @@ -124,6 +129,7 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Shell on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840 @@ -133,6 +139,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh pigweed-app nrf52840dk_nrf52840 @@ -142,6 +149,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp @@ -151,6 +159,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp @@ -160,6 +169,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh pump-app nrf52840dk_nrf52840 @@ -169,6 +179,7 @@ jobs: /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' + continue-on-error: true timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk_nrf52840 @@ -177,6 +188,7 @@ jobs: examples/pump-controller-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK All Clusters App on nRF52840 DK + continue-on-error: true timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840 -DCONF_FILE=prj_dfu.conf diff --git a/.github/workflows/release_tools.yaml b/.github/workflows/release_tools.yaml new file mode 100644 index 0000000000..5681675d9b --- /dev/null +++ b/.github/workflows/release_tools.yaml @@ -0,0 +1,140 @@ +# 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: Release CHIP Tools + +on: + workflow_dispatch: + inputs: + commit: + description: "Release tag name or commit SHA:" + required: true + publishRelease: + description: "Publish release packages (if true, 'commit' must contain a release tag name):" + required: true + default: "false" + +jobs: + tools: + name: Build CHIP Tools + timeout-minutes: 60 + + runs-on: ubuntu-latest + + env: + DEBIAN_FRONTEND: noninteractive + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/ + + container: + image: connectedhomeip/chip-build-android:0.5.91 + volumes: + - "/tmp/log_output:/tmp/test_logs" + - "/tmp/output_binaries:/tmp/output_binaries" + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: "${{ github.event.inputs.commit }}" + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform android linux + - name: Bootstrap + timeout-minutes: 10 + run: scripts/build/gn_bootstrap.sh + - name: Install CHIP Tool dependencies + timeout-minutes: 10 + run: | + echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports $(lsb_release -sc) main restricted" > /etc/apt/sources.list.d/arm64.list + echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports $(lsb_release -sc)-updates main restricted" >> /etc/apt/sources.list.d/arm64.list + apt update + apt install -y --no-install-recommends -o APT::Immediate-Configure=false g++-aarch64-linux-gnu libgirepository1.0-dev + dpkg --add-architecture arm64 + apt install -y --no-install-recommends -o APT::Immediate-Configure=false libavahi-client-dev:arm64 libglib2.0-dev:arm64 libssl-dev:arm64 libreadline-dev:arm64 + - name: Build x64 CHIP Tool with debug logs enabled + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh "gn gen out/chiptool_x64_debug --args='chip_mdns=\"platform\" symbol_level=0'" + scripts/run_in_build_env.sh "ninja -C out/chiptool_x64_debug chip-tool" + mv out/chiptool_x64_debug/chip-tool out/chiptool_x64_debug/chip-tool-debug + - name: Build x64 CHIP Tool with debug logs disabled + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh "gn gen out/chiptool_x64_release --args='chip_mdns=\"platform\" chip_detail_logging=false symbol_level=0'" + scripts/run_in_build_env.sh "ninja -C out/chiptool_x64_release chip-tool" + mv out/chiptool_x64_release/chip-tool out/chiptool_x64_release/chip-tool-release + - name: Build arm64 CHIP Tool with debug logs enabled + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh "gn gen out/chiptool_arm64_debug --args='chip_mdns=\"platform\" + custom_toolchain=\"//build/toolchain/custom\" + target_cc=\"aarch64-linux-gnu-gcc\" + target_cxx=\"aarch64-linux-gnu-g++\" + target_ar=\"aarch64-linux-gnu-ar\" + target_cpu=\"arm64\" + symbol_level=0'" + scripts/run_in_build_env.sh "ninja -C out/chiptool_arm64_debug chip-tool" + mv out/chiptool_arm64_debug/chip-tool out/chiptool_arm64_debug/chip-tool-debug + - name: Build arm64 CHIP Tool with debug logs disabled + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh "gn gen out/chiptool_arm64_release --args='chip_mdns=\"platform\" + chip_detail_logging=false + custom_toolchain=\"//build/toolchain/custom\" + target_cc=\"aarch64-linux-gnu-gcc\" + target_cxx=\"aarch64-linux-gnu-g++\" + target_ar=\"aarch64-linux-gnu-ar\" + target_cpu=\"arm64\" + symbol_level=0'" + scripts/run_in_build_env.sh "ninja -C out/chiptool_arm64_release chip-tool" + mv out/chiptool_arm64_release/chip-tool out/chiptool_arm64_release/chip-tool-release + - name: Build x64 OTA Provider + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh "gn gen out/chipotaprovider_x64 --args='symbol_level=0' --root=examples/ota-provider-app/linux" + scripts/run_in_build_env.sh "ninja -C out/chipotaprovider_x64 chip-ota-provider-app" + mv out/chipotaprovider_x64/chip-ota-provider-app /tmp/output_binaries/chip-ota-provider-app-linux_x64 + - name: Create zip files for CHIP Tool debug and release packages + timeout-minutes: 10 + run: | + python3 -m zipfile -c /tmp/output_binaries/chip-tool-linux_x64.zip out/chiptool_x64_debug/chip-tool-debug out/chiptool_x64_release/chip-tool-release + python3 -m zipfile -c /tmp/output_binaries/chip-tool-linux_aarch64.zip out/chiptool_arm64_debug/chip-tool-debug out/chiptool_arm64_release/chip-tool-release + - name: Build arm Android CHIPTool + timeout-minutes: 30 + env: + TARGET_CPU: arm + run: | + scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target android-arm-chip-tool build" + cp out/android-arm-chip-tool/outputs/apk/debug/app-debug.apk /tmp/output_binaries/chip-tool-android_armv7l.apk + - name: Build arm64 Android CHIPTool + timeout-minutes: 30 + env: + TARGET_CPU: arm64 + run: | + git clean -fdx src/android/CHIPTool + scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target android-arm64-chip-tool build" + cp out/android-arm64-chip-tool/outputs/apk/debug/app-debug.apk /tmp/output_binaries/chip-tool-android_aarch64.apk + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: chip + path: /tmp/output_binaries/* + - name: Upload release packages + uses: softprops/action-gh-release@v1 + if: github.event.inputs.publishRelease == 'true' + with: + files: /tmp/output_binaries/* + fail_on_unmatched_files: true + tag_name: "${{ github.event.inputs.commit }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/config/nrfconnect/.nrfconnect-recommended-revision b/config/nrfconnect/.nrfconnect-recommended-revision index f3b15f3f8e..c5387f4e1b 100644 --- a/config/nrfconnect/.nrfconnect-recommended-revision +++ b/config/nrfconnect/.nrfconnect-recommended-revision @@ -1 +1 @@ -v2.0.2 +origin/main diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index 228ba22eac..4addc9b469 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -87,6 +87,10 @@ config CHIP_DEVICE_PRODUCT_ID int default 32768 +config NVS_LOOKUP_CACHE_SIZE + int + default 512 + # Disable certain parts of Zephyr IPv6 stack config NET_IPV6_NBR_CACHE bool diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index 5dbeb5f3b1..4e247007c4 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -677,7 +677,7 @@ rm -fr /tmp/chip_* ``` Developer details on how the test suite is structured can be found -[here](../../src/app/tests/suites/README.md). +[here](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/README.md). ### Parsing the setup payload diff --git a/docs/guides/nrfconnect_factory_data_configuration.md b/docs/guides/nrfconnect_factory_data_configuration.md index 3dc71cd58d..6f93b924d0 100644 --- a/docs/guides/nrfconnect_factory_data_configuration.md +++ b/docs/guides/nrfconnect_factory_data_configuration.md @@ -78,7 +78,7 @@ data stored in the device's flash memory is provided in the CBOR format. However, it is possible to generate the factory data set without using the nRF Connect scripts and implement another parser and a factory data accessor. This is possible if the newly provided implementation is consistent with the -[Factory Data Provider](../../src/platform/nrfconnect/FactoryDataProvider.h). +[Factory Data Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/nrfconnect/FactoryDataProvider.h). For more information about preparing a factory data accessor, see the section about [using own factory data implementation](#using-own-factory-data-implementation). @@ -192,7 +192,7 @@ device is able to read out parameters, verify the file using the A Matter device needs a proper factory data partition stored in the flash memory to read out all required parameters during startup. To simplify the factory data generation, you can use the -[generate_nrfconnect_chip_factory_data.py](../../scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py) +[generate_nrfconnect_chip_factory_data.py](https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py) Python script to provide all required parameters and generate a human-readable JSON file. @@ -425,7 +425,7 @@ multiple of one flash page (for nRF52 and nRF53 SoCs, a single page size equals See the following code snippet for an example of a factory data partition in the `pm_static.yml` file. The snippet is based on the `pm_static.yml` file from the -[Lock application example](../../examples/lock-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml) +[Lock application example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lock-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml) and uses the nRF52840 DK: ``` @@ -495,7 +495,7 @@ The output will look similar to the following one: To store the factory data set in the device's persistent storage, convert the data from the JSON file to its binary representation in the CBOR format. To do this, use the -[nrfconnect_generate_partition.py](../../scripts/tools/nrfconnect/nrfconnect_generate_partition.py) +[nrfconnect_generate_partition.py](https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/nrfconnect/nrfconnect_generate_partition.py) to generate the factory data partition: 1. Navigate to the _connectedhomeip_ root directory @@ -558,7 +558,7 @@ Alternatively, you can also add `CONFIG_CHIP_FACTORY_DATA_BUILD=y` Kconfig setting to the example's `prj.conf` file. Each factory data parameter has a default value. These are described in the -[Kconfig file](../../config/nrfconnect/chip-module/Kconfig). Setting a new value +[Kconfig file](https://github.com/project-chip/connectedhomeip/blob/master/config/nrfconnect/chip-module/Kconfig). Setting a new value for the factory data parameter can be done either by providing it as a build argument list or by using interactive Kconfig interfaces. @@ -581,7 +581,7 @@ Alternatively, you can add the relevant Kconfig option lines to the example's You can edit all configuration options using the interactive Kconfig interface. See the -[Configuring nRF Connect examples](../guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect examples](./nrfconnect_examples_configuration.md) page for information about how to configure Kconfig options. In the configuration window, expand the items @@ -690,16 +690,16 @@ file containing all [factory data components](#factory-data-components) in any format and then implement a parser to read out all parameters and pass them to a provider. Each manufacturer can implement a factory data set on its own by implementing a parser and a factory data accessor inside the Matter stack. Use -the [nRF Connect Provider](../../src/platform/nrfconnect/FactoryDataProvider.h) -and [FactoryDataParser](../../src/platform/nrfconnect/FactoryDataParser.h) as +the [nRF Connect Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/nrfconnect/FactoryDataProvider.h) +and [FactoryDataParser](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/nrfconnect/FactoryDataParser.h) as examples. You can read the factory data set from the device's flash memory in different ways, depending on the purpose and the format. In the nRF Connect example, the factory data is stored in the CBOR format. The device uses the -[Factory Data Parser](../../src/platform/nrfconnect/FactoryDataParser.h) to read +[Factory Data Parser](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/nrfconnect/FactoryDataParser.h) to read out raw data, decode it, and store it in the `FactoryData` structure. The -[Factor Data Provider](../../src/platform/nrfconnect/FactoryDataProvider.c) +[Factor Data Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/nrfconnect/FactoryDataProvider.c) implementation uses this parser to get all needed factory data parameters and provide them to the Matter core. diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 9ac358b4ba..baf04adc28 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 9ac358b4baaad897545b01f2d616ffd51858914b +Subproject commit baf04adc28eff22f0b091d12ade659fb00f31414 diff --git a/zephyr/module.yml b/zephyr/module.yml new file mode 100644 index 0000000000..061408afa5 --- /dev/null +++ b/zephyr/module.yml @@ -0,0 +1,14 @@ +# +# Copyright (c) 2021 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +name: connectedhomeip + +build: + cmake: config/nrfconnect/chip-module + kconfig: config/nrfconnect/chip-module/Kconfig + depends: + - nrfxlib + - openthread