|
| 1 | +name: Build MicroPython-LVGL unix port |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + |
| 6 | +jobs: |
| 7 | + unix-lvgl: |
| 8 | + |
| 9 | + runs-on: ubuntu-24.04 |
| 10 | + |
| 11 | + steps: |
| 12 | + - name: Install Dependencies |
| 13 | + run: | |
| 14 | + sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" |
| 15 | + sudo apt-get update -y -qq |
| 16 | + sudo apt-get install libsdl2-dev parallel libfreetype-dev librlottie-dev libavformat-dev libavcodec-dev libswscale-dev libavutil-dev build-essential libc-bin |
| 17 | + python3 -m pip install pillow |
| 18 | + - name: Clone lv_micropython |
| 19 | + run: | |
| 20 | + git clone https://github.com/lvgl/lv_micropython.git . |
| 21 | + git checkout master |
| 22 | + - name: Initialize lv_bindings submodule |
| 23 | + run: git submodule update --init --recursive user_modules/lv_binding_micropython |
| 24 | + - name: Update Unix port submodules |
| 25 | + run: make -C ports/unix DEBUG=1 submodules |
| 26 | + |
| 27 | + # - name: Debug GitHub Event |
| 28 | + # run: -${{ tojson(github.event) }} |
| 29 | + # shell: cat {0} |
| 30 | + |
| 31 | + - name: Checkout lv_bindings |
| 32 | + working-directory: ./user_modules/lv_binding_micropython |
| 33 | + run: | |
| 34 | +
|
| 35 | + git fetch --force ${{ github.event.repository.html_url }} "+${{github.event.ref}}:refs/remotes/origin/${{github.event.head_commit.author.username}}-${{github.event.head_commit.id}}" |
| 36 | + git checkout ${{ github.event.head_commit.id }} |
| 37 | + git submodule update --init --recursive |
| 38 | + - name: Build mpy-cross |
| 39 | + run: make -j $(nproc) -C mpy-cross |
| 40 | + - name: Build the unix port |
| 41 | + run: make -j $(nproc) -C ports/unix DEBUG=1 VARIANT=lvgl |
| 42 | + |
| 43 | + - name: Run MicroPython Tests |
| 44 | + run: MICROPY_MICROPYTHON=ports/unix/build-lvgl/micropython ./tests/run-tests.py -d tests/basics |
| 45 | + |
| 46 | + - name: Run MicroPython-LVGL API Tests |
| 47 | + run: MICROPY_MICROPYTHON=ports/unix/build-lvgl/micropython ./tests/run-tests.py -d user_modules/lv_binding_micropython/tests/api |
| 48 | + |
| 49 | + - name: Process Tests Artifacts |
| 50 | + working-directory: ./user_modules/lv_binding_micropython/tests |
| 51 | + run: ./imageconvert.py api/*.bin |
| 52 | + |
| 53 | + - name: Upload Test Artifacts |
| 54 | + uses: actions/upload-artifact@v4 |
| 55 | + with: |
| 56 | + name: API Tests Screenshots |
| 57 | + path: ./user_modules/lv_binding_micropython/tests/api/*.png |
| 58 | + |
| 59 | + # TODO: Fix run.sh catchsegv not found command |
| 60 | + - name: Run tests |
| 61 | + run: | |
| 62 | + export XDG_RUNTIME_DIR=/tmp |
| 63 | + user_modules/lv_binding_micropython/tests/run.sh |
0 commit comments