build_renesas.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. name: Build Renesas
  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-rx:
  21. runs-on: ubuntu-latest
  22. strategy:
  23. fail-fast: false
  24. matrix:
  25. family:
  26. # Alphabetical order
  27. - 'rx'
  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://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run
  44. - name: Cache Toolchain
  45. uses: actions/cache@v3
  46. id: cache-toolchain
  47. with:
  48. path: ~/cache/
  49. key: ${{ runner.os }}-21-03-30-${{ env.TOOLCHAIN_URL }}
  50. - name: Install Toolchain
  51. if: steps.cache-toolchain.outputs.cache-hit != 'true'
  52. run: |
  53. mkdir -p ~/cache/toolchain/gnurx
  54. wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.run
  55. chmod +x toolchain.run
  56. ./toolchain.run -p ~/cache/toolchain/gnurx -y
  57. - name: Set Toolchain Path
  58. run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
  59. - name: Get Dependencies
  60. run: python3 tools/get_dependencies.py ${{ matrix.family }}
  61. - name: Build
  62. run: python3 tools/build_family.py ${{ matrix.family }}
  63. - name: Linker Map
  64. run: |
  65. pip install linkermap/
  66. # find -quit to only print linkermap of 1 board per example
  67. for ex in `ls -d examples/device/*/`
  68. do
  69. find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
  70. done