Skip to content

Commit 55552d9

Browse files
authored
Merge branch 'master' into 0320_enable_fan_feature
2 parents 7cb2034 + cdd0f5f commit 55552d9

File tree

9 files changed

+55
-46
lines changed

9 files changed

+55
-46
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 (deprecated)
2+
description: Bootstrap cache
33
runs:
44
using: "composite"
55
steps:

.github/actions/bootstrap/action.yaml

+2-33
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,9 @@ 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-
138
runs:
149
using: "composite"
1510
steps:
16-
- uses: Wandalen/wretry.action@v1.4.10
17-
name: Bootstrap from cache
18-
id: bootstrap-cache
19-
continue-on-error: true
20-
with:
21-
action: buildjet/cache@v4
22-
attempt_limit: 3
23-
attempt_delay: 2000
24-
with: |
25-
key: ${{ runner.os }}-${{ inputs.platform }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
26-
path: |
27-
.environment
28-
build_overrides/pigweed_environment.gni
29-
30-
- name: Run bootstrap
31-
if: fromJSON(steps.bootstrap-cache.outputs.outputs).cache-hit != 'true' # retry returns all outputs in `outputs`
32-
env:
33-
PW_NO_CIPD_CACHE_DIR: Y
11+
- name: Bootstrap
3412
shell: bash
35-
run: source scripts/bootstrap.sh -p all,${{ inputs.platform }}
36-
37-
- name: Uploading bootstrap logs
38-
uses: actions/upload-artifact@v3
39-
if: always() && !env.ACT && fromJSON(steps.bootstrap-cache.outputs.outputs).cache-hit != 'true'
40-
with:
41-
name: ${{ inputs.bootstrap-log-name }}
42-
path: |
43-
.environment/gn_out/.ninja_log
44-
.environment/pigweed-venv/*.log
13+
run: bash scripts/bootstrap.sh -p all,${{ inputs.platform }}

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

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@ runs:
2626
with:
2727
platform: ${{ inputs.platform }}
2828
extra-parameters: ${{ inputs.extra-submodule-parameters }}
29+
- name: Bootstrap Cache
30+
uses: ./.github/actions/bootstrap-cache
2931
- name: Bootstrap
3032
uses: ./.github/actions/bootstrap
33+
env:
34+
PW_NO_CIPD_CACHE_DIR: Y
3135
with:
3236
platform: ${{ inputs.platform }}
33-
bootstrap-log-name: ${{ inputs.bootstrap-log-name }}
3437
- name: Dump disk info after checkout submodule & Bootstrap
3538
shell: bash
3639
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 }}
3744
- name: Work around TSAN ASLR issues
3845
if: runner.os == 'Linux' && !env.ACT
3946
shell: bash
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Upload bootstrap logs
2+
description: Upload bootstrap logs
3+
inputs:
4+
bootstrap-log-name:
5+
description: "Bootstrap log name"
6+
required: false
7+
default: bootstrap-logs-${{ github.job }}
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Uploading bootstrap logs
12+
uses: actions/upload-artifact@v4
13+
if: ${{ always() && !env.ACT }}
14+
with:
15+
name: ${{ inputs.bootstrap-log-name }}
16+
path: |
17+
.environment/gn_out/.ninja_log
18+
.environment/pigweed-venv/*.log

.github/workflows/cirque.yaml

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

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

.github/workflows/fuzzing-build.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ jobs:
4646
run: |
4747
mkdir objdir-clone || true
4848
49+
- name: Bootstrap Cache
50+
uses: ./.github/actions/bootstrap-cache
4951
- name: Bootstrap
5052
uses: ./.github/actions/bootstrap
53+
- name: Upload Bootstrap Logs
54+
uses: ./.github/actions/upload-bootstrap-logs
5155

5256
- name: Build all-clusters-app
5357
run: |
@@ -80,8 +84,12 @@ jobs:
8084
run: |
8185
mkdir objdir-clone || true
8286
87+
- name: Bootstrap Cache
88+
uses: ./.github/actions/bootstrap-cache
8389
- name: Bootstrap
8490
uses: ./.github/actions/bootstrap
91+
- name: Upload Bootstrap Logs
92+
uses: ./.github/actions/upload-bootstrap-logs
8593

8694
- name: Build all-clusters-app
8795
run: |

.github/workflows/release_artifacts.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ jobs:
3939
uses: actions/checkout@v4
4040
with:
4141
ref: "${{ github.event.inputs.releaseTag }}"
42+
- name: Bootstrap Cache
43+
uses: ./.github/actions/bootstrap-cache
4244
- name: Bootstrap
4345
uses: ./.github/actions/bootstrap
46+
- name: Upload Bootstrap Logs
47+
uses: ./.github/actions/upload-bootstrap-logs
4448

4549
- name: Build
4650
run: scripts/examples/esp_example.sh all-clusters-app
@@ -70,8 +74,12 @@ jobs:
7074
uses: actions/checkout@v4
7175
with:
7276
ref: "${{ github.event.inputs.releaseTag }}"
77+
- name: Bootstrap Cache
78+
uses: ./.github/actions/bootstrap-cache
7379
- name: Bootstrap
7480
uses: ./.github/actions/bootstrap
81+
- name: Upload Bootstrap Logs
82+
uses: ./.github/actions/upload-bootstrap-logs
7583

7684
- name: Build example EFR32 Lock App
7785
run: scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/

scripts/setup/bootstrap.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ _install_additional_pip_requirements() {
2121
# figure out additional pip install items
2222
while [ $# -gt 0 ]; do
2323
case $1 in
24-
-p | --platform)
25-
_SETUP_PLATFORM=$2
26-
shift # argument
27-
shift # value
28-
;;
29-
*)
30-
shift
31-
;;
24+
-p | --platform)
25+
_SETUP_PLATFORM=$2
26+
shift # argument
27+
shift # value
28+
;;
29+
*)
30+
shift
31+
;;
3232
esac
3333
done
3434

@@ -41,7 +41,7 @@ _install_additional_pip_requirements() {
4141

4242
for platform in ${_SETUP_PLATFORM}; do
4343
# Allow none as an alias of nothing extra installed (like -p none)
44-
if [ "$platform" != "none" -a -e "$_CHIP_ROOT/scripts/setup/requirements.$platform.txt" ]; then
44+
if [ "$platform" != "none" ]; then
4545
echo "Installing pip requirements for $platform..."
4646
pip install -q \
4747
-r "$_CHIP_ROOT/scripts/setup/requirements.$platform.txt" \
@@ -66,7 +66,7 @@ _bootstrap_or_activate() {
6666
local _BOOTSTRAP_NAME="${_BOOTSTRAP_PATH##*/}"
6767
local _BOOTSTRAP_DIR="${_BOOTSTRAP_PATH%/*}"
6868
# Strip off the 'scripts[/setup]' directory, leaving the root of the repo.
69-
_CHIP_ROOT="$(cd "${_BOOTSTRAP_DIR%/setup}/.." >/dev/null && pwd)"
69+
_CHIP_ROOT="$(cd "${_BOOTSTRAP_DIR%/setup}/.." > /dev/null && pwd)"
7070

7171
local _CONFIG_FILE="scripts/setup/environment.json"
7272

0 commit comments

Comments
 (0)