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