2021-10-06 19:03:03 +03:00
|
|
|
name: Micropython CI
|
2020-09-05 14:46:07 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-03-07 10:04:59 -05:00
|
|
|
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
2021-10-06 19:03:03 +03:00
|
|
|
name: Build ${{ matrix.port }} port
|
2022-12-13 18:31:37 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-11-25 03:18:15 +01:00
|
|
|
continue-on-error: true
|
2021-10-06 19:03:03 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-03 09:49:36 -04:00
|
|
|
port: ['unix', 'esp32', 'stm32', 'rp2']
|
2020-09-05 14:46:07 +03:00
|
|
|
steps:
|
2021-10-09 08:11:54 -04:00
|
|
|
- uses: ammaraskar/gcc-problem-matcher@master
|
2021-08-29 04:26:35 -07:00
|
|
|
- name: Install Dependencies
|
2020-09-05 14:46:07 +03:00
|
|
|
run: |
|
|
|
|
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
|
|
|
sudo apt-get update -y -qq
|
2023-02-20 20:50:58 +01:00
|
|
|
sudo apt-get install libsdl2-dev parallel libfreetype-dev librlottie-dev libavformat-dev libavcodec-dev libswscale-dev libavutil-dev
|
2020-09-05 14:46:07 +03:00
|
|
|
- name: Clone lv_micropython
|
2021-04-24 03:41:27 +03:00
|
|
|
run: |
|
|
|
|
git clone https://github.com/lvgl/lv_micropython.git .
|
2023-08-19 01:42:37 +02:00
|
|
|
git checkout feat/multi-instance
|
2021-07-11 15:37:43 -04:00
|
|
|
- name: Initialize lv_bindings submodule
|
|
|
|
run: git submodule update --init --recursive lib/lv_bindings
|
2021-10-06 19:03:03 +03:00
|
|
|
- name: Update ${{ matrix.port }} port submodules
|
2023-06-22 14:58:19 +03:00
|
|
|
if: matrix.port != 'esp32' && matrix.port != 'rp2'
|
|
|
|
run: make -C ports/${{ matrix.port }} DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
|
2020-09-11 02:20:59 +03:00
|
|
|
- name: Checkout LVGL submodule
|
2020-09-05 14:46:07 +03:00
|
|
|
working-directory: ./lib/lv_bindings/lvgl
|
|
|
|
run: |
|
2021-11-03 02:24:55 +02:00
|
|
|
git fetch --force ${{ github.event.repository.html_url }} "+refs/heads/*:refs/remotes/origin/*"
|
|
|
|
git fetch --force ${{ github.event.repository.html_url }} "+refs/pull/*:refs/remotes/origin/pr/*"
|
2020-09-11 02:20:59 +03:00
|
|
|
git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }}
|
|
|
|
git submodule update --init --recursive
|
2020-09-05 14:46:07 +03:00
|
|
|
- name: Build mpy-cross
|
|
|
|
run: make -j $(nproc) -C mpy-cross
|
2021-10-06 19:03:03 +03:00
|
|
|
|
|
|
|
# ESP32 port
|
|
|
|
- name: Setup ESP-IDF
|
|
|
|
if: matrix.port == 'esp32'
|
|
|
|
run: |
|
2022-01-29 08:25:34 -05:00
|
|
|
source tools/ci.sh && ci_esp32_idf44_setup
|
2021-10-06 19:03:03 +03:00
|
|
|
- name: Build ESP32 port
|
|
|
|
if: matrix.port == 'esp32'
|
|
|
|
run: |
|
|
|
|
source tools/ci.sh && ci_esp32_build
|
|
|
|
|
2021-11-03 09:49:36 -04:00
|
|
|
# STM32 & RPi Pico port
|
2021-10-06 19:03:03 +03:00
|
|
|
- name: arm-none-eabi-gcc
|
2021-11-03 09:49:36 -04:00
|
|
|
if: matrix.port == 'stm32' || matrix.port == 'rp2'
|
2023-10-24 13:18:25 +02:00
|
|
|
uses: carlosperate/arm-none-eabi-gcc-action@v1.7.1
|
2021-10-06 19:03:03 +03:00
|
|
|
with:
|
|
|
|
release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
|
|
|
|
- name: Build STM32 port
|
|
|
|
if: matrix.port == 'stm32'
|
|
|
|
run: make -j $(nproc) -C ports/stm32 BOARD=STM32F7DISC
|
2021-11-03 09:49:36 -04:00
|
|
|
- name: Build Raspberry Pi PICO port
|
|
|
|
if: matrix.port == 'rp2'
|
2023-06-26 09:48:19 +03:00
|
|
|
run: |
|
|
|
|
make -C ports/rp2 BOARD=PICO submodules
|
|
|
|
make -j $(nproc) -C ports/rp2 BOARD=PICO USER_C_MODULES=../../lib/lv_bindings/bindings.cmake
|
2021-10-06 19:03:03 +03:00
|
|
|
# Unix port
|
|
|
|
- name: Build Unix port
|
|
|
|
if: matrix.port == 'unix'
|
2023-06-22 14:58:19 +03:00
|
|
|
run: make -j $(nproc) -C ports/unix DEBUG=1
|
2021-10-06 19:03:03 +03:00
|
|
|
- name: Run tests
|
|
|
|
if: success() && matrix.port == 'unix'
|
2021-07-12 01:15:32 +03:00
|
|
|
run: |
|
|
|
|
export XDG_RUNTIME_DIR=/tmp
|
|
|
|
lib/lv_bindings/tests/run.sh
|
2023-02-20 20:50:58 +01:00
|
|
|
|