build_arm.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. name: Build ARM
  2. on:
  3. pull_request:
  4. push:
  5. release:
  6. types:
  7. - created
  8. jobs:
  9. # ---------------------------------------
  10. # Unit testing with Ceedling
  11. # ---------------------------------------
  12. unit-test:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Setup Ruby
  16. uses: ruby/setup-ruby@v1
  17. with:
  18. ruby-version: '2.7'
  19. - name: Checkout TinyUSB
  20. uses: actions/checkout@v3
  21. - name: Unit Tests
  22. run: |
  23. # Install Ceedling
  24. gem install ceedling
  25. cd test
  26. ceedling test:all
  27. # ---------------------------------------
  28. # Build ARM family
  29. # ---------------------------------------
  30. build-arm:
  31. runs-on: ubuntu-latest
  32. strategy:
  33. fail-fast: false
  34. matrix:
  35. family:
  36. # Alphabetical order
  37. - 'broadcom_32bit'
  38. - 'imxrt'
  39. - 'lpc15'
  40. - 'lpc18'
  41. - 'lpc54'
  42. - 'lpc55'
  43. - 'mm32'
  44. - 'msp432e4'
  45. - 'nrf'
  46. - 'rp2040'
  47. - 'samd11'
  48. - 'samd21'
  49. - 'samd51'
  50. - 'saml2x'
  51. - 'stm32f0'
  52. - 'stm32f1'
  53. - 'stm32f4'
  54. - 'stm32f7'
  55. - 'stm32g4'
  56. - 'stm32h7'
  57. - 'stm32l4'
  58. - 'stm32wb'
  59. - 'tm4c123'
  60. - 'xmc4000'
  61. steps:
  62. - name: Setup Python
  63. uses: actions/setup-python@v3
  64. - name: Install ARM GCC
  65. uses: carlosperate/arm-none-eabi-gcc-action@v1
  66. with:
  67. release: '11.2-2022.02'
  68. - name: Checkout TinyUSB
  69. uses: actions/checkout@v3
  70. - name: Checkout common submodules in lib
  71. run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
  72. - name: Checkout hathach/linkermap
  73. uses: actions/checkout@v3
  74. with:
  75. repository: hathach/linkermap
  76. path: linkermap
  77. - name: Checkout pico-sdk for rp2040
  78. if: matrix.family == 'rp2040'
  79. run: |
  80. git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
  81. echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
  82. - name: Get Dependencies
  83. run: python3 tools/get_dependencies.py ${{ matrix.family }}
  84. - name: Build
  85. run: python3 tools/build_family.py ${{ matrix.family }}
  86. - name: Linker Map
  87. run: |
  88. pip install linkermap/
  89. for ex in `ls -d examples/device/*/`; do \
  90. find ${ex} -name *.map -print -quit | \
  91. xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
  92. done
  93. # ---------------------------------------
  94. # Build all no-family (orphaned) boards
  95. # ---------------------------------------
  96. build-board:
  97. runs-on: ubuntu-latest
  98. strategy:
  99. fail-fast: false
  100. matrix:
  101. example:
  102. # Alphabetical order, a group of 4
  103. - 'device/audio_test device/board_test device/cdc_dual_ports device/cdc_msc'
  104. - 'device/cdc_msc_freertos device/dfu_runtime device/hid_composite device/hid_composite_freertos'
  105. - 'device/hid_generic_inout device/hid_multiple_interface device/midi_test device/msc_dual_lun'
  106. - 'device/net_lwip_webserver'
  107. - 'device/uac2_headset device/usbtmc device/webusb_serial host/cdc_msc_hid'
  108. steps:
  109. - name: Setup Python
  110. uses: actions/setup-python@v3
  111. - name: Install ARM GCC
  112. uses: carlosperate/arm-none-eabi-gcc-action@v1
  113. with:
  114. release: '11.2-2022.02'
  115. - name: Checkout TinyUSB
  116. uses: actions/checkout@v3
  117. - name: Checkout common submodules in lib
  118. run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
  119. - name: Build
  120. run: python3 tools/build_board.py ${{ matrix.example }}