1+
2+ name : ESP32 S2
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+
14+ jobs :
15+ tensorflow_micropython_esp32s2_build :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v2
21+ - name : Prepare to Build Tensorflow Micropython Firmware for ESP32
22+ run : |
23+ git submodule init
24+ git submodule update --recursive
25+ cd micropython
26+ git submodule update --init lib/axtls
27+ git submodule update --init lib/berkeley-db-1.xx
28+ cd ports/esp32
29+ make BOARD= submodules
30+ cd ../../..
31+ - name : Get Cache Keys
32+ # later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
33+ # this commit is hard-coded in micropython/tools/ci.sh
34+ run : |
35+ IDF_COMMIT=5bb59b00e72f8f91eb24d8c65bf9a7ea2b8a4f5f
36+ echo "esp-idf-commit=$IDF_COMMIT" >> $GITHUB_ENV
37+ TFLM_COMMIT=$(git submodule status tensorflow | awk '{print ($1)}')
38+ echo "tflm-commit=$TFLM_COMMIT" >> $GITHUB_ENV
39+ # - name: Cache esp-idf
40+ # id: cache-esp-idf
41+ # uses: actions/cache@v2
42+ # env:
43+ # cache-name: cache-esp-idf
44+ # with:
45+ # path: ./esp-idf
46+ # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.esp-idf-commit }}
47+ - name : Setup IDF
48+ # if: steps.cache-esp-idf.outputs.cache-hit != 'true'
49+ run : |
50+ source ./micropython/tools/ci.sh && ci_esp32_idf44_setup
51+ - name : Cache tflm
52+ id : cache-tflm
53+ uses : actions/cache@v2
54+ env :
55+ cache-name : cache-tflm
56+ with :
57+ path : ./micropython-modules/microlite/tflm
58+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.tflm-commit }}
59+ - name : Setup Build for Tensorflow
60+ if : steps.cache-tflm.outputs.cache-hit != 'true'
61+ run : |
62+
63+ source ./esp-idf/export.sh
64+
65+ pip3 install Pillow
66+ pip3 install Wave
67+
68+ echo "Regenerating microlite/tfm directory"
69+ rm -rf ./micropython-modules/microlite/tflm
70+
71+ cd ./tensorflow
72+
73+ ../micropython-modules/microlite/prepare-tflm-esp.sh
74+
75+ - name : Build micropython cross compiler
76+ run : |
77+ source ./esp-idf/export.sh
78+ cd ./micropython
79+ echo "make -C mpy-cross V=1 clean all"
80+ make -C mpy-cross V=1 clean all
81+
82+ - name : Build ESP32 S2 with SPIRAM
83+ run : |
84+ source ./esp-idf/export.sh
85+
86+ echo "cd ./boards/esp32/MICROLITE_S2_SPIRAM"
87+ cd ./boards/esp32/MICROLITE_S2_SPIRAM
88+
89+ echo "Building MICROLITE_S2_SPIRAM"
90+ rm -rf builds
91+ idf.py clean build
92+
93+
94+
95+ - name : Archive ESP32-MICROLITE_S2_SPIRAM firmware
96+ uses : actions/upload-artifact@v2
97+ with :
98+ name : microlite-esp3223-spiram-firmware
99+ path : |
100+ boards/esp32/MICROLITE_S2_SPIRAM/build/bootloader/bootloader.bin
101+ boards/esp32/MICROLITE_S2_SPIRAM/build/partition_table/partition-table.bin
102+ boards/esp32/MICROLITE_S2_SPIRAM/build/micropython.bin
0 commit comments