docker_img.yaml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. # Copyright (c) 2020-2021 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: Docker CHIP images
  15. on:
  16. workflow_call:
  17. inputs:
  18. push_images:
  19. required: false
  20. type: boolean
  21. default: false
  22. push:
  23. paths:
  24. - "integrations/docker/**"
  25. pull_request:
  26. paths:
  27. - "integrations/docker/**"
  28. workflow_dispatch:
  29. inputs:
  30. push_images:
  31. required: false
  32. type: boolean
  33. default: false
  34. jobs:
  35. build_images_base:
  36. name: Build Docker CHIP Build images - base
  37. runs-on: ubuntu-latest
  38. if: github.actor != 'restyled-io[bot]'
  39. strategy:
  40. fail-fast: false
  41. matrix:
  42. img:
  43. - ""
  44. - "-minimal"
  45. steps:
  46. - name: Checkout
  47. uses: actions/checkout@v4
  48. - name: Build & Push images using project bash script
  49. if: ${{ inputs.push_images == true }}
  50. run: |
  51. cd integrations/docker/images/base/chip-build${{ matrix.img }}
  52. ./build.sh --latest --push
  53. - name: Build images using project bash script
  54. if: ${{ inputs.push_images == false }}
  55. run: |
  56. cd integrations/docker/images/base/chip-build${{ matrix.img }}
  57. ./build.sh --latest
  58. build_images_stage_1:
  59. needs: [build_images_base]
  60. name: Build Docker CHIP Build images - stage 1
  61. runs-on: ubuntu-latest
  62. if: github.actor != 'restyled-io[bot]'
  63. strategy:
  64. fail-fast: false
  65. matrix:
  66. img:
  67. - "-crosscompile"
  68. steps:
  69. - name: Checkout
  70. uses: actions/checkout@v4
  71. - name: Build & Push images using project bash script
  72. if: ${{ inputs.push_images == true }}
  73. run: |
  74. cd integrations/docker/images/stage-1/chip-build${{ matrix.img }}
  75. ./build.sh --latest --push
  76. - name: Build images using project bash script
  77. if: ${{ inputs.push_images == false }}
  78. run: |
  79. cd integrations/docker/images/stage-1/chip-build${{ matrix.img }}
  80. ./build.sh --latest
  81. build_images_stage_2:
  82. needs: [build_images_base, build_images_stage_1]
  83. name: Build Docker CHIP Build images - stage 2
  84. runs-on: ubuntu-latest
  85. if: github.actor != 'restyled-io[bot]'
  86. strategy:
  87. fail-fast: false
  88. matrix:
  89. img:
  90. - "-ameba"
  91. - "-asr"
  92. - "-bouffalolab"
  93. - "-doxygen"
  94. - "-efr32"
  95. - "-esp32"
  96. - "-infineon"
  97. # NOTE: imx image requires too much space for GitHub-hosted runners. It fails with:
  98. # ApplyLayer exit status 1 stdout: stderr: write /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/opt/ltp/testcases/bin/fanotify15: no space left on device
  99. # - "-imx"
  100. - "-java"
  101. - "-k32w"
  102. - "-mbed-os"
  103. - "-nrf-platform"
  104. - "-telink"
  105. - "-ti"
  106. - "-tizen"
  107. - "-openiotsdk"
  108. steps:
  109. - name: Checkout
  110. uses: actions/checkout@v4
  111. - name: Build & Push images using project bash script
  112. if: ${{ inputs.push_images == true }}
  113. run: |
  114. cd integrations/docker/images/stage-2/chip-build${{ matrix.img }}
  115. ./build.sh --latest --push
  116. - name: Build images using project bash script
  117. if: ${{ inputs.push_images == false }}
  118. run: |
  119. cd integrations/docker/images/stage-2/chip-build${{ matrix.img }}
  120. ./build.sh --latest
  121. build_images_stage_3:
  122. needs: [build_images_base, build_images_stage_1, build_images_stage_2]
  123. name: Build Docker CHIP Build images - stage 3
  124. runs-on: ubuntu-latest
  125. if: github.actor != 'restyled-io[bot]'
  126. strategy:
  127. fail-fast: false
  128. matrix:
  129. img:
  130. - "-android"
  131. - "-esp32-qemu"
  132. - "-tizen-qemu"
  133. steps:
  134. - name: Checkout
  135. uses: actions/checkout@v4
  136. - name: Build & Push images using project bash script
  137. if: ${{ inputs.push_images == true }}
  138. run: |
  139. cd integrations/docker/images/stage-3/chip-build${{ matrix.img }}
  140. ./build.sh --latest --push
  141. - name: Build images using project bash script
  142. if: ${{ inputs.push_images == false }}
  143. run: |
  144. cd integrations/docker/images/stage-3/chip-build${{ matrix.img }}
  145. ./build.sh --latest
  146. build_images_vscode:
  147. needs: [build_images_base, build_images_stage_1, build_images_stage_2, build_images_stage_3]
  148. name: Build Docker CHIP Build images - vscode
  149. runs-on: ubuntu-latest
  150. if: github.actor != 'restyled-io[bot]' && false
  151. strategy:
  152. fail-fast: false
  153. matrix:
  154. img:
  155. - "-vscode"
  156. steps:
  157. - name: Checkout
  158. uses: actions/checkout@v4
  159. - name: Build & Push images using project bash script
  160. if: ${{ inputs.push_images == true }}
  161. run: |
  162. cd integrations/docker/images/vscode/chip-build${{ matrix.img }}
  163. ./build.sh --latest --push
  164. - name: Build images using project bash script
  165. if: ${{ inputs.push_images == false }}
  166. run: |
  167. cd integrations/docker/images/vscode-3/chip-build${{ matrix.img }}
  168. ./build.sh --latest