action.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. name: dlt645
  2. # Controls when the action will run. Triggers the workflow on push or pull request
  3. # events but only for the master branch
  4. on:
  5. # Runs at 16:00 UTC (BeiJing 00:00) on the 1st of every month
  6. schedule:
  7. - cron: '0 16 1 * *'
  8. push:
  9. branches:
  10. - master
  11. paths-ignore:
  12. - documentation/**
  13. - '**/README.md'
  14. - '**/README_zh.md'
  15. pull_request:
  16. branches:
  17. - master
  18. paths-ignore:
  19. - documentation/**
  20. - '**/README.md'
  21. - '**/README_zh.md'
  22. jobs:
  23. build:
  24. runs-on: ubuntu-latest
  25. name: ${{ matrix.legs.RTT_BSP }}
  26. strategy:
  27. fail-fast: false
  28. matrix:
  29. legs:
  30. - RTT_BSP: "gd32"
  31. RTT_TOOL_CHAIN: "sourcery-arm"
  32. SUB_RTT_BSP:
  33. - "gd32/arm/gd32103c-eval"
  34. - "gd32/arm/gd32105c-eval"
  35. - "gd32/arm/gd32105r-start"
  36. - "gd32/arm/gd32107c-eval"
  37. - "gd32/arm/gd32205r-start"
  38. - "gd32/arm/gd32207i-eval"
  39. - "gd32/arm/gd32303e-eval"
  40. - "gd32/arm/gd32305r-start"
  41. - "gd32/arm/gd32307e-start"
  42. - "gd32/arm/gd32407v-start"
  43. - "gd32/arm/gd32450z-eval"
  44. - RTT_BSP: "stm32"
  45. RTT_TOOL_CHAIN: "sourcery-arm"
  46. SUB_RTT_BSP:
  47. - "stm32/stm32f072-st-nucleo"
  48. - "stm32/stm32f091-st-nucleo"
  49. - "stm32/stm32f107-uc-eval"
  50. - "stm32/stm32f207-st-nucleo"
  51. - "stm32/stm32f401-st-nucleo"
  52. - "stm32/stm32f405-smdz-breadfruit"
  53. - "stm32/stm32f407-armfly-v5"
  54. - "stm32/stm32f410-st-nucleo"
  55. - "stm32/stm32f411-atk-nano"
  56. - "stm32/stm32f412-st-nucleo"
  57. - "stm32/stm32f413-st-nucleo"
  58. - "stm32/stm32f427-robomaster-a"
  59. - "stm32/stm32f429-armfly-v6"
  60. - "stm32/stm32f446-st-nucleo"
  61. - "stm32/stm32f469-st-disco"
  62. - "stm32/stm32f746-st-disco"
  63. - "stm32/stm32f767-atk-apollo"
  64. - "stm32/stm32f769-st-disco"
  65. - "stm32/stm32g070-st-nucleo"
  66. - "stm32/stm32g071-st-nucleo"
  67. - "stm32/stm32g431-st-nucleo"
  68. - "stm32/stm32g474-st-nucleo"
  69. - "stm32/stm32h743-armfly-v7"
  70. - "stm32/stm32h747-st-discovery"
  71. - "stm32/stm32h750-artpi"
  72. - "stm32/stm32l4r5-st-nucleo"
  73. - "stm32/stm32l4r9-st-eval"
  74. - "stm32/stm32l010-st-nucleo"
  75. - "stm32/stm32l412-st-nucleo"
  76. - "stm32/stm32l431-BearPi"
  77. - "stm32/stm32l432-st-nucleo"
  78. - "stm32/stm32l433-ali-startkit"
  79. - "stm32/stm32l452-st-nucleo"
  80. - "stm32/stm32l475-atk-pandora"
  81. - "stm32/stm32l476-st-nucleo"
  82. - "stm32/stm32l496-ali-developer"
  83. - "stm32/stm32l552-st-nucleo"
  84. - "stm32/stm32mp157a-st-discovery"
  85. - "stm32/stm32u575-st-nucleo"
  86. - "stm32/stm32wb55-st-nucleo"
  87. steps:
  88. - uses: actions/checkout@v3
  89. with:
  90. repository: RT-Thread/rt-thread
  91. - uses: actions/checkout@v3
  92. with:
  93. path: mypkgs/dlt645
  94. - name: Set up Python
  95. uses: actions/setup-python@v3
  96. with:
  97. python-version: 3.8
  98. - name: Install Tools
  99. shell: bash
  100. run: |
  101. sudo apt-get update
  102. sudo apt-get -qq install gcc-multilib libncurses5-dev scons
  103. sudo python -m pip install --upgrade pip -qq
  104. pip install requests -qq
  105. pip install psutil
  106. git config --global http.postBuffer 524288000
  107. python -c "import tools.menuconfig; tools.menuconfig.touch_env()"
  108. echo "RTT_ROOT=${{ github.workspace }}" >> $GITHUB_ENV
  109. echo "RTT_CC=gcc" >> $GITHUB_ENV
  110. - name: Install Arm ToolChains
  111. if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm' && success() }}
  112. shell: bash
  113. run: |
  114. wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.3/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
  115. sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt
  116. /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version
  117. echo "RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin" >> $GITHUB_ENV
  118. - name: Bsp Scons Compile
  119. if: ${{ success() }}
  120. shell: bash
  121. env:
  122. RTT_BSP: ${{ matrix.legs.RTT_BSP }}
  123. RTT_TOOL_CHAIN: ${{ matrix.legs.RTT_TOOL_CHAIN }}
  124. SRTT_BSP: ${{ join(matrix.legs.SUB_RTT_BSP, ',') }}
  125. run: |
  126. source ~/.env/env.sh
  127. failed=0
  128. count=0
  129. for bsp in $(echo $SRTT_BSP | tr ',' '\n'); do
  130. count=$((count+1))
  131. echo "::group::Compiling BSP: ==$count=== $bsp ===="
  132. echo bsp/$bsp
  133. sed -i "s/# CONFIG_PKG_USING_DLT645 is not set/CONFIG_PKG_USING_DLT645=y/g" bsp/$bsp/.config
  134. scons --pyconfig-silent -C bsp/$bsp
  135. sed -i "s/# CONFIG_DLT645_USING_SAMPLE is not set/CONFIG_DLT645_USING_SAMPLE=y/g" bsp/$bsp/.config
  136. scons --pyconfig-silent -C bsp/$bsp
  137. pushd bsp/$bsp && pkgs --update && popd
  138. rm -r bsp/$bsp/packages/dlt645-latest
  139. cp -r mypkgs/dlt645 bsp/$bsp/packages/dlt645
  140. scons -C bsp/$bsp -j$(nproc) --debug=time | tee output.log || \
  141. { total_time=$(grep "Total command execution time" output.log | awk '{print $5}'); \
  142. failed=$((failed+1)) ; echo "::endgroup::" ; echo "::error::build $bsp failed" ; \
  143. echo "- ❌ build $bsp failed in $total_time seconds " >> $GITHUB_STEP_SUMMARY ; } && \
  144. { total_time=$(grep "Total command execution time" output.log | awk '{print $5}'); \
  145. echo "- ✅ build $bsp success in $total_time seconds " >> $GITHUB_STEP_SUMMARY ; echo "::endgroup::" ; }
  146. done
  147. exit $failed