action_tools.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. permissions:
  29. contents: read # to fetch code (actions/checkout)
  30. jobs:
  31. test:
  32. runs-on: ubuntu-latest
  33. name: Tools
  34. strategy:
  35. fail-fast: false
  36. env:
  37. TEST_BSP_ROOT: bsp/stm32/stm32f407-atk-explorer
  38. steps:
  39. - uses: actions/checkout@v3
  40. - name: Install Tools
  41. shell: bash
  42. run: |
  43. sudo apt-get update
  44. sudo apt-get -yqq install scons
  45. - name: Install Arm ToolChains
  46. if: ${{ success() }}
  47. shell: bash
  48. run: |
  49. 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
  50. sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt
  51. /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version
  52. echo "RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin" >> $GITHUB_ENV
  53. - name: Build Tools
  54. run: |
  55. scons --pyconfig-silent -C $TEST_BSP_ROOT
  56. scons -j$(nproc) -C $TEST_BSP_ROOT
  57. - name: Project generate Tools
  58. if: ${{ success() }}
  59. run: |
  60. echo "Test to generate eclipse project"
  61. scons --target=eclipse -s -C $TEST_BSP_ROOT
  62. echo "Test to generate cmake project"
  63. scons --target=cmake -s -C $TEST_BSP_ROOT
  64. echo "Test to generate makefile project"
  65. scons --target=makefile -s -C $TEST_BSP_ROOT
  66. - name: Project dist Tools
  67. if: ${{ success() }}
  68. run: |
  69. echo "Test to dist project"
  70. scons --dist -C $TEST_BSP_ROOT
  71. scons --dist-ide -C $TEST_BSP_ROOT