From 13b90ad14b497abe5cb50e4fe074ab3646ed7791 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 27 Jun 2025 14:31:35 +0200 Subject: [PATCH] fix(mosq): Support build on older IDF branches and added build jobs to CI --- .github/workflows/mosq__build.yml | 2 +- components/mosquitto/Kconfig | 8 ++++++++ .../examples/serverless_mqtt/main/wifi_connect.c | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mosq__build.yml b/.github/workflows/mosq__build.yml index 3d2fa5dca..0182a9f33 100644 --- a/.github/workflows/mosq__build.yml +++ b/.github/workflows/mosq__build.yml @@ -13,7 +13,7 @@ jobs: name: Mosquitto build strategy: matrix: - idf_ver: ["latest", "release-v5.3"] + idf_ver: ["latest", "release-v5.5", "release-v5.4", "release-v5.3", "release-v5.2", "release-v5.1"] runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} env: diff --git a/components/mosquitto/Kconfig b/components/mosquitto/Kconfig index 00d5e0a01..207fa1e7a 100644 --- a/components/mosquitto/Kconfig +++ b/components/mosquitto/Kconfig @@ -1,5 +1,13 @@ menu "Mosquitto" + config MOSQ_IS_ENABLED + # Invisible option that is enabled if MOSQ is added to the IDF components. + # This is used to "select" CONFIG_ESP_TLS_SERVER option (needed for TLS connection) + # (these are optionally used in mosq) + bool + default "y" + select ESP_TLS_SERVER + config MOSQ_ENABLE_SYS bool "Enable $SYS topics" default n diff --git a/components/mosquitto/examples/serverless_mqtt/main/wifi_connect.c b/components/mosquitto/examples/serverless_mqtt/main/wifi_connect.c index aeb3af759..9c8ec1dd3 100644 --- a/components/mosquitto/examples/serverless_mqtt/main/wifi_connect.c +++ b/components/mosquitto/examples/serverless_mqtt/main/wifi_connect.c @@ -3,6 +3,8 @@ * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ +#include "freertos/FreeRTOS.h" +#include "freertos/event_groups.h" #include "nvs_flash.h" #include "esp_event.h" #include "esp_netif.h"