build_msp430.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. name: Build MSP430
  2. on:
  3. push:
  4. paths:
  5. - 'src/**'
  6. - 'examples/**'
  7. - 'lib/**'
  8. - 'hw/**'
  9. pull_request:
  10. branches: [ master ]
  11. paths:
  12. - 'src/**'
  13. - 'examples/**'
  14. - 'lib/**'
  15. - 'hw/**'
  16. concurrency:
  17. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  18. cancel-in-progress: true
  19. jobs:
  20. build-msp430:
  21. runs-on: ubuntu-latest
  22. strategy:
  23. fail-fast: false
  24. matrix:
  25. family:
  26. # Alphabetical order
  27. - 'msp430'
  28. steps:
  29. - name: Setup Python
  30. uses: actions/setup-python@v4
  31. with:
  32. python-version: '3.x'
  33. - name: Checkout TinyUSB
  34. uses: actions/checkout@v3
  35. - name: Checkout common submodules in lib
  36. run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
  37. - name: Checkout hathach/linkermap
  38. uses: actions/checkout@v3
  39. with:
  40. repository: hathach/linkermap
  41. path: linkermap
  42. - name: Set Toolchain URL
  43. 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
  44. - name: Cache Toolchain
  45. uses: actions/cache@v3
  46. id: cache-toolchain
  47. with:
  48. path: ~/cache/
  49. key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
  50. - name: Install Toolchain
  51. if: steps.cache-toolchain.outputs.cache-hit != 'true'
  52. run: |
  53. mkdir -p ~/cache/toolchain
  54. wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.bz2
  55. tar -C ~/cache/toolchain -xaf toolchain.tar.bz2
  56. - name: Set Toolchain Path
  57. run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
  58. - name: Get Dependencies
  59. run: python3 tools/get_dependencies.py ${{ matrix.family }}
  60. - name: Build
  61. run: python3 tools/build_family.py ${{ matrix.family }}
  62. - name: Linker Map
  63. run: |
  64. pip install linkermap/
  65. # find -quit to only print linkermap of 1 board per example
  66. for ex in `ls -d examples/device/*/`
  67. do
  68. find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
  69. done