1+ name : build lvgl_micropython
2+
3+ on :
4+ workflow_dispatch : # 仅手动触发
5+
6+ jobs :
7+ build_esp32 :
8+ if : ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Install system dependencies
14+ run : |
15+ sudo apt-get update
16+ sudo apt-get install -y build-essential pkg-config cmake ninja-build ccache
17+
18+ - uses : actions/setup-python@v5
19+ with :
20+ python-version : ' 3.11'
21+
22+ - name : Install Deps
23+ run : |
24+ git submodule update --init --depth 1 -- lib/pycparser
25+ git submodule update --init --depth 1 --jobs 4 -- lib/micropython
26+ git submodule update --init --depth 1 --jobs 4 -- lib/lvgl
27+
28+ - name : Cached Deps
29+ id : cache-deps
30+ uses : actions/cache@v4
31+ with :
32+ path : |
33+ lib/esp-idf
34+ ~/.espressif
35+ key : ${{ runner.os }}-v4-deps
36+
37+ - name : Get Build Deps
38+ if : steps.cache-deps.outputs.cache-hit != 'true'
39+ run : |
40+ git submodule update --init --depth 1 --jobs 4 -- lib/esp-idf
41+ cd lib/esp-idf
42+ git submodule update --init --depth 1 --jobs 4 -- components/bt/host/nimble/nimble components/esp_wifi components/esptool_py/esptool components/lwip/lwip components/mbedtls/mbedtls components/bt/controller/lib_esp32 components/bt/controller/lib_esp32c3_family
43+ cd ../..
44+ export "IDF_PATH=${GITHUB_WORKSPACE}/lib/esp-idf"
45+ ./lib/esp-idf/install.sh all
46+
47+ - name : Setup ESP-IDF
48+ run : |
49+ export "IDF_PATH=${GITHUB_WORKSPACE}/lib/esp-idf"
50+ . ./lib/esp-idf/export.sh
51+ env :
52+ IDF_PATH : ${{ github.workspace }}/lib/esp-idf
53+
54+ - name : Build ESP32_GENERIC_S3 SPIRAM_OCT 16
55+ run : python3 make.py esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT --flash-size=16 DISPLAY=st7789 INDEV=xpt2046
56+
57+ - name : Check build result
58+ run : |
59+ if [ ! -f "build/*.bin" ]; then
60+ echo "No .bin files found in build directory. Compilation failed."
61+ exit 1
62+ fi
63+
64+ - uses : actions/upload-artifact@v4
65+ with :
66+ name : lvgl_micropy_ESP32
67+ path : build/*.bin
0 commit comments