examples-telink.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. # Copyright (c) 2022-2023 Project CHIP Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. name: Build example - Telink
  15. on:
  16. push:
  17. pull_request:
  18. merge_group:
  19. concurrency:
  20. group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
  21. cancel-in-progress: true
  22. env:
  23. CHIP_NO_LOG_TIMESTAMPS: true
  24. jobs:
  25. telink:
  26. name: Telink
  27. env:
  28. BUILD_TYPE: telink
  29. runs-on: ubuntu-latest
  30. if: github.actor != 'restyled-io[bot]'
  31. container:
  32. image: ghcr.io/project-chip/chip-build-telink:12
  33. volumes:
  34. - "/tmp/bloat_reports:/tmp/bloat_reports"
  35. steps:
  36. - name: Checkout
  37. uses: actions/checkout@v4
  38. - name: Checkout submodules & Bootstrap
  39. uses: ./.github/actions/checkout-submodules-and-bootstrap
  40. with:
  41. platform: telink
  42. - name: Set up environment for size reports
  43. uses: ./.github/actions/setup-size-reports
  44. if: ${{ !env.ACT }}
  45. with:
  46. gh-context: ${{ toJson(github) }}
  47. - name: Build example Telink (B91) All Clusters App
  48. run: |
  49. ./scripts/run_in_build_env.sh \
  50. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-all-clusters' build"
  51. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  52. telink tlsr9518adk80d all-clusters-app \
  53. out/telink-tlsr9518adk80d-all-clusters/zephyr/zephyr.elf \
  54. /tmp/bloat_reports/
  55. - name: clean out build output
  56. run: rm -rf ./out
  57. - name: Build example Telink (B92) All Clusters Minimal App
  58. run: |
  59. ./scripts/run_in_build_env.sh \
  60. "./scripts/build/build_examples.py --target 'telink-tlsr9528a-all-clusters-minimal' build"
  61. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  62. telink tlsr9528a all-clusters-minimal-app \
  63. out/telink-tlsr9528a-all-clusters-minimal/zephyr/zephyr.elf \
  64. /tmp/bloat_reports/
  65. - name: clean out build output
  66. run: rm -rf ./out
  67. - name: Build example Telink (B91) Bridge App
  68. run: |
  69. ./scripts/run_in_build_env.sh \
  70. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-bridge' build"
  71. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  72. telink tlsr9518adk80d bridge-app \
  73. out/telink-tlsr9518adk80d-bridge/zephyr/zephyr.elf \
  74. /tmp/bloat_reports/
  75. - name: clean out build output
  76. run: rm -rf ./out
  77. - name: Build example Telink (B92) Contact Sensor App
  78. run: |
  79. ./scripts/run_in_build_env.sh \
  80. "./scripts/build/build_examples.py --target 'telink-tlsr9528a-contact-sensor' build"
  81. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  82. telink tlsr9528a contact-sensor-app \
  83. out/telink-tlsr9528a-contact-sensor/zephyr/zephyr.elf \
  84. /tmp/bloat_reports/
  85. - name: clean out build output
  86. run: rm -rf ./out
  87. - name: Build tools required for Factory Data
  88. run: |
  89. ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
  90. ./scripts/build/gn_gen.sh
  91. ./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p"
  92. mv ./out/$BUILD_TYPE/chip-cert ./out/$BUILD_TYPE/chip-tool ./out/$BUILD_TYPE/spake2p ./out
  93. - name: clean out build output (keep tools)
  94. run: rm -rf ./out/telink*
  95. - name: Build example Telink (B91) Lighting App with RPC, Shell and Factory Data
  96. run: |
  97. ./scripts/run_in_build_env.sh \
  98. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-rpc-shell-factory-data' build"
  99. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  100. telink tlsr9518adk80d lighting-app-rpc-shell-factory-data \
  101. out/telink-tlsr9518adk80d-light-rpc-shell-factory-data/zephyr/zephyr.elf \
  102. /tmp/bloat_reports/
  103. - name: clean out build output (keep tools)
  104. run: rm -rf ./out/telink*
  105. - name: Build example Telink (B92) Lighting App with RPC, Shell and Factory Data
  106. run: |
  107. ./scripts/run_in_build_env.sh \
  108. "./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-rpc-shell-factory-data' build"
  109. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  110. telink tlsr9528a lighting-app-rpc-shell-factory-data \
  111. out/telink-tlsr9528a-light-rpc-shell-factory-data/zephyr/zephyr.elf \
  112. /tmp/bloat_reports/
  113. - name: clean out build output
  114. run: rm -rf ./out
  115. - name: Build example Telink (B91) Light Switch App
  116. run: |
  117. ./scripts/run_in_build_env.sh \
  118. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-switch' build"
  119. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  120. telink tlsr9518adk80d light-switch-app \
  121. out/telink-tlsr9518adk80d-light-switch/zephyr/zephyr.elf \
  122. /tmp/bloat_reports/
  123. - name: clean out build output
  124. run: rm -rf ./out
  125. - name: Build example Telink (B92) Lock App
  126. run: |
  127. ./scripts/run_in_build_env.sh \
  128. "./scripts/build/build_examples.py --target 'telink-tlsr9528a-lock' build"
  129. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  130. telink tlsr9528a lock-app \
  131. out/telink-tlsr9528a-lock/zephyr/zephyr.elf \
  132. /tmp/bloat_reports/
  133. - name: clean out build output
  134. run: rm -rf ./out
  135. - name: Build example Telink (B91) OTA Requestor App
  136. run: |
  137. ./scripts/run_in_build_env.sh \
  138. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-ota-requestor' build"
  139. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  140. telink tlsr9518adk80d ota-requestor-app \
  141. out/telink-tlsr9518adk80d-ota-requestor/zephyr/zephyr.elf \
  142. /tmp/bloat_reports/
  143. - name: clean out build output
  144. run: rm -rf ./out
  145. - name: Build example Telink (B92) Pump App
  146. run: |
  147. ./scripts/run_in_build_env.sh \
  148. "./scripts/build/build_examples.py --target 'telink-tlsr9528a-pump' build"
  149. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  150. telink tlsr9528a pump-app \
  151. out/telink-tlsr9528a-pump/zephyr/zephyr.elf \
  152. /tmp/bloat_reports/
  153. - name: clean out build output
  154. run: rm -rf ./out
  155. - name: Build example Telink (B91) Pump Controller App
  156. run: |
  157. ./scripts/run_in_build_env.sh \
  158. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-controller' build"
  159. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  160. telink tlsr9518adk80d pump-controller-app \
  161. out/telink-tlsr9518adk80d-pump-controller/zephyr/zephyr.elf \
  162. /tmp/bloat_reports/
  163. - name: clean out build output
  164. run: rm -rf ./out
  165. - name: Build example Telink (B91) Resource Monitoring App
  166. run: |
  167. ./scripts/run_in_build_env.sh \
  168. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-resource-monitoring' build"
  169. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  170. telink tlsr9518adk80d resource-monitoring-app \
  171. out/telink-tlsr9518adk80d-resource-monitoring/zephyr/zephyr.elf \
  172. /tmp/bloat_reports/
  173. - name: clean out build output
  174. run: rm -rf ./out
  175. - name: Build example Telink (B91) Shell App
  176. run: |
  177. ./scripts/run_in_build_env.sh \
  178. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-shell' build"
  179. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  180. telink tlsr9518adk80d shell \
  181. out/telink-tlsr9518adk80d-shell/zephyr/zephyr.elf \
  182. /tmp/bloat_reports/
  183. - name: clean out build output
  184. run: rm -rf ./out
  185. - name: Build example Telink (B92) Smoke CO Alarm App
  186. run: |
  187. ./scripts/run_in_build_env.sh \
  188. "./scripts/build/build_examples.py --target 'telink-tlsr9528a-smoke-co-alarm' build"
  189. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  190. telink tlsr9528a smoke_co_alarm-app \
  191. out/telink-tlsr9528a-smoke-co-alarm/zephyr/zephyr.elf \
  192. /tmp/bloat_reports/
  193. - name: clean out build output
  194. run: rm -rf ./out
  195. - name: Build example Telink (B92) Temperature Measurement App
  196. run: |
  197. ./scripts/run_in_build_env.sh \
  198. "./scripts/build/build_examples.py --target 'telink-tlsr9528a-temperature-measurement' build"
  199. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  200. telink tlsr9528a temperature-measurement-app \
  201. out/telink-tlsr9528a-temperature-measurement/zephyr/zephyr.elf \
  202. /tmp/bloat_reports/
  203. - name: clean out build output
  204. run: rm -rf ./out
  205. - name: Build example Telink (B91) Thermostat App
  206. run: |
  207. ./scripts/run_in_build_env.sh \
  208. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-thermostat' build"
  209. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  210. telink tlsr9518adk80d thermostat \
  211. out/telink-tlsr9518adk80d-thermostat/zephyr/zephyr.elf \
  212. /tmp/bloat_reports/
  213. - name: clean out build output
  214. run: rm -rf ./out
  215. - name: Build example Telink (B91) Window Covering App
  216. run: |
  217. ./scripts/run_in_build_env.sh \
  218. "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-window-covering' build"
  219. .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
  220. telink tlsr9518adk80d window-covering \
  221. out/telink-tlsr9518adk80d-window-covering/zephyr/zephyr.elf \
  222. /tmp/bloat_reports/
  223. - name: clean out build output
  224. run: rm -rf ./out
  225. - name: Uploading Size Reports
  226. uses: ./.github/actions/upload-size-reports
  227. if: ${{ !env.ACT }}
  228. with:
  229. platform-name: Telink