esphome / build-action

Apache License 2.0
15 stars 12 forks source link

Since ESPHOME 2024.6.1 the Action fails #34

Closed andrewjswan closed 5 months ago

andrewjswan commented 5 months ago

Action step:

- name: Build firmware
  uses: esphome/build-action@v1
  id: esphome-build
  with:
    yaml_file: ${{ matrix.config-file }}
    version: latest

ESPHome config:

esphome:
  name: $device
  comment: $comment
  build_path: ./.build/$device
  project:
    name: $project_name
    version: $project_version

Log:

  Building .pioenvs/esp_air_freesh/firmware.bin
  esp8266_copy_factory_bin([".pioenvs/esp_air_freesh/firmware.bin"], [".pioenvs/esp_air_freesh/firmware.elf"])
  esp8266_copy_ota_bin([".pioenvs/esp_air_freesh/firmware.bin"], [".pioenvs/esp_air_freesh/firmware.elf"])
  ========================= [SUCCESS] Took 79.47 seconds =========================
...
Copy firmware file(s) to folder
  Traceback (most recent call last):
    File "/entrypoint.py", line 103, in <module>
      shutil.copyfile(source_bin, dest_bin)
    File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
      with open(src, 'rb') as fsrc:
           ^^^^^^^^^^^^^^^
  FileNotFoundError: [Errno 2] No such file or directory: '/github/workspace/.esphome/.build/esp_air_freesh/.pioenvs/esp_air_freesh/firmware-factory.bin'
  Error: Process completed with exit code 1.

On 2024.5.3 the build went without problems.

andrewjswan commented 5 months ago

IDEData:

Get IDEData
  {
    "build_type": "release",
    "env_name": "esp_air_freesh",
    "libsource_dirs": [
      "/github/workspace/.esphome/.build/esp_air_freesh/lib",
      "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh",
      "/piolibs",
      "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries"
    ],
    "defines": [
      "PLATFORMIO=60115",
      "ESP8266",
      "ARDUINO_ARCH_ESP8266",
      "ARDUINO_ESP8266_WEMOS_D1MINI",
      "ESPHOME_LOG_LEVEL=ESPHOME_LOG_LEVEL_INFO",
      "NEW_OOM_ABORT",
      "PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH",
      "PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY",
      "USE_ARDUINO",
      "USE_ESP8266",
      "USE_ESP8266_FRAMEWORK_ARDUINO",
      "USE_STORE_LOG_STR_IN_FLASH",
      "F_CPU=80000000L",
      "__ets__",
      "ICACHE_FLASH",
      "_GNU_SOURCE",
      "ARDUINO=10805",
      "ARDUINO_BOARD=\"PLATFORMIO_D1_MINI\"",
      "ARDUINO_BOARD_ID=\"d1_mini\"",
      "FLASHMODE_DOUT",
      "LWIP_OPEN_SRC",
      "NONOSDK22x_190703=1",
      "TCP_MSS=1460",
      "LWIP_FEATURES=0",
      "LWIP_IPV6=0",
      "VTABLES_IN_FLASH",
      "MMU_IRAM_SIZE=0x8000",
      "MMU_ICACHE_SIZE=0x8000"
    ],
    "includes": {
      "build": [
        "/github/workspace/.esphome/.build/esp_air_freesh/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ArduinoJson/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/AsyncMqttClient-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncWebServer-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncTCP-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/cores/esp8266",
        "/home/runner/.platformio/packages/toolchain-xtensa/include",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/variants/d1_mini"
      ],
      "compatlib": [
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ArduinoJson/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncWebServer-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/AsyncMqttClient-esphome/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncTCP-esphome/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/AsyncMqttClient-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncWebServer-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncTCP-esphome/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncTCP-esphome/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncWebServer-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src",
        "/github/workspace/.esphome/.build/esp_air_freesh/.piolibdeps/esp_air_freesh/ESPAsyncTCP-esphome/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src",
        "/piolibs/ArduinoJson/src",
        "/piolibs/AsyncMqttClient-esphome/src",
        "/piolibs/Crypto",
        "/piolibs/Dsmr/src",
        "/piolibs/ESP32-audioI2S/src",
        "/piolibs/ESPAsyncTCP-esphome/src",
        "/piolibs/ESPAsyncWebServer-esphome/src",
        "/piolibs/FastLED",
        "/piolibs/HaierProtocol/include",
        "/piolibs/HaierProtocol/src",
        "/piolibs/HeatpumpIR",
        "/piolibs/IRremoteESP8266/src",
        "/piolibs/Improv/src",
        "/piolibs/MideaUART/include",
        "/piolibs/MideaUART/src",
        "/piolibs/NeoPixelBus/src",
        "/piolibs/TM1651",
        "/piolibs/TinyGPSPlus/src",
        "/piolibs/arduino-MLX90393",
        "/piolibs/esp_mbedtls_esp8266/mbedtls/include",
        "/piolibs/esp_mbedtls_esp8266/mbedtls/library",
        "/piolibs/esp_mbedtls_esp8266/configs",
        "/piolibs/esp_wireguard/include",
        "/piolibs/esp_wireguard/src",
        "/piolibs/libsodium/libsodium/src/libsodium/include",
        "/piolibs/libsodium/libsodium/src/libsodium",
        "/piolibs/libsodium/libsodium/src/libsodium/include/sodium",
        "/piolibs/libsodium/port_include",
        "/piolibs/noise-c/include",
        "/piolibs/noise-c/src",
        "/piolibs/noise-c@0.1.1/include",
        "/piolibs/noise-c@0.1.1/src",
        "/piolibs/qr-code-generator-library/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ArduinoOTA",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/EEPROM",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266AVRISP/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPClient/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPUpdateServer/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266LLMNR",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266NetBIOS",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SSDP",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SdFat/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFiMesh/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266httpUpdate/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Ethernet/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/FSTools",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/GDBStub/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/I2S/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/LittleFS/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Netdump/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/SD/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/SDFS/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/SPI",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/SPISlave/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Servo/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/TFT_Touch_Shield_V2",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Ticker/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/Wire",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/esp8266/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_Ethernet/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_PPP/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_enc28j60/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_w5100/src",
        "/home/runner/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_w5500/src"
      ],
      "toolchain": [
        "/home/runner/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0",
        "/home/runner/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/xtensa-lx106-elf",
        "/home/runner/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/10.3.0/include",
        "/home/runner/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/10.3.0/include-fixed",
        "/home/runner/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include"
      ]
    },
    "cc_flags": [
      "-std=gnu17",
      "-Wpointer-arith",
      "-Wno-implicit-function-declaration",
      "-Wl,-EL",
      "-fno-inline-functions",
      "-nostdlib",
      "-Wno-nonnull-compare",
      "-Wno-sign-compare",
      "-Wno-unused-but-set-variable",
      "-Wno-unused-variable",
      "-fno-exceptions",
      "-Os",
      "-mlongcalls",
      "-mtext-section-literals",
      "-falign-functions=4",
      "-U__STRICT_ANSI__",
      "-ffunction-sections",
      "-fdata-sections",
      "-Wall",
      "-Werror=return-type",
      "-free",
      "-fipa-pta"
    ],
    "cxx_flags": [
      "-fno-rtti",
      "-std=gnu++17",
      "-fno-exceptions",
      "-Wno-nonnull-compare",
      "-Wno-sign-compare",
      "-Wno-unused-but-set-variable",
      "-Wno-unused-variable",
      "-fno-exceptions",
      "-Os",
      "-mlongcalls",
      "-mtext-section-literals",
      "-falign-functions=4",
      "-U__STRICT_ANSI__",
      "-ffunction-sections",
      "-fdata-sections",
      "-Wall",
      "-Werror=return-type",
      "-free",
      "-fipa-pta"
    ],
    "cc_path": "/home/runner/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc",
    "cxx_path": "/home/runner/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++",
    "gdb_path": "/home/runner/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gdb",
    "prog_path": "/github/workspace/.esphome/.build/esp_air_freesh/.pioenvs/esp_air_freesh/firmware.elf",
    "svd_path": null,
    "compiler_type": "gcc",
    "targets": [
      {
        "name": "buildfs",
        "title": "Build Filesystem Image",
        "description": null,
        "group": "Platform"
      },
      {
        "name": "size",
        "title": "Program Size",
        "description": "Calculate program size",
        "group": "Platform"
      },
      {
        "name": "upload",
        "title": "Upload",
        "description": null,
        "group": "Platform"
      },
      {
        "name": "uploadfs",
        "title": "Upload Filesystem Image",
        "description": null,
        "group": "Platform"
      },
      {
        "name": "uploadfsota",
        "title": "Upload Filesystem Image OTA",
        "description": null,
        "group": "Platform"
      },
      {
        "name": "erase",
        "title": "Erase Flash",
        "description": null,
        "group": "Platform"
      }
    ],
    "extra": {
      "flash_images": []
    }
  }
bruvv commented 5 months ago

I think it is because the publish build is using an old esphome release: https://github.com/esphome/workflows/blob/main/.github/workflows/publish.yml#L53

andrewjswan commented 5 months ago

I think it is because the publish build is using an old esphome release:

Maybe, but why then on 2024.5.3 did the same Action work without problems?

andrewjswan commented 5 months ago

I looked at the releases and realized that the Documentation (README.md) is out of date and the version needs to be updated. Updated to 3, everything works:

      - name: Build firmware
        uses: esphome/build-action@v3
        id: esphome-build
        with:
          yaml_file: ${{ matrix.config-file }}
          version: latest

@bruvv Thanks!

bruvv commented 5 months ago

Yup i forked it and changed it so if you want to publish the firmware use my branch: https://github.com/bruvv/workflows until @jesserockz updates it.