action_tools.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. name: ToolsCI
  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. - '**/*.c'
  16. - '**/*.h'
  17. - '**/*.cpp'
  18. pull_request:
  19. branches:
  20. - master
  21. paths-ignore:
  22. - documentation/**
  23. - '**/README.md'
  24. - '**/README_zh.md'
  25. - '**/*.c'
  26. - '**/*.h'
  27. - '**/*.cpp'
  28. workflow_dispatch:
  29. repository_dispatch:
  30. permissions:
  31. contents: read # to fetch code (actions/checkout)
  32. jobs:
  33. test:
  34. runs-on: ubuntu-22.04
  35. name: Tools
  36. if: github.repository_owner == 'RT-Thread'
  37. strategy:
  38. fail-fast: false
  39. env:
  40. TEST_BSP_ROOT: bsp/stm32/stm32l475-atk-pandora
  41. steps:
  42. - uses: actions/checkout@v4
  43. - name: Install Tools
  44. shell: bash
  45. run: |
  46. wget https://raw.githubusercontent.com/RT-Thread/env/master/install_ubuntu.sh
  47. chmod 777 install_ubuntu.sh
  48. ./install_ubuntu.sh
  49. - name: Install Arm ToolChains
  50. if: ${{ success() }}
  51. shell: bash
  52. run: |
  53. 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
  54. sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt
  55. /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version
  56. echo "RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin" >> $GITHUB_ENV
  57. - name: Build Tools
  58. run: |
  59. scons --pyconfig-silent -C $TEST_BSP_ROOT 2>menuconfig.log
  60. cat menuconfig.log
  61. if grep -q "warning:" menuconfig.log; then
  62. echo "Errors found in menuconfig, failing the build."
  63. exit 1
  64. fi
  65. scons -j$(nproc) -C $TEST_BSP_ROOT
  66. - name: Project generate Tools
  67. if: ${{ success() }}
  68. run: |
  69. echo "Test to generate eclipse project"
  70. scons --target=eclipse -s -C $TEST_BSP_ROOT
  71. echo "Test to generate cmake project"
  72. scons --target=cmake -s -C $TEST_BSP_ROOT
  73. echo "Test to generate makefile project"
  74. scons --target=makefile -s -C $TEST_BSP_ROOT
  75. - name: Project dist Tools
  76. if: ${{ success() }}
  77. run: |
  78. echo "Test to dist project"
  79. scons --dist -C $TEST_BSP_ROOT
  80. scons --dist-ide -C $TEST_BSP_ROOT
  81. ls $TEST_BSP_ROOT
  82. ls $TEST_BSP_ROOT/dist
  83. scons --pyconfig-silent -C $TEST_BSP_ROOT/dist/project
  84. scons --pyconfig-silent -C $TEST_BSP_ROOT/rt-studio-project
  85. scons -C $TEST_BSP_ROOT/dist/project
  86. scons -C $TEST_BSP_ROOT/rt-studio-project