Skip to content

Commit 812dfdc

Browse files
authored
Create esp32s3_test.yml
1 parent 02bc31b commit 812dfdc

File tree

1 file changed

+172
-0
lines changed

1 file changed

+172
-0
lines changed

.github/workflows/esp32s3_test.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
2+
name: ESP32 S3 new
3+
4+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule
5+
on:
6+
push:
7+
pull_request:
8+
paths-ignore:
9+
- 'examples/**'
10+
- 'README.md'
11+
- 'ci/*unix*.sh'
12+
- '.github/workflows/build_unix.yml'
13+
workflow_dispatch:
14+
15+
jobs:
16+
tensorflow_micropython_esp32_s3_build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
- name: Prepare to Build Tensorflow Micropython Firmware for ESP32
23+
run: |
24+
git submodule init
25+
git submodule update --recursive
26+
cd micropython
27+
git submodule update --init lib/axtls
28+
git submodule update --init lib/berkeley-db-1.xx
29+
cd ports/esp32
30+
make BOARD= submodules
31+
cd ../../..
32+
cd tflm_esp_kernels
33+
git submodule update --init components/esp32-camera
34+
git submodule update --init components/esp-nn
35+
- name: Get Cache Keys
36+
# later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
37+
# this commit is hard-coded in micropython/tools/ci.sh
38+
run: |
39+
IDF_COMMIT=5bb59b00e72f8f91eb24d8c65bf9a7ea2b8a4f5f
40+
echo "esp-idf-commit=$IDF_COMMIT" >> $GITHUB_ENV
41+
TFLM_COMMIT=$(git submodule status tensorflow | awk '{print ($1)}')
42+
echo "tflm-commit=$TFLM_COMMIT" >> $GITHUB_ENV
43+
# - name: Cache esp-idf
44+
# id: cache-esp-idf
45+
# uses: actions/cache@v2
46+
# env:
47+
# cache-name: cache-esp-idf
48+
# with:
49+
# path: ./esp-idf
50+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.esp-idf-commit }}
51+
- name: Setup IDF
52+
# if: steps.cache-esp-idf.outputs.cache-hit != 'true'
53+
run: |
54+
source ./micropython/tools/ci.sh && ci_esp32_idf44_setup
55+
- name: Cache tflm
56+
id: cache-tflm
57+
uses: actions/cache@v2
58+
env:
59+
cache-name: cache-tflm
60+
with:
61+
path: ./micropython-modules/microlite/tflm
62+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.tflm-commit }}
63+
- name: Setup Build for Tensorflow
64+
if: steps.cache-tflm.outputs.cache-hit != 'true'
65+
run: |
66+
67+
source ./esp-idf/export.sh
68+
69+
pip3 install Pillow
70+
pip3 install Wave
71+
72+
echo "Regenerating microlite/tfm directory"
73+
rm -rf ./micropython-modules/microlite/tflm
74+
75+
cd ./tensorflow
76+
77+
../micropython-modules/microlite/prepare-tflm-esp.sh
78+
79+
- name: Build micropython cross compiler
80+
run: |
81+
source ./esp-idf/export.sh
82+
cd ./micropython
83+
echo "make -C mpy-cross V=1 clean all"
84+
make -C mpy-cross V=1 clean all
85+
86+
- name: Build standard non-ps ram ESP32 S3 8MB FLASH
87+
run: |
88+
89+
source ./esp-idf/export.sh
90+
91+
echo "cd ./boards/esp32/MICROLITE_S3"
92+
cd ./boards/esp32/MICROLITE_S3
93+
94+
echo "Building ESP32-MICROLITE_S3"
95+
rm -rf builds
96+
idf.py clean build
97+
98+
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
99+
../../../micropython/ports/esp32
100+
101+
- name: Archive ESP32-MICROLITE_S3 firmware
102+
uses: actions/upload-artifact@v2
103+
with:
104+
name: microlite-esp32s3-firmware
105+
path: |
106+
boards/esp32/MICROLITE_S3/build/firmware.bin
107+
108+
- name: Build ESP32 S3 psram support and 8MB Flash firmware
109+
run: |
110+
111+
source ./esp-idf/export.sh
112+
113+
echo "cd ./boards/esp32/MICROLITE_S3_SPIRAM"
114+
cd ./boards/esp32/MICROLITE_S3_SPIRAM
115+
116+
echo "Building ESP32-MICROLITE_S3_SPIRAM"
117+
rm -rf builds
118+
idf.py clean build
119+
120+
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
121+
../../../micropython/ports/esp32
122+
123+
- name: Archive ESP32-MICROLITE_S3_SPIRAM firmware
124+
uses: actions/upload-artifact@v2
125+
with:
126+
name: microlite-esp32s3-spiram-firmware
127+
path: |
128+
boards/esp32/MICROLITE_S3_SPIRAM/build/firmware.bin
129+
130+
- name: Build ESP32 S3 psram support and 8MB Flash firmware - spiram cs gpio 20
131+
run: |
132+
133+
source ./esp-idf/export.sh
134+
135+
echo "cd ./boards/esp32/MICROLITE_S3_SPIRAM_CS_GPIO_20"
136+
cd ./boards/esp32/MICROLITE_S3_SPIRAM_CS_GPIO_20
137+
138+
echo "Building ESP32-MICROLITE_S3_SPIRAM_CS_GPIO_20"
139+
rm -rf builds
140+
idf.py clean build
141+
142+
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
143+
../../../micropython/ports/esp32
144+
145+
- name: Archive ESP32-MICROLITE_S3_SPIRAM_CS_GPIO_20 firmware
146+
uses: actions/upload-artifact@v2
147+
with:
148+
name: microlite-esp32-s3-spiram-cs-gpio-20-firmware
149+
path: |
150+
boards/esp32/MICROLITE_S3_SPIRAM_CS_GPIO_20/build/firmware.bin
151+
152+
- name: Build ESP32 S3 psram support and 8MB Flash firmware - OCTAL SPIRAM
153+
run: |
154+
155+
source ./esp-idf/export.sh
156+
157+
echo "cd ./boards/esp32/MICROLITE_S3_SPIRAM_OCTAL"
158+
cd ./boards/esp32/MICROLITE_S3_SPIRAM_OCTAL
159+
160+
echo "Building ESP32-MICROLITE_S3_SPIRAM_OCTAL"
161+
rm -rf builds
162+
idf.py clean build
163+
164+
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
165+
../../../micropython/ports/esp32
166+
167+
- name: Archive ESP32-MICROLITE_S3_SPIRAM_OCTAL firmware
168+
uses: actions/upload-artifact@v2
169+
with:
170+
name: microlite-esp32-s3-spiram-octal-firmware
171+
path: |
172+
boards/esp32/MICROLITE_S3_SPIRAM_OCTAL/build/firmware.bin

0 commit comments

Comments
 (0)