espressif / esp-idf-ci-action

GitHub Action for ESP32 CI
MIT License
67 stars 24 forks source link

Errors across all images (RDT-773) #44

Open kdschlosser opened 5 months ago

kdschlosser commented 5 months ago

I have added the following my Github actions

- uses: espressif/esp-idf-ci-action@v1
      with:
        esp_idf_version: v5.0.4
        target: esp32s3

I need to perform multiple builds, so the "command" parameter is completely useless to me and it defaulting to running idf.py build causes problems. I do not call idf.py at all in my build and because I am building several times I should be able to have it work properly without specifying a build command. I just need it to install everything, set the board and run export. Nothing more.

Ubuntu 22.04 image

Run espressif/esp-idf-ci-action@v1
  with:
    esp_idf_version: v5.0.4
    target: esp32s3
    command: idf.py build
  env:
    pythonLocation: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
    PKG_CONFIG_PATH: /Users/runner/hostedtoolcache/Python/3.10.11/arm64/lib/pkgconfig
    Python_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
    Python2_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
    Python3_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
Run export IDF_TARGET=$(echo "esp32s3" | tr '[:upper:]' '[:lower:]' | tr -d '_-')
  export IDF_TARGET=$(echo "esp32s3" | tr '[:upper:]' '[:lower:]' | tr -d '_-')
  docker run -t -e IDF_TARGET="${IDF_TARGET}" -v "${GITHUB_WORKSPACE}:/app/kdschlosser/lvgl_micropython" \
  -w "/app/kdschlosser/lvgl_micropython/" espressif/idf:v5.0.4 \
  /bin/bash -c 'git config --global --add safe.directory "*" && idf.py build'
  shell: /bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
    PKG_CONFIG_PATH: /Users/runner/hostedtoolcache/Python/3.10.11/arm64/lib/pkgconfig
    Python_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
    Python2_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
    Python3_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.10.11/arm64
/Users/runner/work/_temp/2ac0c02b-13e7-4e61-8725-651d91167d83.sh: line 2: docker: command not found
Error: Process completed with exit code 127.

Windows (latest)

Run espressif/esp-idf-ci-action@v1
Run export IDF_TARGET=$(echo "esp32s3" | tr '[:upper:]' '[:lower:]' | tr -d '_-')
Unable to find image 'espressif/idf:v5.0.4' locally
v5.0.4: Pulling from espressif/idf
docker: no matching manifest for windows/amd64 10.0.20348 in the manifest list entries.
See 'docker run --help'.
Error: Process completed with exit code 125.

macOS (latest)

Run espressif/esp-idf-ci-action@v1
Run export IDF_TARGET=$(echo "esp32s3" | tr '[:upper:]' '[:lower:]' | tr -d '_-')
/Users/runner/work/_temp/2ac0c02b-13e7-4e61-8725-651d91167d83.sh: line 2: docker: command not found
Error: Process completed with exit code 127.

Is only Linux supported? There is nothing that states it is only supported when using the Ubuntu image. I am not sure why it is not working properly for any image.

kumekay commented 5 months ago

Hello @kdschlosser

Do I understand correctly, that you are trying to use this action to install ESP-IDF to the GitHub Action machine on which the workflow runs?

If so, then it's not how this action works. It is a simple wrapper around the official docker image for Linux: https://hub.docker.com/r/espressif/idf. So it expects the project code will be mounted to the docker container and executed in the context of the docker container.

So it only works on a Linux-based 'runs-on' machine and doesn't install anything to the machine itself.

What is the goal of your workflow? Do you want to test the build process of your project on different operating systems?