build_msp430.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: Build MSP430
  2. on:
  3. pull_request:
  4. push:
  5. release:
  6. types:
  7. - created
  8. jobs:
  9. build-msp430:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. family:
  15. # Alphabetical order
  16. - 'msp430'
  17. steps:
  18. - name: Setup Python
  19. uses: actions/setup-python@v2
  20. - name: Checkout TinyUSB
  21. uses: actions/checkout@v2
  22. - name: Checkout common submodules in lib
  23. run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
  24. - name: Checkout hathach/linkermap
  25. uses: actions/checkout@v2
  26. with:
  27. repository: hathach/linkermap
  28. path: linkermap
  29. - name: Set Toolchain URL
  30. run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2
  31. - name: Cache Toolchain
  32. uses: actions/cache@v2
  33. id: cache-toolchain
  34. with:
  35. path: ~/cache/
  36. key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
  37. - name: Install Toolchain
  38. if: steps.cache-toolchain.outputs.cache-hit != 'true'
  39. run: |
  40. mkdir -p ~/cache/toolchain
  41. wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.bz2
  42. tar -C ~/cache/toolchain -xaf toolchain.tar.bz2
  43. - name: Set Toolchain Path
  44. run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
  45. - name: Build
  46. run: python3 tools/build_family.py ${{ matrix.family }}
  47. - name: Linker Map
  48. run: |
  49. pip install linkermap/
  50. for ex in `ls -d examples/device/*/`; do \
  51. find ${ex} -name *.map -print -quit | \
  52. xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
  53. done