diff --git a/.github/workflows/build_and_push.yml b/.github/workflows/build_and_push.yml index b0c9181..108166a 100644 --- a/.github/workflows/build_and_push.yml +++ b/.github/workflows/build_and_push.yml @@ -94,6 +94,7 @@ jobs: - armhf - aarch64 - coverage + - esp32 # - chibios-py2 # Deprecated steps: - uses: actions/checkout@v4 diff --git a/docker/Dockerfile_dev-esp32 b/docker/Dockerfile_dev-esp32 new file mode 100644 index 0000000..da13fcd --- /dev/null +++ b/docker/Dockerfile_dev-esp32 @@ -0,0 +1,39 @@ +# syntax=docker/dockerfile:1 +ARG TAG="latest" +FROM ardupilot/ardupilot-dev-base:${TAG} + +# ESP-IDF system deps not already provided by the base image +RUN apt-get update && apt-get install --no-install-recommends -y \ + bison \ + dfu-util \ + flex \ + gperf \ + libffi-dev \ + libncurses-dev \ + libssl-dev \ + libusb-1.0-0 \ + python3-cryptography \ + python3-pyelftools \ + python3-setuptools \ + python3-venv \ + && apt-get clean \ + && apt-get -y autoremove \ + && apt-get autoclean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# Bake the ESP-IDF toolchain at the commit pinned by ardupilot's +# Tools/scripts/esp32_get_idf.sh. Keep these two in sync: when ardupilot bumps the +# IDF pin, update IDF_COMMIT here, rebuild and retag this image, then bump the tag +# referenced by ardupilot's .github/workflows/esp32_build.yml. +ARG IDF_COMMIT="cc3203dc4f087ab41b434afff1ed7520c6d90993" +ENV IDF_PATH=/opt/esp_idf +ENV IDF_TOOLS_PATH=/opt/espressif +RUN git clone -b release/v5.3 https://github.com/espressif/esp-idf.git "$IDF_PATH" \ + && cd "$IDF_PATH" \ + && git checkout "$IDF_COMMIT" \ + && git submodule update --init --recursive --depth=1 \ + && ./install.sh esp32,esp32s3 \ + && rm -rf "$IDF_TOOLS_PATH/dist" + +# Build-time python deps the workflow used to pip-install on every run +RUN python -m pip install --no-cache-dir -U pymavlink MAVProxy geocoder dronecan "pydantic<2.12" diff --git a/scripts/build_all.sh b/scripts/build_all.sh index 4635419..029a996 100755 --- a/scripts/build_all.sh +++ b/scripts/build_all.sh @@ -25,6 +25,8 @@ echo "BUILDING COVERAGE" docker build -t ardupilot/ardupilot-dev-coverage:latest -f Dockerfile_dev-coverage . echo "BUILDING PERIPH" docker build -t ardupilot/ardupilot-dev-periph:latest -f Dockerfile_dev-periph . +echo "BUILDING ESP32" +docker build -t ardupilot/ardupilot-dev-esp32:latest -f Dockerfile_dev-esp32 . echo "BUILDING ROS2 HUMBLE" docker build --build-arg ROS_DISTRO=humble -t ardupilot/ardupilot-dev-ros:humble -f Dockerfile_dev-ros . echo "BUILDING ROS2 JAZZY"