Skip to content

Commit 23e8e1d

Browse files
committed
1)Merge from master branch for testing
1 parent b27e1cd commit 23e8e1d

File tree

1,229 files changed

+58639
-16733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,229 files changed

+58639
-16733
lines changed

.flake8

-6
This file was deleted.

.github/.wordlist.txt

+8
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ EchoMessage
465465
EchoRequests
466466
EchoResponse
467467
EchoService
468+
ECW
468469
edaf
469470
edc
470471
EDR
@@ -740,6 +741,7 @@ kCase
740741
Kconfig
741742
kDacPublicKey
742743
KeypadInput
744+
keypair
743745
keyset
744746
kGroup
745747
kInvalidCommandId
@@ -886,6 +888,7 @@ mlan
886888
MLD
887889
mmevk
888890
moal
891+
Mobly
889892
ModeSelect
890893
modprobe
891894
Modustoolbox
@@ -950,6 +953,7 @@ nrfdks
950953
nrfutil
951954
nrfxlib
952955
NTAG
956+
NTP
953957
nullable
954958
nullptr
955959
NUM
@@ -1017,6 +1021,7 @@ OTBR
10171021
otcli
10181022
outform
10191023
outgoingCommands
1024+
overridable
10201025
OxygenConcentrationMeasurement
10211026
OzoneConcentrationMeasurement
10221027
PAA
@@ -1055,6 +1060,7 @@ perfetto
10551060
periodicQueryTimeout
10561061
pexpect
10571062
pickString
1063+
PICSCODE
10581064
PID
10591065
Pigweed
10601066
PinCode
@@ -1370,6 +1376,7 @@ TestGenExample
13701376
TestGroupDemoConfig
13711377
TestMultiRead
13721378
TestName
1379+
TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke
13731380
TESTPASSWD
13741381
TestPICS
13751382
TESTSSID
@@ -1438,6 +1445,7 @@ ttymxc
14381445
ttyUSB
14391446
TurbidityConcentrationMeasurement
14401447
TvCasting
1448+
TVOC
14411449
tvOS
14421450
TXD
14431451
txt

.github/actions/bootstrap-cache/action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Bootstrap cache
2-
description: Bootstrap cache
2+
description: Bootstrap cache (deprecated)
33
runs:
44
using: "composite"
55
steps:
6-
- uses: Wandalen/wretry.action@v1.3.0
6+
- uses: Wandalen/wretry.action@v1.4.10
77
name: Bootstrap cache
88
continue-on-error: true
99
with:

.github/actions/bootstrap/action.yaml

+49-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,56 @@ inputs:
55
description: "Platform name"
66
required: false
77
default: none
8+
bootstrap-log-name:
9+
description: "Bootstrap log name"
10+
required: false
11+
default: bootstrap-logs-${{ github.job }}
12+
outputs:
13+
cache-hit:
14+
description: "Bootstrap environment was restored from cache"
15+
value: ${{ fromJSON(steps.bootstrap-cache.outputs.outputs).cache-hit }} # retry returns all outputs in `outputs`
16+
817
runs:
918
using: "composite"
1019
steps:
11-
- name: Bootstrap
20+
- name: Calculate bootstrap cache key
21+
id: bootstrap-cache-key
22+
shell: bash
23+
run: |
24+
# Calculate bootstrap cache key
25+
# In addition to the various setup files, the work directory matters as well,
26+
# because the bootstrapped Pigweed environment contains absolute paths.
27+
FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}"
28+
FINAL_HASH="$(echo "$PWD:$FILES_HASH" | shasum -a 256 | cut -d' ' -f1)"
29+
echo "Calculated bootstrap cache key for '$PWD': $FINAL_HASH"
30+
echo "hash=$FINAL_HASH" >> "$GITHUB_OUTPUT"
31+
32+
- uses: Wandalen/wretry.action@v1.4.10
33+
name: Bootstrap from cache
34+
id: bootstrap-cache
35+
continue-on-error: true
36+
with:
37+
action: buildjet/cache@v4
38+
attempt_limit: 3
39+
attempt_delay: 2000
40+
with: |
41+
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.platform }}-${{ steps.bootstrap-cache-key.outputs.hash}}
42+
path: |
43+
.environment
44+
build_overrides/pigweed_environment.gni
45+
46+
- name: Run bootstrap
47+
if: fromJSON(steps.bootstrap-cache.outputs.outputs).cache-hit != 'true'
48+
env:
49+
PW_NO_CIPD_CACHE_DIR: Y
1250
shell: bash
13-
run: bash scripts/bootstrap.sh -p all,${{ inputs.platform }}
51+
run: source scripts/bootstrap.sh -p all,${{ inputs.platform }}
52+
53+
- name: Uploading bootstrap logs
54+
uses: actions/upload-artifact@v4
55+
if: always() && !env.ACT && fromJSON(steps.bootstrap-cache.outputs.outputs).cache-hit != 'true'
56+
with:
57+
name: ${{ inputs.bootstrap-log-name }}
58+
path: |
59+
.environment/gn_out/.ninja_log
60+
.environment/pigweed-venv/*.log

.github/actions/checkout-submodules-and-bootstrap/action.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
bootstrap-log-name:
1212
description: "Bootstrap log name"
1313
required: false
14-
default: bootstrap-logs
14+
default: bootstrap-logs-${{ github.job }}
1515
runs:
1616
using: "composite"
1717
steps:
@@ -26,18 +26,18 @@ runs:
2626
with:
2727
platform: ${{ inputs.platform }}
2828
extra-parameters: ${{ inputs.extra-submodule-parameters }}
29-
- name: Bootstrap Cache
30-
uses: ./.github/actions/bootstrap-cache
3129
- name: Bootstrap
3230
uses: ./.github/actions/bootstrap
33-
env:
34-
PW_NO_CIPD_CACHE_DIR: Y
3531
with:
3632
platform: ${{ inputs.platform }}
33+
bootstrap-log-name: ${{ inputs.bootstrap-log-name }}
3734
- name: Dump disk info after checkout submodule & Bootstrap
3835
shell: bash
3936
run: scripts/dump_diskspace_info.sh
40-
- name: Upload Bootstrap Logs
41-
uses: ./.github/actions/upload-bootstrap-logs
42-
with:
43-
bootstrap-log-name: ${{ inputs.bootstrap-log-name }}
37+
- name: Work around TSAN ASLR issues
38+
if: runner.os == 'Linux' && !env.ACT
39+
shell: bash
40+
run: |
41+
# See https://stackoverflow.com/a/77856955/2365113
42+
if [[ "$UID" == 0 ]]; then function sudo() { "$@"; }; fi
43+
sudo sysctl vm.mmap_rnd_bits=28

.github/actions/checkout-submodules/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
runs:
1212
using: "composite"
1313
steps:
14-
- uses: Wandalen/wretry.action@v1.3.0
14+
- uses: Wandalen/wretry.action@v1.4.10
1515
name: Checkout submodules
1616
with:
1717
command: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }}

.github/actions/maximize-runner-disk/action.yaml

+35-37
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,45 @@ runs:
44
using: "composite"
55
steps:
66
- name: Free up disk space on the github runner
7-
if: ${{ !env.ACT }}
7+
if: runner.os == 'Linux' && !env.ACT
88
shell: bash
99
run: |
1010
# maximize-runner-disk
11-
if [[ "$RUNNER_OS" == Linux ]]; then
12-
# Directories to prune to free up space. Candidates:
13-
# 1.6G /usr/share/dotnet
14-
# 1.1G /usr/local/lib/android/sdk/platforms
15-
# 1000M /usr/local/lib/android/sdk/build-tools
16-
# 8.9G /usr/local/lib/android/sdk
17-
# This list can be amended later to change the trade-off between the amount of
18-
# disk space freed up, and how long it takes to do so (deleting many files is slow).
19-
prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools)
11+
# Directories to prune to free up space. Candidates:
12+
# 1.6G /usr/share/dotnet
13+
# 1.1G /usr/local/lib/android/sdk/platforms
14+
# 1000M /usr/local/lib/android/sdk/build-tools
15+
# 8.9G /usr/local/lib/android/sdk
16+
# This list can be amended later to change the trade-off between the amount of
17+
# disk space freed up, and how long it takes to do so (deleting many files is slow).
18+
prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools)
2019
21-
if [[ "$UID" -eq 0 && -d /__w ]]; then
22-
root=/runner-root-volume
23-
if [[ ! -d "$root" ]]; then
24-
echo "Unable to maximize disk space, job is running inside a container and $root is not mounted"
25-
exit 0
26-
fi
27-
function sudo() { "$@"; } # we're already root (and sudo is probably unavailable)
28-
elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then
29-
root=
30-
else
31-
echo "Unable to maximize disk space, unknown runner environment"
20+
if [[ "$UID" -eq 0 && -d /__w ]]; then
21+
root=/runner-root-volume
22+
if [[ ! -d "$root" ]]; then
23+
echo "Unable to maximize disk space, job is running inside a container and $root is not mounted"
3224
exit 0
3325
fi
34-
35-
echo "Freeing up runner disk space on ${root:-/}"
36-
function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; }
37-
function now() { date '+%s'; }
38-
before="$(avail)" start="$(now)"
39-
for dir in "${prune[@]}"; do
40-
if [[ -d "${root}${dir}" ]]; then
41-
echo "- $dir"
42-
# du -sh -- "${root}${dir}"
43-
sudo rm -rf -- "${root}${dir}"
44-
else
45-
echo "- $dir (not found)"
46-
fi
47-
done
48-
after="$(avail)" end="$(now)"
49-
echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds."
26+
function sudo() { "$@"; } # we're already root (and sudo is probably unavailable)
27+
elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then
28+
root=
29+
else
30+
echo "Unable to maximize disk space, unknown runner environment"
31+
exit 0
5032
fi
33+
34+
echo "Freeing up runner disk space on ${root:-/}"
35+
function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; }
36+
function now() { date '+%s'; }
37+
before="$(avail)" start="$(now)"
38+
for dir in "${prune[@]}"; do
39+
if [[ -d "${root}${dir}" ]]; then
40+
echo "- $dir"
41+
# du -sh -- "${root}${dir}"
42+
sudo rm -rf -- "${root}${dir}"
43+
else
44+
echo "- $dir (not found)"
45+
fi
46+
done
47+
after="$(avail)" end="$(now)"
48+
echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds."

.github/actions/perform-codeql-analysis/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
with:
2828
sarif_file: "sarif-results/${{ inputs.language }}.sarif"
2929
- name: Upload loc as a Build Artifact
30-
uses: actions/upload-artifact@v2.2.0
30+
uses: actions/upload-artifact@v4
3131
with:
3232
name: sarif-results
3333
path: sarif-results

.github/actions/upload-bootstrap-logs/action.yaml

-18
This file was deleted.

.github/actions/upload-size-reports/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
using: "composite"
1010
steps:
1111
- name: Uploading Size Reports
12-
uses: actions/upload-artifact@v3
12+
uses: actions/upload-artifact@v4
1313
if: ${{ !env.ACT }}
1414
with:
1515
name: Size,${{ inputs.platform-name }}-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }}

.github/workflows/bloat_check.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
name: Bloat Check
1616
on:
17+
workflow_dispatch:
1718
schedule:
1819
- cron: "*/5 * * * *"
1920

@@ -33,7 +34,7 @@ jobs:
3334
runs-on: ubuntu-latest
3435

3536
container:
36-
image: ghcr.io/project-chip/chip-build:35
37+
image: ghcr.io/project-chip/chip-build:41
3738

3839
steps:
3940
- name: Checkout

.github/workflows/build.yaml

+7-13
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if: github.actor != 'restyled-io[bot]'
4141

4242
container:
43-
image: ghcr.io/project-chip/chip-build:35
43+
image: ghcr.io/project-chip/chip-build:41
4444
volumes:
4545
- "/:/runner-root-volume"
4646
- "/tmp/log_output:/tmp/test_logs"
@@ -136,7 +136,7 @@ jobs:
136136
if: github.actor != 'restyled-io[bot]'
137137

138138
container:
139-
image: ghcr.io/project-chip/chip-build:35
139+
image: ghcr.io/project-chip/chip-build:41
140140
volumes:
141141
- "/:/runner-root-volume"
142142
- "/tmp/log_output:/tmp/test_logs"
@@ -223,6 +223,7 @@ jobs:
223223
run: |
224224
./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
225225
mv scripts/codegen.py scripts/codegen.py.renamed
226+
mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed
226227
- name: Clean output
227228
run: rm -rf ./out
228229
- name: Build using build_examples.py (pregen)
@@ -234,18 +235,11 @@ jobs:
234235
--pregen-dir ./zzz_pregenerated \
235236
build \
236237
"
237-
- name: Check no code generation in output
238-
run: |
239-
CNT=$(find out -name "CHIPClusters.h" | wc -l)
240-
if [ "${CNT}" != "0" ]; then
241-
echo "ERROR: found unexpected generated files:"
242-
find out -name "CHIPClusters.h"
243-
exit 1
244-
fi
245238
- name: Undo code pre-generation changes (make compile time codegen work again)
246239
run: |
247240
rm -rf ./zzz_pregenerated
248241
mv scripts/codegen.py.renamed scripts/codegen.py
242+
mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py
249243
- name: Run fake linux tests with build_examples
250244
run: |
251245
./scripts/run_in_build_env.sh \
@@ -285,7 +279,7 @@ jobs:
285279
if: github.actor != 'restyled-io[bot]'
286280

287281
container:
288-
image: ghcr.io/project-chip/chip-build:35
282+
image: ghcr.io/project-chip/chip-build:41
289283
volumes:
290284
- "/:/runner-root-volume"
291285
- "/tmp/log_output:/tmp/test_logs"
@@ -346,7 +340,7 @@ jobs:
346340
if: github.actor != 'restyled-io[bot]'
347341

348342
container:
349-
image: ghcr.io/project-chip/chip-build:35
343+
image: ghcr.io/project-chip/chip-build:41
350344
volumes:
351345
- "/:/runner-root-volume"
352346
- "/tmp/log_output:/tmp/test_logs"
@@ -455,7 +449,7 @@ jobs:
455449
if: github.actor != 'restyled-io[bot]'
456450

457451
container:
458-
image: ghcr.io/project-chip/chip-build:35
452+
image: ghcr.io/project-chip/chip-build:41
459453
volumes:
460454
- "/:/runner-root-volume"
461455
- "/tmp/log_output:/tmp/test_logs"

0 commit comments

Comments
 (0)