@@ -4,164 +4,131 @@ 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+ 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
7949 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
50+ echo "BUILDING MICROLITE"
51+ source ./scripts/build.sh && build_esp32 "MICROLITE"
52+ ./scripts/assemble-unified-image-esp.sh ./dependencies/micropython "MICROLITE"
53+ shell : bash
54+
55+ # - name: Build standard non-psram 4MB Flash firmware
56+ # run: |
57+ # pip3 install Pillow
58+ # pip3 install Wave
59+ # rm -rf ./dependencies/micropython/ports/esp32/build-MICROLITE
60+ # source ./esp-idf/export.sh
61+ # source ./scripts/build.sh && build_esp32 "MICROLITE"
62+ # ./scripts/assemble-unified-image-esp.sh ./dependencies/micropython/ports/esp32 "MICROLITE"
63+ # shell: bash
9764
9865 - name : Archive ESP32-MICROLITE firmware
9966 uses : actions/upload-artifact@v2
10067 with :
10168 name : microlite-esp32-firmware
10269 path : |
103- boards/esp32/MICROLITE/ build/firmware.bin
70+ dependencies/micropython/ build-MICROLITE /firmware.bin
10471
105- - name : Build with psram support and 16MB Flash firmware
106- run : |
107- source ./esp-idf/export.sh
72+ # - name: Build with psram support and 16MB Flash firmware
73+ # run: |
74+ # source ./esp-idf/export.sh
10875
109- echo "cd ./boards/esp32/MICROLITE_SPIRAM_16M"
110- cd ./boards/esp32/MICROLITE_SPIRAM_16M
76+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM_16M"
77+ # cd ./boards/esp32/MICROLITE_SPIRAM_16M
11178
112- echo "Building MICROLITE_SPIRAM_16M"
113- rm -rf build
114- idf.py clean build
79+ # echo "Building MICROLITE_SPIRAM_16M"
80+ # rm -rf build
81+ # idf.py clean build
11582
116- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
117- ../../../micropython/ports/esp32
83+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
84+ # ../../../micropython/ports/esp32
11885
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
86+ # - name: Archive ESP32-MICROLITE-SPIRAM-16M firmware
87+ # uses: actions/upload-artifact@v2
88+ # with:
89+ # name: microlite-spiram-16m-esp32-firmware
90+ # path: |
91+ # boards/esp32/MICROLITE_SPIRAM_16M/build/firmware.bin
12592
126- - name : Build with psram support
127- run : |
128- source ./esp-idf/export.sh
93+ # - name: Build with psram support
94+ # run: |
95+ # source ./esp-idf/export.sh
12996
130- echo "cd ./boards/esp32/MICROLITE_SPIRAM"
131- cd ./boards/esp32/MICROLITE_SPIRAM
97+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM"
98+ # cd ./boards/esp32/MICROLITE_SPIRAM
13299
133- echo "Building MICROLITE_SPIRAM"
134- rm -rf build
135- idf.py clean build
100+ # echo "Building MICROLITE_SPIRAM"
101+ # rm -rf build
102+ # idf.py clean build
136103
137- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
138- ../../../micropython/ports/esp32
104+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
105+ # ../../../micropython/ports/esp32
139106
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
107+ # - name: Archive ESP32-MICROLITE-SPIRAM firmware
108+ # uses: actions/upload-artifact@v2
109+ # with:
110+ # name: microlite-spiram-esp32-firmware
111+ # path: |
112+ # boards/esp32/MICROLITE_SPIRAM/build/firmware.bin
146113
147- - name : Build MICROLITE_SPIRAM_CAM
148- run : |
114+ # - name: Build MICROLITE_SPIRAM_CAM
115+ # run: |
149116
150- source ./esp-idf/export.sh
117+ # source ./esp-idf/export.sh
151118
152- echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
153- cd ./boards/esp32/MICROLITE_SPIRAM_CAM
119+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
120+ # cd ./boards/esp32/MICROLITE_SPIRAM_CAM
154121
155- echo "Building MICROLITE_SPIRAM_CAM"
156- rm -rf builds
157- idf.py clean build
122+ # echo "Building MICROLITE_SPIRAM_CAM"
123+ # rm -rf builds
124+ # idf.py clean build
158125
159- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
160- ../../../micropython/ports/esp32
126+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
127+ # ../../../micropython/ports/esp32
161128
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
129+ # - name: Archive ESP32-MICROLITE_SPIRAM_CAM firmware
130+ # uses: actions/upload-artifact@v2
131+ # with:
132+ # name: microlite-spiram-cam-esp32-firmware
133+ # path: |
134+ # boards/esp32/MICROLITE_SPIRAM_CAM/build/firmware.bin
0 commit comments