Skip to content

Commit

Permalink
Merge branch 'master' into add_support_for_async_bdx_transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
nivi-apple authored Oct 24, 2024
2 parents 47562e4 + 1febc9b commit 4029261
Show file tree
Hide file tree
Showing 1,753 changed files with 136,403 additions and 184,003 deletions.
6 changes: 6 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ isUpperCase
itemName
iterable
itsfoss
IW
JDK
jinja
JLink
Expand Down Expand Up @@ -893,6 +894,7 @@ microcontroller
microcontrollers
MicroSD
middleware
MIMXRT
minApplicableSoftwareVersion
Minicom
MinInterval
Expand Down Expand Up @@ -924,6 +926,7 @@ Multicast
multilib
Multiprotocol
multithreaded
Murata
mutex
mutexes
mv
Expand Down Expand Up @@ -1006,6 +1009,7 @@ OpenThreadDemo
openweave
OperationalCredentials
operationalDataset
operationalstate
opkg
OPTIGA
optionMask
Expand Down Expand Up @@ -1451,6 +1455,8 @@ trackFree
TransferSession
transitionTime
TransportMgrBase
triaged
triaging
TriggerEffect
TRNG
trustm
Expand Down
14 changes: 12 additions & 2 deletions .github/issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ darwin:
# (?![a-z]) means "there is no next char in the range a-z".
- "/(\\b[Ii][Oo][Ss](?![a-zA-Z])|[Hh][Oo][Mm][Ee][Pp][Oo][Dd]|[Dd][Aa][Rr][Ww][Ii][Nn]|\\bm[Aa][Cc]\\b|\\bMa[Cc]\\b|\\bM[Aa]c\\b|[Mm][Aa][Cc][Oo][Ss])/"

linux:
- "/(linux)/i"

# NOTE:
# Linux intentionally disabled: most people compile either on linux or darwin and
# as a result a lot of issues get tagged as such even though they are not platform specific
# (e.g. we get test case failures reported as linux even though they are just normal
# test runs)
#
# Linux label should be reserved to platform-specific problems (usually bootstrap/packages
# or integration with wifi/ethernet/bluetootn/etc.)
#
# linux:
# - "/(linux)/i"

# Special Keywords for Cert Blockers
air purifiers:
Expand Down
28 changes: 25 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,38 +275,54 @@ darwin:
silabs:
- changed-files:
- any-glob-to-any-file:
- examples/platform/silabs/*
- examples/platform/silabs/**/*
- src/platform/silabs/*
- src/platform/silabs/**/*
- src/test_driver/efr32/*
- src/test_driver/efr32/**/*

esp32:
- changed-files:
- any-glob-to-any-file:
- examples/platform/esp32/*
- examples/platform/esp32/**/*
- src/platform/ESP32/*
- src/platform/ESP32/**/*
- src/test_driver/esp32/*
- src/test_driver/esp32/**/*

freeRTOS:
- changed-files:
- any-glob-to-any-file:
- src/platform/FreeRTOS/*
- src/platform/FreeRTOS/**/*

k32w:
nxp:
- changed-files:
- any-glob-to-any-file:
- src/platform/K32W/*
- src/platform/K32W/**/*
- examples/platform/nxp/*
- examples/platform/nxp/**/*
- src/platform/nxp/*
- src/platform/nxp/**/*

linux:
- changed-files:
- any-glob-to-any-file:
- examples/platform/linux/*
- examples/platform/linux/**/*
- src/platform/Linux/*
- src/platform/Linux/**/*

nrf connect:
- changed-files:
- any-glob-to-any-file:
- examples/platform/nrfconnect/*
- examples/platform/nrfconnect/**/*
- src/platform/nrfconnect/*
- src/platform/nrfconnect/**/*
- src/test_driver/nrfconnect/*
- src/test_driver/nrfconnect/**/*

openthread:
- changed-files:
Expand All @@ -323,11 +339,17 @@ zephyr:
telink:
- changed-files:
- any-glob-to-any-file:
- examples/platform/telink/*
- examples/platform/telink/**/*
- src/platform/telink/*
- src/platform/telink/**/*

tizen:
- changed-files:
- any-glob-to-any-file:
- examples/platform/tizen/*
- examples/platform/tizen/**/*
- src/platform/Tizen/*
- src/platform/Tizen/**/*
- src/test_driver/tizen/*
- src/test_driver/tizen/**/*
68 changes: 50 additions & 18 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ jobs:
run: echo "$CONCURRENCY_CONTEXT"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
persist-credentials: true
- name: Try to ensure the directories for core dumping exist and we
can write them.
run: |
Expand Down Expand Up @@ -186,6 +189,10 @@ jobs:
- name: Clean output
run: rm -rf ./out
- name: Run Tests with sanitizers
# Sanitizer tests are not likely to find extra issues so running the same tests
# as above repeatedly on every pull request seems extra time. Instead keep this run
# for master only
if: github.event.pull_request.number == null
env:
LSAN_OPTIONS: detect_leaks=1
run: |
Expand All @@ -201,17 +208,34 @@ jobs:
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh
done
- name: Generate tests with sanitizers (for tidy)
if: github.event.pull_request.number != null
run: |
rm -rf ./out/sanitizers
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="is_clang=true is_asan=true chip_data_model_check_die_on_failure=true" --export-compile-commands
- name: Ensure codegen is done for sanitize
run: |
./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/sanitizers"
- name: Find changed files
id: changed-files
uses: tj-actions/changed-files@v45
- name: Clang-tidy validation
# NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check.
# See https://github.com/llvm/llvm-project/issues/97426
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
touch out/changed_files.txt
for file in ${ALL_CHANGED_FILES}; do
echo "$file changed and will be considered for tidy"
echo "$file" >>out/changed_files.txt
done
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--compile-database out/sanitizers/compile_commands.json \
--file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|-ReadImpl|-InvokeSubscribeImpl|CodegenDataModel_Write|QuieterReporting' \
--file-list-file out/changed_files.txt \
check \
"
- name: Clean output
Expand Down Expand Up @@ -375,13 +399,16 @@ jobs:
scripts/build_python_device.sh --chip_detail_logging true
build_darwin:
name: Build on Darwin (clang, python_lib, simulated)
name: Build on Darwin (clang, simulated)
runs-on: macos-13
if: github.actor != 'restyled-io[bot]'

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
persist-credentials: true
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
Expand All @@ -402,37 +429,42 @@ jobs:
CHIP_ROOT_PATH=examples/placeholder/linux
CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS"
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
- name: Setup Build, Run Build and Run Tests
- name: Setup Build, Run Build and Run Tests (asan + target_os=all)
# We can't enable leak checking here in LSAN_OPTIONS, because on
# Darwin that's only supported with a new enough clang, and we're
# not building with the pigweed clang here.
env:
BUILD_TYPE: default
run: |
for BUILD_TYPE in default python_lib; do
case $BUILD_TYPE in
# We want to build various standalone example apps
# (similar to what examples-linux-standalone.yaml
# does), so use target_os="all" to get those picked
# up as part of the "unified" build. But then to
# save CI resources we want to exclude the
# "host clang" build, which uses the pigweed
# clang.
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';;
esac
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh
done
- name: Ensure codegen is done for sanitize
# We want to build various standalone example apps (similar to what examples-linux-standalone.yaml
# does), so use target_os="all" to get those picked up as part of the "unified" build. But then
# to save CI resources we want to exclude the "host clang" build, which uses the pigweed clang.
scripts/build/gn_gen.sh --args='target_os="all" is_asan=true enable_host_clang_build=false chip_data_model_check_die_on_failure=true' --export-compile-commands
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
scripts/tests/gn_tests.sh
- name: Ensure codegen is done for default
run: |
./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/default"
- name: Find changed files
id: changed-files
uses: tj-actions/changed-files@v45
- name: Clang-tidy validation
# NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check.
# See https://github.com/llvm/llvm-project/issues/97426
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
touch out/changed_files.txt
for file in ${ALL_CHANGED_FILES}; do
echo "$file changed and will be considered for tidy"
echo "$file" >>out/changed_files.txt
done
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--compile-database out/default/compile_commands.json \
--file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|CodegenDataModel_Write|QuieterReporting' \
--file-list-file out/changed_files.txt \
check \
"
- name: Uploading diagnostic logs
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/cancel_workflows_for_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright (c) 2024 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: Cancel workflows on failing CI
on:
workflow_dispatch:
schedule:
- cron: "*/10 * * * *"

jobs:
cancel_workflow:
name: Cancel CI on failing pull requests

runs-on: ubuntu-latest

# Don't run on forked repos
if: github.repository_owner == 'project-chip'

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup pip modules we use
run: |
pip install \
click \
coloredlogs \
python-dateutil \
pygithub \
&& echo "DONE installint python prerequisites"
- name: Cancel runs
run: |
scripts/tools/cancel_workflows_for_pr.py \
--gh-api-token "${{ secrets.GITHUB_TOKEN }}" \
--require "Restyled" \
--require "Lint Code Base" \
--require "ZAP" \
--require "Run misspell" \
--max-pr-age-minutes 20
4 changes: 4 additions & 0 deletions .github/workflows/cert_test_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
pull_request:
paths:
- "src/app/tests/suites/certification/**"
permissions:
contents: read

jobs:
check-certification-tests:
Expand All @@ -30,6 +32,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run checks
run: |
python3 scripts/tests/matter_yaml_linter.py
4 changes: 4 additions & 0 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ jobs:
platform: darwin
bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}

- name: Build iOS Darwin Framework Tool Build Debug
working-directory: src/darwin/Framework
run: xcodebuild -target "darwin-framework-tool" -sdk iphoneos -configuration Debug AD_HOC_CODE_SIGNING_ALLOWED=YES

- name: Run macOS Darwin Framework Tool Build Debug
working-directory: src/darwin/Framework
run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug
Expand Down
Loading

0 comments on commit 4029261

Please sign in to comment.