build_aarch64.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: Build AArch64
  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. # ---------------------------------------
  21. # Build AARCH64 family
  22. # ---------------------------------------
  23. build-arm:
  24. runs-on: ubuntu-latest
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. family:
  29. # Alphabetical order
  30. - 'broadcom_64bit'
  31. steps:
  32. - name: Setup Python
  33. uses: actions/setup-python@v4
  34. with:
  35. python-version: '3.x'
  36. - name: Checkout TinyUSB
  37. uses: actions/checkout@v3
  38. - name: Checkout common submodules in lib
  39. run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
  40. - name: Checkout hathach/linkermap
  41. uses: actions/checkout@v3
  42. with:
  43. repository: hathach/linkermap
  44. path: linkermap
  45. - name: Set Toolchain URL
  46. run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
  47. - name: Cache Toolchain
  48. uses: actions/cache@v3
  49. id: cache-toolchain
  50. with:
  51. path: ~/cache/
  52. key: ${{ runner.os }}-21-11-02-${{ env.TOOLCHAIN_URL }}
  53. - name: Install Toolchain
  54. if: steps.cache-toolchain.outputs.cache-hit != 'true'
  55. run: |
  56. mkdir -p ~/cache/toolchain
  57. wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
  58. tar -C ~/cache/toolchain -xaf toolchain.tar.gz
  59. - name: Set Toolchain Path
  60. run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
  61. - name: Get Dependencies
  62. run: python3 tools/get_dependencies.py ${{ matrix.family }}
  63. - name: Build
  64. run: python3 tools/build_family.py ${{ matrix.family }}
  65. - name: Linker Map
  66. run: |
  67. pip install linkermap/
  68. for ex in `ls -d examples/device/*/`; do \
  69. find ${ex} -name *.map -print -quit | \
  70. xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
  71. done