From 53e1a47cb50494b3852f52f626f32c62e612d1c2 Mon Sep 17 00:00:00 2001 From: suku Date: Tue, 19 Mar 2024 17:08:04 +0100 Subject: [PATCH] SUKU sync --- .github/workflows/firmware_build.yml | 12 ++++++------ Dockerfile | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100755 Dockerfile diff --git a/.github/workflows/firmware_build.yml b/.github/workflows/firmware_build.yml index 544857f..9c73d39 100644 --- a/.github/workflows/firmware_build.yml +++ b/.github/workflows/firmware_build.yml @@ -17,12 +17,12 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' - - name: esp-idf build - uses: espressif/esp-idf-ci-action@v1 - with: - esp_idf_version: latest - target: esp32s3 - path: 'Firmware' + + - name: Build Docker image containing toolchains + run: docker build -t my-image . + + - name: Run script in Docker container + run: docker run -v $PWD:/project -w /project/ my-image sh -c "cd Firmware && idf.py build" - name: Run Unit Tests run: | diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..2f7e685 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use the base image +FROM docker.io/espressif/idf:v5.1.2 + +# Install pico sdk required dependencies +RUN apt update && \ + apt install -y git python3 cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential xxd && \ + mkdir -p pico && \ + cd pico && \ + git clone https://github.com/raspberrypi/pico-sdk.git --branch master && \ + cd pico-sdk/ && \ + git submodule update --init && \ + cd .. + +# Set working directory +WORKDIR / + +ENV PICO_SDK_PATH=/pico/pico-sdk + +# Define default command +CMD ["bash"]