12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- name : Full builds - Mbed OS
15
+ name : Build example - Mbed OS
16
16
17
17
on :
18
18
push :
19
+ pull_request :
19
20
workflow_dispatch :
20
21
21
22
concurrency :
22
- group : full- ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
23
+ group : ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
23
24
cancel-in-progress : true
24
25
25
26
jobs :
26
27
mbedos :
27
- name : Run
28
+ name : Mbed OS examples building
28
29
timeout-minutes : 200
29
30
30
31
env :
32
+ BUILD_TYPE : mbedos
31
33
APP_PROFILE : release
32
34
APP_TARGET : CY8CPROTO_062_4343W
33
35
50
52
attempt_limit : 3
51
53
attempt_delay : 2000
52
54
55
+ - name : Detect changed paths
56
+ uses : dorny/paths-filter@v2
57
+ id : changed_paths
58
+ with :
59
+ filters : |
60
+ mbed:
61
+ - '**/mbed/**'
62
+ pigweedapp:
63
+ - 'examples/pigweed-app/mbed/**'
64
+
53
65
- name : Set up environment for size reports
54
66
if : ${{ !env.ACT }}
55
67
env :
79
91
/tmp/bloat_reports/
80
92
81
93
- name : Build lighting-app example
94
+ if : github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true'
82
95
timeout-minutes : 20
83
96
run : |
84
97
scripts/examples/mbed_example.sh -a=lighting-app -b=$APP_TARGET -p=$APP_PROFILE
88
101
/tmp/bloat_reports/
89
102
90
103
- name : Build pigweed-app example
104
+ if : github.event_name == 'push' || steps.changed_paths.outputs.pigweedapp == 'true'
91
105
timeout-minutes : 20
92
106
run : |
93
107
scripts/examples/mbed_example.sh -a=pigweed-app -b=$APP_TARGET -p=$APP_PROFILE
97
111
/tmp/bloat_reports/
98
112
99
113
- name : Build all-clusters-app example
114
+ if : github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true'
100
115
timeout-minutes : 20
101
116
run : |
102
117
scripts/examples/mbed_example.sh -a=all-clusters-app -b=$APP_TARGET -p=$APP_PROFILE
@@ -106,6 +121,7 @@ jobs:
106
121
/tmp/bloat_reports/
107
122
108
123
- name : Build shell example
124
+ if : github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true'
109
125
timeout-minutes : 20
110
126
run : |
111
127
scripts/examples/mbed_example.sh -a=shell -b=$APP_TARGET -p=$APP_PROFILE
@@ -115,14 +131,15 @@ jobs:
115
131
/tmp/bloat_reports/
116
132
117
133
- name : Build ota-requestor-app example
134
+ if : github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true'
118
135
timeout-minutes : 20
119
136
run : |
120
137
scripts/examples/mbed_example.sh -a=ota-requestor-app -b=$APP_TARGET -p=$APP_PROFILE
121
138
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
122
139
mbed $APP_TARGET+$APP_PROFILE shell \
123
140
examples/ota-requestor-app/mbed/build-CY8CPROTO_062_4343W/release/chip-mbed-ota-requestor-app-example.elf \
124
141
/tmp/bloat_reports/
125
-
142
+
126
143
- name : Build unit tests
127
144
# Temporarily disable build due to running out of flash space
128
145
if : false
0 commit comments