Skip to content

Commit

Permalink
Merge branch 'master' into yamltests-chip-repl-enum-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson committed Jan 16, 2023
2 parents fd59350 + 2f0c9ab commit 0124265
Show file tree
Hide file tree
Showing 920 changed files with 47,505 additions and 19,785 deletions.
72 changes: 48 additions & 24 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,24 +282,6 @@ jobs:
# # objdirs are big; don't hold on to them too long.
# retention-days: 5

# TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227
# TODO https://github.com/project-chip/connectedhomeip/issues/1512
# - name: Run Code Coverage
# if: ${{ contains('main', env.BUILD_TYPE) }}
# run: scripts/tools/codecoverage.sh
# - name: Upload Code Coverage
# if: ${{ contains('main', env.BUILD_TYPE) }}
# run: bash <(curl -s https://codecov.io/bash)
# - name: Remove third_party binaries for CodeQL Analysis
# run: find out -type d -name "third_party" -exec rm -rf {} +
# - name: Remove dbus binaries for CodeQL Analysis
# run: find out -type d -name "dbus" -exec rm -rf {} +
# - name: Remove nrfxlib binaries for CodeQL Analysis
# run: find . -type d -name "nrfxlib" -exec rm -rf {} +
# - name: Perform CodeQL Analysis
# if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }}
# uses: github/codeql-action/analyze@v1

build_linux_python_lib:
name: Build on Linux (python_lib)
timeout-minutes: 60
Expand Down Expand Up @@ -350,6 +332,13 @@ jobs:
scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/chip_repl-0.0-py3-none-any.whl'
scripts/run_in_build_env.sh '(cd src/controller/python/test/unit_tests/ && python3 -m unittest -v)'
- name: Run Python Setup Payload Generator Test
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/'
scripts/run_in_build_env.sh 'pip3 install -r src/setup_payload/python/requirements.txt'
scripts/run_in_build_env.sh 'python3 src/setup_payload/tests/run_python_setup_payload_gen_test.py out/chip-tool'
build_darwin:
name: Build on Darwin (clang, python_lib, simulated)
timeout-minutes: 200
Expand Down Expand Up @@ -449,9 +438,44 @@ jobs:
# uses: github/codeql-action/analyze@v1
# TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227
# TODO https://github.com/project-chip/connectedhomeip/issues/1512
# - name: Run Code Coverage
# if: ${{ contains('main', env.BUILD_TYPE) }}
# run: scripts/tools/codecoverage.sh
# - name: Upload Code Coverage
# if: ${{ contains('main', env.BUILD_TYPE) }}
# run: bash <(curl -s https://codecov.io/bash)

build_linux_gcc_coverage:
name: Build on Linux (coverage)
timeout-minutes: 85

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

container:
image: connectedhomeip/chip-build:0.6.30
volumes:
- "/tmp/log_output:/tmp/test_logs"
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"

steps:
- uses: Wandalen/wretry.action@v1.0.36
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 --platform linux
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v3
if: ${{ always() && !env.ACT }}
with:
name: bootstrap-logs
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Run Build Coverage
timeout-minutes: 20
run: ./scripts/build_coverage.sh

3 changes: 1 addition & 2 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
# TODO: update this to connectedhomeip/chip-build-vscode:0.6.30 once we can compile with latest NRF
image: connectedhomeip/chip-build-nrf-platform:0.6.18
image: connectedhomeip/chip-build-nrf-platform:0.6.30
options: --user root

steps:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/docbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Documentation Build

on:
push:
branches:
- master

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v2
with:
path: matter
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip
- name: Install base dependencies
working-directory: matter
run: |
sudo pip3 install -U pip
pip3 install -r docs/requirements.txt
- name: Build documentation
working-directory: matter/docs
run: |
mkdir -p _build/src
make html
touch _build/html/.nojekyll
- name: Deploy to gh-pages
if: 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: matter/docs/_build/html
# Keep only the latest version of the documentation
force_orphan: true
6 changes: 3 additions & 3 deletions .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Update nRF Connect SDK revision to the currently recommended.
- name: Check nRF Connect SDK revision.
timeout-minutes: 15
run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --update --shallow"
run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --check"
- 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"
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
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'
if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
run: |
scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:0.6.18
image: connectedhomeip/chip-build:0.6.27

steps:
- uses: Wandalen/wretry.action@v1.0.36
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Java Mattter Controller and all clusters app
- name: Build Java Matter Controller and all clusters app
timeout-minutes: 50
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
Expand All @@ -463,7 +463,7 @@ jobs:
build \
"
- name: Run Discover Tests
timeout-minutes: 65
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
'./scripts/tests/run_java_test.py \
Expand All @@ -475,7 +475,7 @@ jobs:
--factoryreset \
'
- name: Run Pairing Tests
timeout-minutes: 65
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
'./scripts/tests/run_java_test.py \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zap_regeneration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

runs-on: ubuntu-20.04
container:
image: connectedhomeip/chip-build:0.6.30
image: connectedhomeip/chip-build:0.6.31
defaults:
run:
shell: sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zap_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

runs-on: ubuntu-20.04
container:
image: connectedhomeip/chip-build:0.6.30
image: connectedhomeip/chip-build:0.6.31
defaults:
run:
shell: sh
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ __pycache__
# Doxygen outputs
docs/html

# Python venv
.venv

# Documentation
docs/_build

# VSCode java extensions
.project

Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@
[submodule "bouffalolab_sdk"]
path = third_party/bouffalolab/repo
url = https://github.com/bouffalolab/bl_iot_sdk_tiny.git
branch = main
platforms = bouffalolab
branch = main
platforms = bouffalolab
[submodule "third_party/libwebsockets/repo"]
path = third_party/libwebsockets/repo
url = https://github.com/warmcat/libwebsockets
platforms = linux,darwin
platforms = linux,darwin
6 changes: 5 additions & 1 deletion .spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ matrix:
# ```python
# content
# ```
- open: '(?s)^(?P<open> *`{3,})[a-z]*$'
#
# Allow MyST extended syntax like:
# ```{include} my/file.md
# ```
- open: '(?s)^(?P<open> *`{3,})([a-z]*$|{[a-z]*?}\s*[^\n]*?$)'
close: '^(?P=open)$'
# Ignore text between inline back ticks
- open: '(?P<open>`+)'
Expand Down
4 changes: 3 additions & 1 deletion build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ if (_chip_defaults.custom_toolchain != "") {
}

_default_toolchain = "${_build_overrides.build_root}/toolchain/linux:linux_${target_cpu}_${_target_compiler}"
} else if (target_os == host_os && target_cpu == host_cpu) {
} else if (target_os == host_os &&
(target_cpu == host_cpu ||
(target_cpu == "arm64e" && host_cpu == "arm64"))) {
_default_toolchain = host_toolchain
} else if (target_os == "freertos") {
if (_chip_defaults.is_clang) {
Expand Down
2 changes: 1 addition & 1 deletion config/nrfconnect/.nrfconnect-recommended-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.1.1
v2.2.0
28 changes: 18 additions & 10 deletions config/nrfconnect/app/check-nrfconnect-version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@
# limitations under the License.
#

find_package(Python3 REQUIRED)
# This function is only needed to prevent find_package from polluting the global
# variable namespace before loading Zephyr CMake module. Without this workaround
# the build may fail because Zephyr calls find_package(Python3) with different
# constraints and CMake is not able to handle such a scenario.
function(check_nrfconnect_version)
find_package(Python3 REQUIRED)

# Check nRF Connect SDK version in the CMake configuration phase
execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../../..
COMMAND ${Python3_EXECUTABLE} scripts/setup/nrfconnect/update_ncs.py --check --quiet)
# Check nRF Connect SDK version in the CMake configuration phase
execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../../..
COMMAND ${Python3_EXECUTABLE} scripts/setup/nrfconnect/update_ncs.py --check --quiet)

# Check nRF Connect SDK version in the build phase
add_custom_target(check-nrfconnect-version ALL
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../../..
COMMAND ${Python3_EXECUTABLE} scripts/setup/nrfconnect/update_ncs.py --check --quiet || (exit 0)
USES_TERMINAL)
# Check nRF Connect SDK version in the build phase
add_custom_target(check-nrfconnect-version ALL
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../../..
COMMAND ${Python3_EXECUTABLE} scripts/setup/nrfconnect/update_ncs.py --check --quiet || (exit 0)
USES_TERMINAL)
endfunction()

check_nrfconnect_version()
3 changes: 3 additions & 0 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ set(CHIP_GN_ROOT_TARGET ${CHIP_ROOT}/config/nrfconnect/chip-gn)

# Prepare compiler flags

list(APPEND CHIP_CFLAGS -D_DEFAULT_SOURCE)

if (CONFIG_ARM)
list(APPEND CHIP_CFLAGS_C
--specs=nosys.specs
Expand Down Expand Up @@ -309,6 +311,7 @@ add_dependencies(chip-gn kernel)

zephyr_interface_library_named(chip)
target_compile_definitions(chip INTERFACE CHIP_HAVE_CONFIG_H)
target_compile_definitions(chip INTERFACE _DEFAULT_SOURCE)
target_include_directories(chip INTERFACE
${CHIP_ROOT}/src
${CHIP_ROOT}/src/include
Expand Down
18 changes: 9 additions & 9 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ config MAIN_STACK_SIZE
config INIT_STACKS
default y

# Disable certain parts of Zephyr IPv6 stack
config NET_IPV6_NBR_CACHE
default n

config NET_IPV6_MLD
default y

Expand Down Expand Up @@ -121,7 +117,9 @@ config BT_DEVICE_NAME_MAX
default 15

config BT_MAX_CONN
default 1
default 2 # a workaround for non-unreferenced BLE connection object
# when restaring the BLE advertising in disconnect callback
# TODO: analyze and revert to 1 if proper fix exists

config BT_L2CAP_TX_MTU
default 247
Expand Down Expand Up @@ -189,6 +187,11 @@ config NET_L2_OPENTHREAD

if NET_L2_OPENTHREAD

# Disable certain parts of Zephyr IPv6 stack
config NET_IPV6_NBR_CACHE
bool
default n

# Increase the default RX stack size
config IEEE802154_NRF5_RX_STACK_SIZE
default 1024
Expand All @@ -204,7 +207,7 @@ config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
default n

config SYSTEM_WORKQUEUE_STACK_SIZE
default 1120
default 2048

# align these numbers to match the OpenThread config
config NET_IF_UNICAST_IPV6_ADDR_COUNT
Expand Down Expand Up @@ -319,9 +322,6 @@ config MBEDTLS_GCM_C
config MBEDTLS_RSA_C
default n

config PSA_WANT_KEY_TYPE_ARIA
default n

config PSA_WANT_KEY_TYPE_CHACHA20
default n

Expand Down
1 change: 1 addition & 0 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ menuconfig CHIP
select CPLUSPLUS
imply LIB_CPLUSPLUS
imply REQUIRES_FULL_LIBC
imply NEWLIB_LIBC_NANO
imply CBPRINTF_LIBC_SUBSTS
imply POSIX_API if !ARCH_POSIX
imply EVENTFD if !ARCH_POSIX
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ INPUT = README.md \
docs/guides/BUILDING.md \
docs/VSCODE_DEVELOPMENT.md \
docs/PROJECT_FLOW.md \
docs/STYLE_GUIDE.md \
docs/style/style_guide.md \
src/ble \
src/controller \
src/crypto \
Expand Down
Loading

0 comments on commit 0124265

Please sign in to comment.