|
| 1 | +# |
| 2 | +# Copyright (c) 2025, RT-Thread Development Team |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | +# |
| 6 | +# Change Logs: |
| 7 | +# Date Author Notes |
| 8 | +# 2025-03-22 Supperthomas 添加upload 上传编译固件 |
| 9 | +# |
1 | 10 | name: RT-Thread BSP Static Build Check |
2 | 11 |
|
3 | 12 | # Controls when the action will run. Triggers the workflow on push or pull request |
@@ -41,11 +50,11 @@ jobs: |
41 | 50 | RTT_TOOL_CHAIN: "sourcery-arm" |
42 | 51 | SUB_RTT_BSP: |
43 | 52 | - "stm32/stm32f407-rt-spark" |
44 | | - - RTT_BSP: "RTduino/Arduino Libraries (STM32F412 Nucleo)" |
| 53 | + - RTT_BSP: "RTduino_Arduino Libraries (STM32F412 Nucleo)" |
45 | 54 | RTT_TOOL_CHAIN: "sourcery-arm" |
46 | 55 | SUB_RTT_BSP: |
47 | 56 | - "stm32/stm32f412-st-nucleo" |
48 | | - - RTT_BSP: "RTduino/Arduino Libraries (Raspberry Pico)" |
| 57 | + - RTT_BSP: "RTduino_Arduino Libraries (Raspberry Pico)" |
49 | 58 | RTT_TOOL_CHAIN: "sourcery-arm" |
50 | 59 | SUB_RTT_BSP: |
51 | 60 | - "raspberry-pico" |
@@ -192,6 +201,7 @@ jobs: |
192 | 201 | - "stm32/stm32f767-st-nucleo" |
193 | 202 | - "stm32/stm32f769-st-disco" |
194 | 203 | - "stm32/stm32f723-st-disco" |
| 204 | + - "stm32/stm32g030-tiny-board" |
195 | 205 | - "stm32/stm32g070-st-nucleo" |
196 | 206 | - "stm32/stm32g071-st-nucleo" |
197 | 207 | - "stm32/stm32g431-st-nucleo" |
@@ -432,22 +442,22 @@ jobs: |
432 | 442 | id: cache-gcc-arm |
433 | 443 | uses: actions/cache@main |
434 | 444 | with: |
435 | | - path: /opt/gcc-arm-none-eabi-10-2020-q4-major |
436 | | - key: ${{ runner.os }}-arm-none-eabi-10-2020-q4-major |
| 445 | + path: /opt/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi |
| 446 | + key: ${{ runner.os }}-arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi |
437 | 447 |
|
438 | 448 | - name: Download Arm ToolChains |
439 | 449 | if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm' && (steps.cache-gcc-arm.outputs.cache-hit != 'true') }} |
440 | 450 | shell: bash |
441 | 451 | run: | |
442 | | - 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 |
443 | | - sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt |
| 452 | + wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.8/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz |
| 453 | + sudo tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz -C /opt |
444 | 454 |
|
445 | 455 | - name: Install Arm ToolChains2 |
446 | 456 | if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm'}} |
447 | 457 | shell: bash |
448 | 458 | run: | |
449 | | - /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version |
450 | | - echo "RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin" >> $GITHUB_ENV |
| 459 | + /opt/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc --version |
| 460 | + echo "RTT_EXEC_PATH=/opt/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin" >> $GITHUB_ENV |
451 | 461 |
|
452 | 462 | - name: Install LLVM-Arm ToolChains |
453 | 463 | if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'llvm-arm' && success() }} |
@@ -535,9 +545,36 @@ jobs: |
535 | 545 | source ~/.env/env.sh |
536 | 546 | python tools/ci/bsp_buildings.py |
537 | 547 |
|
| 548 | + - name: Upload output as artifact |
| 549 | + if: ${{ success() }} |
| 550 | + uses: actions/upload-artifact@main |
| 551 | + with: |
| 552 | + name: ${{ matrix.legs.RTT_BSP }} |
| 553 | + if-no-files-found: ignore |
| 554 | + path: output/ |
| 555 | + |
538 | 556 | - name: Post failure comment |
539 | 557 | if: failure() |
540 | 558 | run: | |
541 | 559 | curl -X POST -H "Authorization: token ${{ secrets.RTTHREAD_GITHUB_TOKEN }}" \ |
542 | 560 | -d '{"body":"@${{ github.actor }}, Thank you for your contribution, but there was an error with the action. Could you please help check the BSP compilation issue? Thank you."}' \ |
543 | 561 | "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" |
| 562 | + # 整合所有的output为一个文件夹 |
| 563 | + collect-artifacts: |
| 564 | + needs: build |
| 565 | + runs-on: ubuntu-latest |
| 566 | + if: github.event_name != 'pull_request' #排除Pull request |
| 567 | + steps: |
| 568 | + #这里会下载所有产物 |
| 569 | + - name: Download all artifacts |
| 570 | + uses: actions/download-artifact@main |
| 571 | + with: |
| 572 | + path: output/ |
| 573 | + merge-multiple: true |
| 574 | + - run: ls -R output/ |
| 575 | + |
| 576 | + - name: Upload combined output as artifact |
| 577 | + uses: actions/upload-artifact@main |
| 578 | + with: |
| 579 | + name: 00_all_bsp_output_${{ github.sha }} |
| 580 | + path: output/ |
0 commit comments