build.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: Build
  2. on: [pull_request, push]
  3. jobs:
  4. unit-test:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - name: Setup Ruby
  8. uses: actions/setup-ruby@v1.0.0
  9. - name: Checkout TinyUSB
  10. uses: actions/checkout@v2
  11. - name: Unit Tests
  12. run: |
  13. # Install Ceedling
  14. gem install ceedling
  15. cd test
  16. ceedling test:all
  17. build:
  18. runs-on: ubuntu-latest
  19. strategy:
  20. fail-fast: false
  21. matrix:
  22. example: ['board_test', 'cdc_dual_ports', 'cdc_msc', 'cdc_msc_freertos', 'dfu_rt',
  23. 'hid_composite', 'hid_generic_inout', 'midi_test', 'msc_dual_lun', 'net_lwip_webserver',
  24. 'usbtmc', 'webusb_serial']
  25. steps:
  26. - name: Setup Python
  27. uses: actions/setup-python@v1
  28. - name: Setup Node.js
  29. uses: actions/setup-node@v1.1.0
  30. - name: Install Toolchains
  31. run: |
  32. npm install --global xpm
  33. xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
  34. xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest
  35. echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin`"
  36. echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/*/.content/bin`"
  37. - name: Checkout TinyUSB
  38. uses: actions/checkout@v2
  39. - name: Checkout submodules
  40. shell: bash
  41. run: |
  42. auth_header="$(git config --local --get http.https://github.com/.extraheader)"
  43. git submodule sync --recursive
  44. git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive
  45. - name: Build
  46. run: python3 tools/build_all.py ${{ matrix.example }}