Skip to content

Commit dcae117

Browse files
committed
test new workflow
1 parent 44b7fbe commit dcae117

File tree

1 file changed

+121
-0
lines changed

1 file changed

+121
-0
lines changed
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: ESP32 C3 test
2+
3+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule
4+
on:
5+
push:
6+
workflow_dispatch:
7+
8+
jobs:
9+
tensorflow_micropython_esp32_c3_build:
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
- name: Prepare to Build Tensorflow Micropython Firmware for ESP32
16+
run: |
17+
git submodule init
18+
git submodule update --recursive
19+
cd micropython
20+
git submodule update --init lib/axtls
21+
git submodule update --init lib/berkeley-db-1.xx
22+
cd ports/esp32
23+
make BOARD= submodules
24+
cd ../../..
25+
cd tflm_esp_kernels
26+
git submodule update --init components/esp32-camera
27+
git submodule update --init components/esp-nn
28+
- name: Get Cache Keys
29+
# later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
30+
# this commit is hard-coded in micropython/tools/ci.sh
31+
run: |
32+
IDF_COMMIT=142bb32c50fa9875b8b69fa539a2d59559460d72
33+
echo "esp-idf-commit=$IDF_COMMIT" >> $GITHUB_ENV
34+
TFLM_COMMIT=$(git submodule status tensorflow | awk '{print ($1)}')
35+
echo "tflm-commit=$TFLM_COMMIT" >> $GITHUB_ENV
36+
# - name: Cache esp-idf
37+
# id: cache-esp-idf
38+
# uses: actions/cache@v2
39+
# env:
40+
# cache-name: cache-esp-idf
41+
# with:
42+
# path: ./esp-idf
43+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.esp-idf-commit }}
44+
- name: Setup IDF
45+
# if: steps.cache-esp-idf.outputs.cache-hit != 'true'
46+
run: |
47+
source ./micropython/tools/ci.sh && ci_esp32_idf44_setup
48+
- name: Cache tflm
49+
id: cache-tflm
50+
uses: actions/cache@v2
51+
env:
52+
cache-name: cache-tflm
53+
with:
54+
path: ./micropython-modules/microlite/tflm
55+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.tflm-commit }}
56+
- name: Setup Build for Tensorflow
57+
# if: steps.cache-tflm.outputs.cache-hit != 'true'
58+
run: |
59+
60+
source ./esp-idf/export.sh
61+
62+
pip3 install Pillow
63+
pip3 install Wave
64+
65+
echo "Regenerating microlite/tfm directory"
66+
rm -rf ./micropython-modules/microlite/tflm
67+
68+
cd ./tensorflow
69+
70+
../micropython-modules/microlite/prepare-tflm-esp.sh
71+
72+
- name: Build micropython cross compiler
73+
run: |
74+
source ./esp-idf/export.sh
75+
cd ./micropython
76+
echo "make -C mpy-cross V=1 clean all"
77+
make -C mpy-cross V=1 clean all
78+
79+
- name: Build ESP32-MICROLITE_C3
80+
run: |
81+
82+
source ./esp-idf/export.sh
83+
84+
echo "cd ./boards/esp32/MICROLITE_C3"
85+
cd ./boards/esp32/MICROLITE_C3
86+
87+
echo "Building ESP32-MICROLITE_C3"
88+
rm -rf builds
89+
idf.py clean build
90+
91+
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
92+
../../../micropython/ports/esp32
93+
94+
- name: Archive ESP32-MICROLITE_C3 firmware
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: microlite-esp32c3-firmware
98+
path: |
99+
boards/esp32/MICROLITE_C3/build/firmware.bin
100+
101+
- name: Build ESP32-MICROLITE_C3_USB
102+
run: |
103+
104+
source ./esp-idf/export.sh
105+
106+
echo "cd ./boards/esp32/MICROLITE_C3_USB"
107+
cd ./boards/esp32/MICROLITE_C3_USB
108+
109+
echo "Building ESP32 MICROLITE_C3_USB"
110+
rm -rf builds
111+
idf.py clean build
112+
113+
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
114+
../../../micropython/ports/esp32
115+
116+
- name: Archive ESP32-MICROLITE_C3_USB firmware
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: microlite-esp32c3-usb-firmware
120+
path: |
121+
boards/esp32/MICROLITE_C3_USB/build/firmware.bin

0 commit comments

Comments
 (0)