Repository navigation
Build LVGL MicroPython on Linux for special boards like esp32-small, unphone,... #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build LVGL MicroPython on Linux for special boards like esp32-small, unphone,... | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 8 * * 1' # Monday morning — bitrot check for special boards | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-esp32-small: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 120 | |
| env: | |
| MPOS_CCACHE: 1 | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_NOHASHDIR: true | |
| steps: | |
| - name: Checkout repository with submodules | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| - name: Install and cache APT dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 | |
| with: | |
| packages: >- | |
| build-essential libffi-dev pkg-config cmake ninja-build ccache | |
| gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev | |
| libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev | |
| libxcursor-dev libxfixes-dev libxi-dev libxss-dev | |
| libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev | |
| libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev | |
| libudev-dev fcitx-libs-dev libpipewire-0.3-dev libwayland-dev | |
| libdecor-0-dev libv4l-dev | |
| version: apt-v2-ubuntu-24.04-${{ runner.arch }} | |
| execute_install_scripts: true | |
| - name: Restore ESP-IDF tools | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.espressif | |
| key: esp-idf-tools-v1-5.5.1-${{ runner.os }}-${{ runner.arch }} | |
| - name: Restore compiler cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .ccache | |
| key: ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-specials-${{ github.sha }} | |
| restore-keys: | | |
| ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-specials- | |
| - name: Configure compiler cache | |
| run: | | |
| echo "/usr/lib/ccache" >> "$GITHUB_PATH" | |
| ccache --max-size 1G | |
| ccache --zero-stats | |
| - name: Extract OS version | |
| id: version | |
| run: | | |
| OS_VERSION=$(grep "release = " internal_filesystem/lib/mpos/build_info.py | cut -d "=" -f 2 | cut -d "#" -f 1 | tr -d " " | tr -d '"') | |
| echo "OS_VERSION=$OS_VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $OS_VERSION" | |
| - name: Build LVGL MicroPython esp32-small | |
| run: | | |
| ./scripts/build_mpos.sh esp32-small | |
| mv lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC-4.bin lvgl_micropython/build/MicroPythonOS_esp32-small_${{ steps.version.outputs.OS_VERSION }}.bin | |
| mv lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC/micropython.bin lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC/MicroPythonOS_esp32-small_${{ steps.version.outputs.OS_VERSION }}.ota | |
| - name: Upload built binary as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: MicroPythonOS_esp32-small_${{ steps.version.outputs.OS_VERSION }}.bin | |
| path: lvgl_micropython/build/MicroPythonOS_esp32-small_${{ steps.version.outputs.OS_VERSION }}.bin | |
| retention-days: 7 | |
| - name: Upload built binary as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: MicroPythonOS_esp32-small_${{ steps.version.outputs.OS_VERSION }}.ota | |
| path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC/MicroPythonOS_esp32-small_${{ steps.version.outputs.OS_VERSION }}.ota | |
| retention-days: 7 | |
| - name: Show compiler cache statistics | |
| if: always() | |
| run: ccache --show-stats | |
| build-unphone: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 120 | |
| env: | |
| MPOS_CCACHE: 1 | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_NOHASHDIR: true | |
| steps: | |
| - name: Checkout repository with submodules | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| - name: Install and cache APT dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 | |
| with: | |
| packages: >- | |
| build-essential libffi-dev pkg-config cmake ninja-build ccache | |
| gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev | |
| libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev | |
| libxcursor-dev libxfixes-dev libxi-dev libxss-dev | |
| libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev | |
| libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev | |
| libudev-dev fcitx-libs-dev libpipewire-0.3-dev libwayland-dev | |
| libdecor-0-dev libv4l-dev | |
| version: apt-v2-ubuntu-24.04-${{ runner.arch }} | |
| execute_install_scripts: true | |
| - name: Restore ESP-IDF tools | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.espressif | |
| key: esp-idf-tools-v1-5.5.1-${{ runner.os }}-${{ runner.arch }} | |
| - name: Restore compiler cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .ccache | |
| key: ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-specials-${{ github.sha }} | |
| restore-keys: | | |
| ccache-v1-${{ runner.os }}-${{ runner.arch }}-linux-specials- | |
| - name: Configure compiler cache | |
| run: | | |
| echo "/usr/lib/ccache" >> "$GITHUB_PATH" | |
| ccache --max-size 1G | |
| ccache --zero-stats | |
| - name: Extract OS version | |
| id: version | |
| run: | | |
| OS_VERSION=$(grep "release = " internal_filesystem/lib/mpos/build_info.py | cut -d "=" -f 2 | cut -d "#" -f 1 | tr -d " " | tr -d '"') | |
| echo "OS_VERSION=$OS_VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $OS_VERSION" | |
| - name: Build LVGL MicroPython unphone | |
| run: | | |
| ./scripts/build_mpos.sh unphone | |
| mv lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-8.bin lvgl_micropython/build/MicroPythonOS_esp32s3-unphone_${{ steps.version.outputs.OS_VERSION }}.bin | |
| mv lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/MicroPythonOS_esp32s3-unphone_${{ steps.version.outputs.OS_VERSION }}.ota | |
| - name: Upload built binary as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: MicroPythonOS_esp32s3-unphone_${{ steps.version.outputs.OS_VERSION }}.bin | |
| path: lvgl_micropython/build/MicroPythonOS_esp32s3-unphone_${{ steps.version.outputs.OS_VERSION }}.bin | |
| retention-days: 7 | |
| - name: Upload built binary as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: MicroPythonOS_esp32s3-unphone_${{ steps.version.outputs.OS_VERSION }}.ota | |
| path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/MicroPythonOS_esp32s3-unphone_${{ steps.version.outputs.OS_VERSION }}.ota | |
| retention-days: 7 | |
| - name: Show compiler cache statistics | |
| if: always() | |
| run: ccache --show-stats |