File tree 9 files changed +46
-55
lines changed
checkout-submodules-and-bootstrap
9 files changed +46
-55
lines changed Original file line number Diff line number Diff line change 1
1
name : Bootstrap cache
2
- description : Bootstrap cache
2
+ description : Bootstrap cache (deprecated)
3
3
runs :
4
4
using : " composite"
5
5
steps :
Original file line number Diff line number Diff line change 5
5
description : " Platform name"
6
6
required : false
7
7
default : none
8
+ bootstrap-log-name :
9
+ description : " Bootstrap log name"
10
+ required : false
11
+ default : bootstrap-logs-${{ github.job }}
12
+
8
13
runs :
9
14
using : " composite"
10
15
steps :
11
- - name : Bootstrap
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
12
34
shell : bash
13
- run : bash scripts/bootstrap.sh -p all,${{ inputs.platform }}
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
Original file line number Diff line number Diff line change @@ -26,21 +26,14 @@ runs:
26
26
with :
27
27
platform : ${{ inputs.platform }}
28
28
extra-parameters : ${{ inputs.extra-submodule-parameters }}
29
- - name : Bootstrap Cache
30
- uses : ./.github/actions/bootstrap-cache
31
29
- name : Bootstrap
32
30
uses : ./.github/actions/bootstrap
33
- env :
34
- PW_NO_CIPD_CACHE_DIR : Y
35
31
with :
36
32
platform : ${{ inputs.platform }}
33
+ bootstrap-log-name : ${{ inputs.bootstrap-log-name }}
37
34
- name : Dump disk info after checkout submodule & Bootstrap
38
35
shell : bash
39
36
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 }}
44
37
- name : Work around TSAN ASLR issues
45
38
if : runner.os == 'Linux' && !env.ACT
46
39
shell : bash
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 57
57
with :
58
58
platform : linux
59
59
60
+ # TODO: Is what's being cached here actually compatible with a regular bootstrap?
60
61
- name : Bootstrap Cache
61
62
uses : ./.github/actions/bootstrap-cache
62
63
- name : Bootstrap Cirque
Original file line number Diff line number Diff line change 46
46
run : |
47
47
mkdir objdir-clone || true
48
48
49
- - name : Bootstrap Cache
50
- uses : ./.github/actions/bootstrap-cache
51
49
- name : Bootstrap
52
50
uses : ./.github/actions/bootstrap
53
- - name : Upload Bootstrap Logs
54
- uses : ./.github/actions/upload-bootstrap-logs
55
51
56
52
- name : Build all-clusters-app
57
53
run : |
84
80
run : |
85
81
mkdir objdir-clone || true
86
82
87
- - name : Bootstrap Cache
88
- uses : ./.github/actions/bootstrap-cache
89
83
- name : Bootstrap
90
84
uses : ./.github/actions/bootstrap
91
- - name : Upload Bootstrap Logs
92
- uses : ./.github/actions/upload-bootstrap-logs
93
85
94
86
- name : Build all-clusters-app
95
87
run : |
Original file line number Diff line number Diff line change 39
39
uses : actions/checkout@v4
40
40
with :
41
41
ref : " ${{ github.event.inputs.releaseTag }}"
42
- - name : Bootstrap Cache
43
- uses : ./.github/actions/bootstrap-cache
44
42
- name : Bootstrap
45
43
uses : ./.github/actions/bootstrap
46
- - name : Upload Bootstrap Logs
47
- uses : ./.github/actions/upload-bootstrap-logs
48
44
49
45
- name : Build
50
46
run : scripts/examples/esp_example.sh all-clusters-app
74
70
uses : actions/checkout@v4
75
71
with :
76
72
ref : " ${{ github.event.inputs.releaseTag }}"
77
- - name : Bootstrap Cache
78
- uses : ./.github/actions/bootstrap-cache
79
73
- name : Bootstrap
80
74
uses : ./.github/actions/bootstrap
81
- - name : Upload Bootstrap Logs
82
- uses : ./.github/actions/upload-bootstrap-logs
83
75
84
76
- name : Build example EFR32 Lock App
85
77
run : scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/
Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ _install_additional_pip_requirements() {
21
21
# figure out additional pip install items
22
22
while [ $# -gt 0 ]; do
23
23
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
+ ;;
32
32
esac
33
33
done
34
34
@@ -41,7 +41,7 @@ _install_additional_pip_requirements() {
41
41
42
42
for platform in ${_SETUP_PLATFORM} ; do
43
43
# Allow none as an alias of nothing extra installed (like -p none)
44
- if [ " $platform " != " none" ]; then
44
+ if [ " $platform " != " none" -a -e " $_CHIP_ROOT /scripts/setup/requirements. $platform .txt " ]; then
45
45
echo " Installing pip requirements for $platform ..."
46
46
pip install -q \
47
47
-r " $_CHIP_ROOT /scripts/setup/requirements.$platform .txt" \
@@ -66,7 +66,7 @@ _bootstrap_or_activate() {
66
66
local _BOOTSTRAP_NAME=" ${_BOOTSTRAP_PATH##*/ } "
67
67
local _BOOTSTRAP_DIR=" ${_BOOTSTRAP_PATH%/* } "
68
68
# 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) "
70
70
71
71
local _CONFIG_FILE=" scripts/setup/environment.json"
72
72
File renamed without changes.
You can’t perform that action at this time.
0 commit comments