@@ -4,164 +4,123 @@ 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'
19+ uses : actions/checkout@v4
20+
21+ # - uses: actions/setup-python@v2
22+ # with:
23+ # python-version: '3.9'
24+ # - name: Setup cmake
25+ # uses: jwlawson/actions-setup-cmake@v1.13
26+ # with:
27+ # cmake-version: '3.18.4'
28+ - name : Get Date
29+ id : get-date
5130 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
58- 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'
63- run : |
64-
65- source ./esp-idf/export.sh
31+ echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
32+ shell : bash
33+ # - uses: actions/cache@v3
34+ # id: cache
35+ # with:
36+ # path: |
37+ # dependencies/**
38+ # esp-idf/**
39+ # key: ${{ steps.get-date.outputs.date }}
6640
41+ - name : Prepare to Build Tensorflow Micropython Firmware for ESP32
42+ # if: steps.cache.outputs.cache-hit != 'true'
43+ run : |
44+ mv * ..
45+ cd ..
6746 pip3 install Pillow
6847 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 : |
79- 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
48+ source ./scripts/build.sh && prepare_dependencies
49+ source ./dependencies/micropython/tools/ci.sh && ci_esp32_idf50_setup
50+ echo "BUILDING MICROLITE"
51+ source ./scripts/build.sh && build_esp32 "MICROLITE"
52+ TARGET=$(pwd)/dependencies/micropython/ports/esp32
53+ echo "TARGET=$TARGET"
54+ ./scripts/assemble-unified-image-esp.sh $TARGET "MICROLITE"
55+ ls $TARGET/build-MICROLITE
56+ shell : bash
9757
9858 - name : Archive ESP32-MICROLITE firmware
99- uses : actions/upload-artifact@v2
59+ uses : actions/upload-artifact@v3
10060 with :
10161 name : microlite-esp32-firmware
102- path : |
103- boards/esp32/MICROLITE/build/firmware.bin
62+ path : dependencies/micropython/ports/esp32/build-MICROLITE/firmware.bin
10463
105- - name : Build with psram support and 16MB Flash firmware
106- run : |
107- source ./esp-idf/export.sh
64+ # - name: Build with psram support and 16MB Flash firmware
65+ # run: |
66+ # source ./esp-idf/export.sh
10867
109- echo "cd ./boards/esp32/MICROLITE_SPIRAM_16M"
110- cd ./boards/esp32/MICROLITE_SPIRAM_16M
68+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM_16M"
69+ # cd ./boards/esp32/MICROLITE_SPIRAM_16M
11170
112- echo "Building MICROLITE_SPIRAM_16M"
113- rm -rf build
114- idf.py clean build
71+ # echo "Building MICROLITE_SPIRAM_16M"
72+ # rm -rf build
73+ # idf.py clean build
11574
116- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
117- ../../../micropython/ports/esp32
75+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
76+ # ../../../micropython/ports/esp32
11877
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
78+ # - name: Archive ESP32-MICROLITE-SPIRAM-16M firmware
79+ # uses: actions/upload-artifact@v2
80+ # with:
81+ # name: microlite-spiram-16m-esp32-firmware
82+ # path: |
83+ # boards/esp32/MICROLITE_SPIRAM_16M/build/firmware.bin
12584
126- - name : Build with psram support
127- run : |
128- source ./esp-idf/export.sh
85+ # - name: Build with psram support
86+ # run: |
87+ # source ./esp-idf/export.sh
12988
130- echo "cd ./boards/esp32/MICROLITE_SPIRAM"
131- cd ./boards/esp32/MICROLITE_SPIRAM
89+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM"
90+ # cd ./boards/esp32/MICROLITE_SPIRAM
13291
133- echo "Building MICROLITE_SPIRAM"
134- rm -rf build
135- idf.py clean build
92+ # echo "Building MICROLITE_SPIRAM"
93+ # rm -rf build
94+ # idf.py clean build
13695
137- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
138- ../../../micropython/ports/esp32
96+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
97+ # ../../../micropython/ports/esp32
13998
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
99+ # - name: Archive ESP32-MICROLITE-SPIRAM firmware
100+ # uses: actions/upload-artifact@v2
101+ # with:
102+ # name: microlite-spiram-esp32-firmware
103+ # path: |
104+ # boards/esp32/MICROLITE_SPIRAM/build/firmware.bin
146105
147- - name : Build MICROLITE_SPIRAM_CAM
148- run : |
106+ # - name: Build MICROLITE_SPIRAM_CAM
107+ # run: |
149108
150- source ./esp-idf/export.sh
109+ # source ./esp-idf/export.sh
151110
152- echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
153- cd ./boards/esp32/MICROLITE_SPIRAM_CAM
111+ # echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
112+ # cd ./boards/esp32/MICROLITE_SPIRAM_CAM
154113
155- echo "Building MICROLITE_SPIRAM_CAM"
156- rm -rf builds
157- idf.py clean build
114+ # echo "Building MICROLITE_SPIRAM_CAM"
115+ # rm -rf builds
116+ # idf.py clean build
158117
159- ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
160- ../../../micropython/ports/esp32
118+ # ../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
119+ # ../../../micropython/ports/esp32
161120
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
121+ # - name: Archive ESP32-MICROLITE_SPIRAM_CAM firmware
122+ # uses: actions/upload-artifact@v2
123+ # with:
124+ # name: microlite-spiram-cam-esp32-firmware
125+ # path: |
126+ # boards/esp32/MICROLITE_SPIRAM_CAM/build/firmware.bin
0 commit comments