Skip to content

Fix build

Fix build #396

Workflow file for this run

name: ESP32
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule
on:
push:
pull_request:
paths-ignore:
- "examples/**"
- "README.md"
- "ci/*unix*.sh"
- ".github/workflows/build_unix.yml"
jobs:
tensorflow_micropython_esp32_build:
runs-on: ubuntu-latest
container:
image: espressif/idf:release-v4.3
steps:
- name: install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: setup
run: |
apt update
apt install git
git config --global --add safe.directory /__w/tensorflow-micropython-examples/tensorflow-micropython-examples
- name: Checkout repository
uses: actions/checkout@v2
- name: Prepare to Build Tensorflow Micropython Firmware for ESP32
run: |
git submodule init
git submodule update --recursive
cd micropython
git submodule update --init lib/axtls
git submodule update --init lib/berkeley-db-1.xx
cd ports/esp32
make BOARD= submodules
cd ../../..
cd tflm_esp_kernels
git submodule update --init components/esp32-camera
git submodule update --init components/esp-nn
- name: Setup Build for Tensorflow
# if: steps.cache-tflm.outputs.cache-hit != 'true'
run: |
pip3 install Pillow
pip3 install Wave
pwd
echo "Regenerating microlite/tfm directory"
rm -rf ./micropython-modules/microlite/tflm
cd /__w/tensorflow-micropython-examples/tensorflow-micropython-examples/tensorflow
../micropython-modules/microlite/prepare-tflm-esp.sh
- name: Build micropython cross compiler
run: |
cd /__w/tensorflow-micropython-examples/tensorflow-micropython-examples
cd ./micropython
echo "make -C mpy-cross V=1 clean all"
make -C mpy-cross V=1 clean all
- name: Build standard non-psram 4MB Flash firmware
run: |
# source ./esp-idf/export.sh
echo "cd ./boards/esp32/MICROLITE"
cd ./boards/esp32/MICROLITE
echo "Building MICROLITE"
rm -rf builds
idf.py clean build
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
../../../micropython/ports/esp32
- name: Archive ESP32-MICROLITE firmware
uses: actions/upload-artifact@v4
with:
name: microlite-esp32-firmware
path: |
boards/esp32/MICROLITE/build/firmware.bin
- name: Build with psram support and 16MB Flash firmware
run: |
echo "cd ./boards/esp32/MICROLITE_SPIRAM_16M"
cd ./boards/esp32/MICROLITE_SPIRAM_16M
echo "Building MICROLITE_SPIRAM_16M"
rm -rf build
idf.py clean build
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
../../../micropython/ports/esp32
- name: Archive ESP32-MICROLITE-SPIRAM-16M firmware
uses: actions/upload-artifact@v4
with:
name: microlite-spiram-16m-esp32-firmware
path: |
boards/esp32/MICROLITE_SPIRAM_16M/build/firmware.bin
- name: Build with psram support
run: |
source ./esp-idf/export.sh
echo "cd ./boards/esp32/MICROLITE_SPIRAM"
cd ./boards/esp32/MICROLITE_SPIRAM
echo "Building MICROLITE_SPIRAM"
rm -rf build
idf.py clean build
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
../../../micropython/ports/esp32
- name: Archive ESP32-MICROLITE-SPIRAM firmware
uses: actions/upload-artifact@v4
with:
name: microlite-spiram-esp32-firmware
path: |
boards/esp32/MICROLITE_SPIRAM/build/firmware.bin
- name: Build MICROLITE_SPIRAM_CAM
run: |
source ./esp-idf/export.sh
echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
cd ./boards/esp32/MICROLITE_SPIRAM_CAM
echo "Building MICROLITE_SPIRAM_CAM"
rm -rf builds
idf.py clean build
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
../../../micropython/ports/esp32
- name: Archive ESP32-MICROLITE_SPIRAM_CAM firmware
uses: actions/upload-artifact@v4
with:
name: microlite-spiram-cam-esp32-firmware
path: |
boards/esp32/MICROLITE_SPIRAM_CAM/build/firmware.bin