未验证 提交 868b1e73 编写于 作者: M Michael O'Cleirigh 提交者: GitHub

Fix esp32 ci build (#310) (#310)

Fixes #294

Copy from xtensa ci scripts to run the test script inside of a docker
container.

We use the espressif/idf:release-v4.3 image.

Add a build that builds the full tensorflow-microlite.a library.

The person detection example is more complicated and not fixed here.
Co-authored-by: NMichael O'Cleirigh <michael.ocleirigh@gmail.com>
Co-authored-by: NAdvait Jain <advaitjain@users.noreply.github.com>
上级 5124fe33
...@@ -23,4 +23,4 @@ jobs: ...@@ -23,4 +23,4 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Test - name: Test
run: | run: |
tensorflow/lite/micro/tools/ci_build/test_esp32.sh docker run --rm -v `pwd`:/opt/tflite-micro espressif/idf:release-v4.3 /opt/tflite-micro/tensorflow/lite/micro/tools/ci_build/test_esp32.sh
...@@ -26,34 +26,34 @@ pwd ...@@ -26,34 +26,34 @@ pwd
source tensorflow/lite/micro/tools/ci_build/helper_functions.sh source tensorflow/lite/micro/tools/ci_build/helper_functions.sh
TARGET=esp TARGET=esp
TARGET_ARCH=xtensa-esp32
# setup esp-idf and toolchains readable_run make -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} third_party_downloads
echo "Checking out esp-idf..."
readable_run git clone --recursive --single-branch --branch release/v4.2 https://github.com/espressif/esp-idf.git
export IDF_PATH="${ROOT_DIR}"/esp-idf
cd $IDF_PATH
readable_run ./install.sh
readable_run . ./export.sh
cd "${ROOT_DIR}"
# clean all # clean all
readable_run make -f tensorflow/lite/micro/tools/make/Makefile clean readable_run make -f tensorflow/lite/micro/tools/make/Makefile clean
# validate esp32 build for libtensorflow-microlite.a
readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} TARGET_TOOLCHAIN_PREFIX=xtensa-esp32-elf-
# generate examples # generate examples
readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} generate_hello_world_esp_project readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} generate_hello_world_esp_project
readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} generate_person_detection_esp_project
readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} generate_micro_speech_esp_project # readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} generate_person_detection_int8_esp_project
readable_run make -j8 -f tensorflow/lite/micro/tools/make/Makefile TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} generate_micro_speech_esp_project
# build examples # build examples
cd "${ROOT_DIR}"/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32/prj/hello_world/esp-idf cd "${ROOT_DIR}"/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_default/prj/hello_world/esp-idf
readable_run idf.py build readable_run idf.py build
cd "${ROOT_DIR}"/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32/prj/person_detection/esp-idf #cd "${ROOT_DIR}"/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_default/prj/person_detection_int8/esp-idf
readable_run git clone https://github.com/espressif/esp32-camera.git components/esp32-camera #readable_run git clone https://github.com/espressif/esp32-camera.git components/esp32-camera
cd components/esp32-camera/ #cd components/esp32-camera/
readable_run git checkout eacd640b8d379883bff1251a1005ebf3cf1ed95c #readable_run git checkout eacd640b8d379883bff1251a1005ebf3cf1ed95c
cd ../../ #cd ../../
readable_run idf.py build #readable_run idf.py build
cd "${ROOT_DIR}"/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32/prj/micro_speech/esp-idf cd "${ROOT_DIR}"/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_default/prj/micro_speech/esp-idf
readable_run idf.py build readable_run idf.py build
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册