Skip to content

Commit fc26192

Browse files
Merge branch 'master' into Set-3-20-24
2 parents 91f776a + f1abb59 commit fc26192

File tree

326 files changed

+11126
-11790
lines changed

Some content is hidden

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

326 files changed

+11126
-11790
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bootstrap cache
2-
description: Bootstrap cache
2+
description: Bootstrap cache (deprecated)
33
runs:
44
using: "composite"
55
steps:

.github/actions/bootstrap/action.yaml

+66-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,73 @@ 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.restore.outputs.outputs).cache-hit }} # dynamic action returns all outputs in `outputs`
16+
817
runs:
918
using: "composite"
1019
steps:
11-
- name: Bootstrap
20+
- name: Determine bootstrap cache configuration
21+
id: prepare
22+
shell: bash
23+
run: |
24+
# Determine bootstrap cache configuration
25+
# In addition to the various setup files, the work directory matters as well,
26+
# because the bootstrapped Pigweed environment contains absolute paths.
27+
echo "Calculating bootstrap cache key for '$PWD'"
28+
FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}"
29+
FINAL_HASH="$(echo "$PWD:$FILES_HASH" | shasum -a 256 | cut -d' ' -f1)"
30+
echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT"
31+
32+
# Split caches across backends
33+
case "$RUNNER_OS" in
34+
macOS) echo backend=actions;;
35+
*) echo backend=buildjet;;
36+
esac | tee -a "$GITHUB_OUTPUT"
37+
38+
- name: Bootstrap from cache
39+
id: restore
40+
uses: ./.github/actions/dynamic
41+
continue-on-error: true
42+
with:
43+
action: ${{ steps.prepare.outputs.backend }}/cache/restore@v4
44+
with: |
45+
key: ${{ steps.prepare.outputs.key }}
46+
path: |
47+
.environment
48+
build_overrides/pigweed_environment.gni
49+
50+
- name: Run bootstrap
51+
if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
52+
env:
53+
PW_NO_CIPD_CACHE_DIR: 1
54+
PW_ENVSETUP_NO_BANNER: 1
1255
shell: bash
13-
run: bash scripts/bootstrap.sh -p all,${{ inputs.platform }}
56+
run: source scripts/bootstrap.sh -p all,${{ inputs.platform }}
57+
58+
- name: Save bootstrap cache
59+
uses: ./.github/actions/dynamic
60+
if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
61+
continue-on-error: true
62+
with:
63+
action: ${{ steps.prepare.outputs.backend }}/cache/save@v4
64+
with: |
65+
key: ${{ steps.prepare.outputs.key }}
66+
path: |
67+
.environment
68+
build_overrides/pigweed_environment.gni
69+
70+
- name: Upload bootstrap logs
71+
uses: actions/upload-artifact@v4
72+
if: ${{ always() && !env.ACT && fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
73+
with:
74+
name: ${{ inputs.bootstrap-log-name }}
75+
path: |
76+
.environment/gn_out/.ninja_log
77+
.environment/pigweed-venv/*.log

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

+1-8
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,14 @@ 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 }}
4437
- name: Work around TSAN ASLR issues
4538
if: runner.os == 'Linux' && !env.ACT
4639
shell: bash

.github/actions/dynamic/action.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Dynamic
2+
description: Dynamically resolves another GitHub action
3+
inputs:
4+
action:
5+
description: Action reference
6+
required: true
7+
with:
8+
description: Action inputs as multi-line YAML string
9+
required: false
10+
default: ""
11+
outputs:
12+
outputs:
13+
description: JSON object of outputs from the action
14+
value: ${{ steps.run.outputs.outputs }}
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Instantiate
19+
shell: bash
20+
run: |
21+
# Dynamically invoke ${{ inputs.action }}
22+
with='${{ inputs.with }}'
23+
[[ -z "$with" ]] || with="$(echo ' with:'; sed -e 's/^/ /' <<<"$with")"
24+
mkdir -p ./.tmp/dynamic-action-instance
25+
cat <<END >./.tmp/dynamic-action-instance/action.yaml
26+
runs:
27+
using: composite
28+
steps:
29+
- id: run
30+
uses: ${{ inputs.action }}
31+
$with
32+
outputs:
33+
outputs:
34+
value: $(echo '$'){{ toJSON(steps.run.outputs) }}
35+
END
36+
- name: Run
37+
id: run
38+
uses: ./.tmp/dynamic-action-instance

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

-18
This file was deleted.

.github/workflows/cirque.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
with:
5858
platform: linux
5959

60+
# TODO: Is what's being cached here actually compatible with a regular bootstrap?
6061
- name: Bootstrap Cache
6162
uses: ./.github/actions/bootstrap-cache
6263
- name: Bootstrap Cirque

.github/workflows/darwin-tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
LSAN_OPTIONS: detect_leaks=1 malloc_context_size=40 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt
5050

5151
if: github.actor != 'restyled-io[bot]'
52-
runs-on: macos-latest
52+
runs-on: macos-13
5353

5454
steps:
5555
- name: Checkout

.github/workflows/darwin.yaml

+14-23
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,34 @@ jobs:
3131
framework:
3232
name: Build framework
3333
if: github.actor != 'restyled-io[bot]'
34-
runs-on: macos-latest
34+
runs-on: macos-13
3535
strategy:
3636
matrix:
3737
options: # We don't need a full matrix
3838
- flavor: macos-release-availability
39-
arguments: -sdk macosx -configuration Release OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new'
39+
arguments: -sdk macosx -configuration Release WARNING_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new'
4040
- flavor: ios-release
41-
arguments: -sdk iphoneos -configuration Release OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
41+
arguments: -sdk iphoneos -configuration Release WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
4242
- flavor: ios-debug
43-
arguments: -sdk iphoneos -configuration Debug OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
43+
arguments: -sdk iphoneos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
4444
- flavor: tvos-debug
45-
arguments: -sdk appletvos -configuration Debug OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
45+
arguments: -sdk appletvos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
4646
- flavor: watchos-debug
47-
arguments: -sdk watchos -configuration Debug OTHER_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
47+
arguments: -sdk watchos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
4848
steps:
4949
- name: Checkout
5050
uses: actions/checkout@v4
51-
- name: Setup Environment
52-
run: brew install python@3.9
5351
- name: Checkout submodules & Bootstrap
5452
uses: ./.github/actions/checkout-submodules-and-bootstrap
5553
with:
5654
platform: darwin
5755
bootstrap-log-name: bootstrap-logs-framework-${{ matrix.options.flavor }}
5856
- name: Block zap-cli from being used
57+
env:
58+
PW_ENVSETUP_NO_BANNER: 1
5959
run: |
6060
# Framework builds are NOT expected to require zap-cli
61-
scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli)) && mv $D/zap-cli $D/zap-cli.moved'
61+
scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"'
6262
# run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
6363
scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
6464
- name: Build
@@ -68,7 +68,8 @@ jobs:
6868
tests:
6969
name: Run framework tests
7070
if: github.actor != 'restyled-io[bot]'
71-
runs-on: macos-latest
71+
needs: [ framework ] # serialize to avoid running to many parallel macos runners
72+
runs-on: macos-13
7273
strategy:
7374
matrix:
7475
options: # We don't need a full matrix
@@ -82,8 +83,6 @@ jobs:
8283
steps:
8384
- name: Checkout
8485
uses: actions/checkout@v4
85-
- name: Setup Environment
86-
run: brew install python@3.9
8786
- name: Checkout submodules & Bootstrap
8887
uses: ./.github/actions/checkout-submodules-and-bootstrap
8988
with:
@@ -117,6 +116,7 @@ jobs:
117116
OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 ${{ matrix.options.defines }}' \
118117
> >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
119118
- name: Collect crash logs
119+
if: failure() && !env.ACT
120120
run: |
121121
mkdir -p /tmp/darwin/framework-tests
122122
find ~/Library/Developer/Xcode/DerivedData /Library/Logs/DiagnosticReports -name '*.ips' -print0 | xargs -0 -J % cp % /tmp/darwin/framework-tests
@@ -131,24 +131,15 @@ jobs:
131131
tv-casting-bridge:
132132
name: Build TV Casting Bridge example
133133
if: github.actor != 'restyled-io[bot]'
134-
runs-on: macos-latest
134+
needs: [ framework ] # serialize to avoid running to many parallel macos runners
135+
runs-on: macos-13
135136
steps:
136137
- name: Checkout
137138
uses: actions/checkout@v4
138-
- name: Setup Environment
139-
run: brew install python@3.9
140139
- name: Checkout submodules & Bootstrap
141140
uses: ./.github/actions/checkout-submodules-and-bootstrap
142141
with:
143142
platform: darwin
144143
- name: Build
145144
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
146145
run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
147-
148-
darwin:
149-
name: Build Darwin # Matches the previous monolithic build that's marked "required" for PRs
150-
needs: [ framework, tests ]
151-
runs-on: macos-latest
152-
steps:
153-
- name: Done
154-
run: 'true' # nothing to do

.github/workflows/examples-efr32.yaml

+24-19
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,14 @@ jobs:
5959
timeout-minutes: 30
6060
run: |
6161
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker
62-
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker
6362
rm -rf ./out/
6463
- name: Build some BRD4187C variants (1)
6564
run: |
6665
./scripts/run_in_build_env.sh \
6766
"./scripts/build/build_examples.py \
6867
--enable-flashbundle \
69-
--target efr32-brd4187c-thermostat-openthread_mtd \
70-
--target efr32-brd4187c-switch-shell-use_ot_coap_lib \
68+
--target efr32-brd4187c-thermostat-openthread-mtd \
69+
--target efr32-brd4187c-switch-shell-use-ot-coap-lib \
7170
--target efr32-brd4187c-unit-test \
7271
build \
7372
--copy-artifacts-to out/artifacts \
@@ -79,9 +78,9 @@ jobs:
7978
./scripts/run_in_build_env.sh \
8079
"./scripts/build/build_examples.py \
8180
--enable-flashbundle \
82-
--target efr32-brd4187c-light-use_ot_lib \
81+
--target efr32-brd4187c-light-use-ot-lib \
8382
--target efr32-brd4187c-pump \
84-
--target efr32-brd4187c-lock-shell-enable_heap_monitoring \
83+
--target efr32-brd4187c-lock-shell-heap-monitoring \
8584
build \
8685
--copy-artifacts-to out/artifacts \
8786
"
@@ -92,7 +91,7 @@ jobs:
9291
./scripts/run_in_build_env.sh \
9392
"./scripts/build/build_examples.py \
9493
--enable-flashbundle \
95-
--target efr32-brd4187c-window-covering-additional_data_advertising \
94+
--target efr32-brd4187c-window-covering-additional-data-advertising \
9695
--target efr32-brd4187c-light-rpc \
9796
build \
9897
--copy-artifacts-to out/artifacts \
@@ -105,33 +104,39 @@ jobs:
105104
/tmp/bloat_reports/
106105
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
107106
efr32 BRD4187C window-app \
108-
out/efr32-brd4187c-window-covering-additional_data_advertising/matter-silabs-window-example.out \
107+
out/efr32-brd4187c-window-covering-additional-data-advertising/matter-silabs-window-example.out \
109108
/tmp/bloat_reports/
110109
- name: Clean out build output
111110
run: rm -rf ./out
112-
- name: Build BRD4338A variants
111+
- name: Build BRD4338A WiFi Soc variants
113112
run: |
114113
./scripts/run_in_build_env.sh \
115114
"./scripts/build/build_examples.py \
116115
--enable-flashbundle \
117-
--target efr32-brd4338a-light-wifi-917_soc-skip_rps_generation \
116+
--target efr32-brd4338a-light-skip-rps-generation \
117+
--target efr32-brd4338a-lock-skip-rps-generation \
118118
build \
119119
--copy-artifacts-to out/artifacts \
120120
"
121-
- name: Clean out build output
122-
run: rm -rf ./out
123-
- name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
121+
- name: Prepare bloat report for brd4338a lock app
124122
run: |
125-
scripts/examples/gn_silabs_example.sh examples/lock-app/silabs out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200 --docker
126-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \
127-
out/lock_app_wifi_wf200/BRD4161A/matter-silabs-lock-example.out /tmp/bloat_reports/
123+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
124+
efr32 BRD4338a lock-app \
125+
out/efr32-brd4338a-lock-skip-rps-generation/matter-silabs-lock-example.out \
126+
/tmp/bloat_reports/
128127
- name: Clean out build output
129128
run: rm -rf ./out
130-
- name: Build example EFR32+RS9116 WiFi Lighting app for BRD4161A
129+
- name: Build EFR32 with WiFi NCP
131130
run: |
132-
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116 --docker
133-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs9116 lighting-app \
134-
out/lighting_app_wifi_rs9116/BRD4161A/matter-silabs-lighting-example.out /tmp/bloat_reports/
131+
./scripts/run_in_build_env.sh \
132+
"./scripts/build/build_examples.py \
133+
--enable-flashbundle \
134+
--target efr32-brd4187c-lock-wifi-siwx917 \
135+
--target efr32-brd4187c-light-wifi-rs9116 \
136+
--target efr32-brd4187c-lock-wifi-wf200 \
137+
build \
138+
--copy-artifacts-to out/artifacts \
139+
"
135140
- name: Clean out build output
136141
run: rm -rf ./out
137142
- name: Uploading Size Reports

0 commit comments

Comments
 (0)