build_micropython.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: Micropython CI
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. build:
  7. if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
  8. name: Build ${{ matrix.port }} port
  9. runs-on: ubuntu-20.04
  10. continue-on-error: true
  11. strategy:
  12. matrix:
  13. port: ['unix', 'esp32', 'stm32', 'rp2']
  14. steps:
  15. - uses: ammaraskar/gcc-problem-matcher@master
  16. - name: Install Dependencies
  17. run: |
  18. sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
  19. sudo apt-get update -y -qq
  20. sudo apt-get install libsdl2-dev parallel libfreetype-dev librlottie-dev
  21. - name: Clone lv_micropython
  22. run: |
  23. git clone https://github.com/lvgl/lv_micropython.git .
  24. git checkout release/v8
  25. - name: Initialize lv_bindings submodule
  26. run: git submodule update --init --recursive lib/lv_bindings
  27. - name: Update ${{ matrix.port }} port submodules
  28. if: matrix.port != 'esp32'
  29. # VARIANT needed for unix
  30. run: make -C ports/${{ matrix.port }} VARIANT=dev DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
  31. - name: Checkout LVGL submodule
  32. working-directory: ./lib/lv_bindings/lvgl
  33. run: |
  34. git fetch --force ${{ github.event.repository.html_url }} "+refs/heads/*:refs/remotes/origin/*"
  35. git fetch --force ${{ github.event.repository.html_url }} "+refs/pull/*:refs/remotes/origin/pr/*"
  36. git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }}
  37. git submodule update --init --recursive
  38. - name: Build mpy-cross
  39. run: make -j $(nproc) -C mpy-cross
  40. # ESP32 port
  41. - name: Setup ESP-IDF
  42. if: matrix.port == 'esp32'
  43. run: |
  44. source tools/ci.sh && ci_esp32_idf44_setup
  45. - name: Build ESP32 port
  46. if: matrix.port == 'esp32'
  47. run: |
  48. source tools/ci.sh && ci_esp32_build
  49. # STM32 & RPi Pico port
  50. - name: arm-none-eabi-gcc
  51. if: matrix.port == 'stm32' || matrix.port == 'rp2'
  52. uses: carlosperate/arm-none-eabi-gcc-action@v1.3.0
  53. with:
  54. release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
  55. - name: Build STM32 port
  56. if: matrix.port == 'stm32'
  57. run: make -j $(nproc) -C ports/stm32 BOARD=STM32F7DISC
  58. - name: Build Raspberry Pi PICO port
  59. if: matrix.port == 'rp2'
  60. run: make -j $(nproc) -C ports/rp2 BOARD=PICO USER_C_MODULES=../../lib/lv_bindings/bindings.cmake
  61. # Unix port
  62. - name: Build Unix port
  63. if: matrix.port == 'unix'
  64. run: make -j $(nproc) -C ports/unix VARIANT=dev DEBUG=1
  65. - name: Run tests
  66. if: success() && matrix.port == 'unix'
  67. run: |
  68. export XDG_RUNTIME_DIR=/tmp
  69. lib/lv_bindings/tests/run.sh