@@ -4,164 +4,132 @@ name: ESP32
44on :
55 push :
66 pull_request :
7- paths-ignore :
8- - " examples/** "
9- - " README.md "
10- - " ci/*unix*.sh "
11- - " .github/workflows/build_unix.yml "
7+ paths :
8+ - " .github/workflows/build_esp32.yml "
9+ - " micropython-modules/microlite/** "
10+ - " micropython-modules/micropython-camera-driver/** "
11+
1212
1313jobs :
1414 tensorflow_micropython_esp32_build :
1515 runs-on : ubuntu-latest
1616
1717 steps :
1818 - name : Checkout repository
19- uses : actions/checkout@v2
20- - name : Prepare to Build Tensorflow Micropython Firmware for ESP32
21- run : |
22- git submodule init
23- git submodule update --recursive
24- cd micropython
25- git submodule update --init lib/axtls
26- git submodule update --init lib/berkeley-db-1.xx
27- cd ports/esp32
28- make BOARD= submodules
29- cd ../../..
30- cd tflm_esp_kernels
31- git submodule update --init components/esp32-camera
32- git submodule update --init components/esp-nn
33- - name : Get Cache Keys
34- # later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
35- # this commit is hard-coded in micropython/tools/ci.sh
36- run : |
37- IDF_COMMIT=142bb32c50fa9875b8b69fa539a2d59559460d72
38- echo "esp-idf-commit=$IDF_COMMIT" >> $GITHUB_ENV
39- TFLM_COMMIT=$(git submodule status tensorflow | awk '{print ($1)}')
40- echo "tflm-commit=$TFLM_COMMIT" >> $GITHUB_ENV
41- # - name: Cache esp-idf
42- # id: cache-esp-idf
43- # uses: actions/cache@v2
44- # env:
45- # cache-name: cache-esp-idf
46- # with:
47- # path: ./esp-idf
48- # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.esp-idf-commit }}
49- - name : Setup IDF
50- # if: steps.cache-esp-idf.outputs.cache-hit != 'true'
51- run : |
52- source ./micropython/tools/ci.sh && ci_esp32_idf50_setup
53- - name : Cache tflm
54- id : cache-tflm
55- uses : actions/cache@v2
56- env :
57- cache-name : cache-tflm
19+ uses : actions/checkout@v4
20+ - uses : actions/setup-python@v2
21+ with :
22+ python-version : ' 3.9'
23+ - name : Setup cmake
24+ uses : jwlawson/actions-setup-cmake@v1.13
5825 with :
59- path : ./micropython-modules/microlite/tflm
60- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.tflm-commit }}
61- - name : Setup Build for Tensorflow
62- # if: steps.cache-tflm.outputs.cache-hit != 'true'
26+ cmake-version : ' 3.18.4'
27+ - name : Get Date
28+ id : get-date
6329 run : |
30+ echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
31+ shell : bash
32+ # - uses: actions/cache@v3
33+ # id: cache
34+ # with:
35+ # path: |
36+ # dependencies/**
37+ # esp-idf/**
38+ # key: ${{ steps.get-date.outputs.date }}
6439
65- source ./esp-idf/export.sh
66-
40+ - name : Prepare to Build Tensorflow Micropython Firmware for ESP32
41+ # if: steps.cache.outputs.cache-hit != 'true'
42+ run : |
43+ python --version
44+ cmake --version
6745 pip3 install Pillow
6846 pip3 install Wave
69-
70- echo "Regenerating microlite/tfm directory"
71- rm -rf ./micropython-modules/microlite/tflm
72-
73- cd ./tensorflow
74-
75- ../micropython-modules/microlite/prepare-tflm-esp.sh
76-
77- - name : Build micropython cross compiler
78- run : |
47+ source ./scripts/build.sh && prepare_dependencies
48+ source ./dependencies/micropython/tools/ci.sh && ci_esp32_idf50_setup
49+ rm -rf ./dependencies/micropython/ports/esp32/build-MICROLITE
7950 source ./esp-idf/export.sh
80- cd ./micropython
81- echo "make -C mpy-cross V=1 clean all"
82- make -C mpy-cross V=1 clean all
83-
84- - name : Build standard non-psram 4MB Flash firmware
85- run : |
86- source ./esp-idf/export.sh
87-
88- echo "cd ./boards/esp32/MICROLITE"
89- cd ./boards/esp32/MICROLITE
90-
91- echo "Building MICROLITE"
92- rm -rf builds
93- idf.py clean build
94-
95- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
96- ../../../micropython/ports/esp32
51+ echo "BUILDING MICROLITE"
52+ source ./scripts/build.sh && build_esp32 "MICROLITE"
53+ ./scripts/assemble-unified-image-esp.sh ./dependencies/micropython/ports/esp32 "MICROLITE"
54+ shell : bash
55+
56+ # - name: Build standard non-psram 4MB Flash firmware
57+ # run: |
58+ # pip3 install Pillow
59+ # pip3 install Wave
60+ # rm -rf ./dependencies/micropython/ports/esp32/build-MICROLITE
61+ # source ./esp-idf/export.sh
62+ # source ./scripts/build.sh && build_esp32 "MICROLITE"
63+ # ./scripts/assemble-unified-image-esp.sh ./dependencies/micropython/ports/esp32 "MICROLITE"
64+ # shell: bash
9765
9866 - name : Archive ESP32-MICROLITE firmware
9967 uses : actions/upload-artifact@v2
10068 with :
10169 name : microlite-esp32-firmware
10270 path : |
103- boards/esp32/MICROLITE/ build/firmware.bin
71+ dependencies/micropython/ports/esp32/ build-MICROLITE /firmware.bin
10472
105- - name : Build with psram support and 16MB Flash firmware
106- run : |
107- source ./esp-idf/export.sh
73+ # - name: Build with psram support and 16MB Flash firmware
74+ # run: |
75+ # source ./esp-idf/export.sh
10876
109- echo "cd ./boards/esp32/MICROLITE_SPIRAM_16M"
110- cd ./boards/esp32/MICROLITE_SPIRAM_16M
77+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM_16M"
78+ # cd ./boards/esp32/MICROLITE_SPIRAM_16M
11179
112- echo "Building MICROLITE_SPIRAM_16M"
113- rm -rf build
114- idf.py clean build
80+ # echo "Building MICROLITE_SPIRAM_16M"
81+ # rm -rf build
82+ # idf.py clean build
11583
116- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
117- ../../../micropython/ports/esp32
84+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
85+ # ../../../micropython/ports/esp32
11886
119- - name : Archive ESP32-MICROLITE-SPIRAM-16M firmware
120- uses : actions/upload-artifact@v2
121- with :
122- name : microlite-spiram-16m-esp32-firmware
123- path : |
124- boards/esp32/MICROLITE_SPIRAM_16M/build/firmware.bin
87+ # - name: Archive ESP32-MICROLITE-SPIRAM-16M firmware
88+ # uses: actions/upload-artifact@v2
89+ # with:
90+ # name: microlite-spiram-16m-esp32-firmware
91+ # path: |
92+ # boards/esp32/MICROLITE_SPIRAM_16M/build/firmware.bin
12593
126- - name : Build with psram support
127- run : |
128- source ./esp-idf/export.sh
94+ # - name: Build with psram support
95+ # run: |
96+ # source ./esp-idf/export.sh
12997
130- echo "cd ./boards/esp32/MICROLITE_SPIRAM"
131- cd ./boards/esp32/MICROLITE_SPIRAM
98+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM"
99+ # cd ./boards/esp32/MICROLITE_SPIRAM
132100
133- echo "Building MICROLITE_SPIRAM"
134- rm -rf build
135- idf.py clean build
101+ # echo "Building MICROLITE_SPIRAM"
102+ # rm -rf build
103+ # idf.py clean build
136104
137- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
138- ../../../micropython/ports/esp32
105+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
106+ # ../../../micropython/ports/esp32
139107
140- - name : Archive ESP32-MICROLITE-SPIRAM firmware
141- uses : actions/upload-artifact@v2
142- with :
143- name : microlite-spiram-esp32-firmware
144- path : |
145- boards/esp32/MICROLITE_SPIRAM/build/firmware.bin
108+ # - name: Archive ESP32-MICROLITE-SPIRAM firmware
109+ # uses: actions/upload-artifact@v2
110+ # with:
111+ # name: microlite-spiram-esp32-firmware
112+ # path: |
113+ # boards/esp32/MICROLITE_SPIRAM/build/firmware.bin
146114
147- - name : Build MICROLITE_SPIRAM_CAM
148- run : |
115+ # - name: Build MICROLITE_SPIRAM_CAM
116+ # run: |
149117
150- source ./esp-idf/export.sh
118+ # source ./esp-idf/export.sh
151119
152- echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
153- cd ./boards/esp32/MICROLITE_SPIRAM_CAM
120+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
121+ # cd ./boards/esp32/MICROLITE_SPIRAM_CAM
154122
155- echo "Building MICROLITE_SPIRAM_CAM"
156- rm -rf builds
157- idf.py clean build
123+ # echo "Building MICROLITE_SPIRAM_CAM"
124+ # rm -rf builds
125+ # idf.py clean build
158126
159- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
160- ../../../micropython/ports/esp32
127+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
128+ # ../../../micropython/ports/esp32
161129
162- - name : Archive ESP32-MICROLITE_SPIRAM_CAM firmware
163- uses : actions/upload-artifact@v2
164- with :
165- name : microlite-spiram-cam-esp32-firmware
166- path : |
167- boards/esp32/MICROLITE_SPIRAM_CAM/build/firmware.bin
130+ # - name: Archive ESP32-MICROLITE_SPIRAM_CAM firmware
131+ # uses: actions/upload-artifact@v2
132+ # with:
133+ # name: microlite-spiram-cam-esp32-firmware
134+ # path: |
135+ # boards/esp32/MICROLITE_SPIRAM_CAM/build/firmware.bin
0 commit comments