Skip to content

Commit

Permalink
Merge branch 'master' into patch-9
Browse files Browse the repository at this point in the history
  • Loading branch information
lboue authored Mar 18, 2024
2 parents 28a0857 + d2eab7f commit 28ad5e6
Show file tree
Hide file tree
Showing 345 changed files with 13,814 additions and 3,800 deletions.
6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,7 @@ ttymxc
ttyUSB
TurbidityConcentrationMeasurement
TvCasting
TVOC
tvOS
TXD
txt
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/bootstrap-cache/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Bootstrap cache
runs:
using: "composite"
steps:
- uses: Wandalen/wretry.action@v1.3.0
- uses: Wandalen/wretry.action@v1.4.10
name: Bootstrap cache
continue-on-error: true
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
bootstrap-log-name:
description: "Bootstrap log name"
required: false
default: bootstrap-logs
default: bootstrap-logs-${{ github.job }}
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -41,3 +41,10 @@ runs:
uses: ./.github/actions/upload-bootstrap-logs
with:
bootstrap-log-name: ${{ inputs.bootstrap-log-name }}
- name: Work around TSAN ASLR issues
if: runner.os == 'Linux' && !env.ACT
shell: bash
run: |
# See https://stackoverflow.com/a/77856955/2365113
if [[ "$UID" == 0 ]]; then function sudo() { "$@"; }; fi
sudo sysctl vm.mmap_rnd_bits=28
2 changes: 1 addition & 1 deletion .github/actions/checkout-submodules/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: Wandalen/wretry.action@v1.3.0
- uses: Wandalen/wretry.action@v1.4.10
name: Checkout submodules
with:
command: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }}
Expand Down
72 changes: 35 additions & 37 deletions .github/actions/maximize-runner-disk/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,45 @@ runs:
using: "composite"
steps:
- name: Free up disk space on the github runner
if: ${{ !env.ACT }}
if: runner.os == 'Linux' && !env.ACT
shell: bash
run: |
# maximize-runner-disk
if [[ "$RUNNER_OS" == Linux ]]; then
# Directories to prune to free up space. Candidates:
# 1.6G /usr/share/dotnet
# 1.1G /usr/local/lib/android/sdk/platforms
# 1000M /usr/local/lib/android/sdk/build-tools
# 8.9G /usr/local/lib/android/sdk
# This list can be amended later to change the trade-off between the amount of
# disk space freed up, and how long it takes to do so (deleting many files is slow).
prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools)
# Directories to prune to free up space. Candidates:
# 1.6G /usr/share/dotnet
# 1.1G /usr/local/lib/android/sdk/platforms
# 1000M /usr/local/lib/android/sdk/build-tools
# 8.9G /usr/local/lib/android/sdk
# This list can be amended later to change the trade-off between the amount of
# disk space freed up, and how long it takes to do so (deleting many files is slow).
prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools)
if [[ "$UID" -eq 0 && -d /__w ]]; then
root=/runner-root-volume
if [[ ! -d "$root" ]]; then
echo "Unable to maximize disk space, job is running inside a container and $root is not mounted"
exit 0
fi
function sudo() { "$@"; } # we're already root (and sudo is probably unavailable)
elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then
root=
else
echo "Unable to maximize disk space, unknown runner environment"
if [[ "$UID" -eq 0 && -d /__w ]]; then
root=/runner-root-volume
if [[ ! -d "$root" ]]; then
echo "Unable to maximize disk space, job is running inside a container and $root is not mounted"
exit 0
fi
echo "Freeing up runner disk space on ${root:-/}"
function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; }
function now() { date '+%s'; }
before="$(avail)" start="$(now)"
for dir in "${prune[@]}"; do
if [[ -d "${root}${dir}" ]]; then
echo "- $dir"
# du -sh -- "${root}${dir}"
sudo rm -rf -- "${root}${dir}"
else
echo "- $dir (not found)"
fi
done
after="$(avail)" end="$(now)"
echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds."
function sudo() { "$@"; } # we're already root (and sudo is probably unavailable)
elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then
root=
else
echo "Unable to maximize disk space, unknown runner environment"
exit 0
fi
echo "Freeing up runner disk space on ${root:-/}"
function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; }
function now() { date '+%s'; }
before="$(avail)" start="$(now)"
for dir in "${prune[@]}"; do
if [[ -d "${root}${dir}" ]]; then
echo "- $dir"
# du -sh -- "${root}${dir}"
sudo rm -rf -- "${root}${dir}"
else
echo "- $dir (not found)"
fi
done
after="$(avail)" end="$(now)"
echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds."
2 changes: 1 addition & 1 deletion .github/actions/perform-codeql-analysis/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
with:
sarif_file: "sarif-results/${{ inputs.language }}.sarif"
- name: Upload loc as a Build Artifact
uses: actions/upload-artifact@v2.2.0
uses: actions/upload-artifact@v4
with:
name: sarif-results
path: sarif-results
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/upload-bootstrap-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ inputs:
bootstrap-log-name:
description: "Bootstrap log name"
required: false
default: bootstrap-logs
default: bootstrap-logs-${{ github.job }}
runs:
using: "composite"
steps:
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() && !env.ACT }}
with:
name: ${{ inputs.bootstrap-log-name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-size-reports/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
using: "composite"
steps:
- name: Uploading Size Reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ !env.ACT }}
with:
name: Size,${{ inputs.platform-name }}-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Get Cirque Bootstrap cache key
id: cirque-bootstrap-cache-key
run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT
- uses: Wandalen/[email protected].5
- uses: Wandalen/[email protected].10
name: Cirque Bootstrap cache
if: ${{ !env.ACT }}
continue-on-error: true
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
# Disable availability annotations, since we are not building a system
# Matter.framework.
run: xcodebuild -target "Matter" -sdk watchos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
- name: Run tvOS Build Debug
working-directory: src/darwin/Framework
# Disable availability annotations, since we are not building a system
# Matter.framework.
run: xcodebuild -target "Matter" -sdk appletvos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
- name: Run iOS Build Debug
working-directory: src/darwin/Framework
# Disable availability annotations, since we are not building a system
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:35
image: ghcr.io/project-chip/chip-build:39

steps:
- name: Checkout
Expand Down Expand Up @@ -267,12 +267,11 @@ jobs:
run: |
git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
# Run python Linter (flake8) and verify python files
# ignore some style errors, restyler should do that
- name: Check for errors using flake8 Python linter
# Run ruff python linter
- name: Check for errors using ruff Python linter
if: always()
run: |
flake8 --extend-ignore=E501,W391
ruff check
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
build \
"
- name: Run all tests
# Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/32587
if: false
run: |
src/test_driver/esp32/run_qemu_image.py \
--verbose \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit_integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: linux
bootstrap-log-name: bootstrap-logs-unittest-${{ matrix.type }}
- name: Artifact suffix
id: outsuffix
uses: haya14busa/action-cond@v1
Expand Down
2 changes: 2 additions & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ restylers:
command:
- autopep8
- "--in-place"
- "--max-line-length"
- "132"
arguments: []
include:
- "**/*.py"
Expand Down
11 changes: 11 additions & 0 deletions config/openiotsdk/chip-gn/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")

# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"
Expand All @@ -26,4 +27,14 @@ default_args = {
target_os = "cmsis-rtos"

import("${chip_root}/config/openiotsdk/chip-gn/args.gni")

pw_sys_io_BACKEND = dir_pw_sys_io_stdio

pw_assert_BACKEND = dir_pw_assert_log
pw_log_BACKEND = dir_pw_log_basic

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
"$dir_pw_log:impl",
]
}
5 changes: 4 additions & 1 deletion config/openiotsdk/chip-gn/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ group("openiotsdk") {
deps = [ "${chip_root}/src/lib" ]

if (chip_build_tests) {
deps += [ "${chip_root}/src:tests" ]
deps += [
"${chip_root}/src:tests",
"${chip_root}/src/lib/support:pw_tests_wrapper",
]
}
}

Expand Down
Loading

0 comments on commit 28ad5e6

Please sign in to comment.