File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 57
57
- name : Checkout esp-protocols
58
58
uses : actions/checkout@v4
59
59
- name : Build with IDF-${{ matrix.idf_ver }}
60
+ env :
61
+ MQTT_BROKER_URI : ${{ secrets.MQTT_BROKER_URI }}
60
62
shell : bash
61
63
run : |
62
64
. ${IDF_PATH}/export.sh
65
+ cat examples/mqtt/sdkconfig.defaults.linux
66
+ echo "MQTT_BROKER_URI=${MQTT_BROKER_URI}"
67
+ ./ci/replace.sh examples/mqtt/sdkconfig.defaults.linux
68
+ cat examples/mqtt/sdkconfig.defaults.linux
63
69
python -m pip install idf-build-apps
64
70
python ./ci/build_apps.py examples/mqtt -l -t linux
65
71
timeout 25 ./examples/mqtt/build_linux_default/esp_mqtt_demo.elf | tee test.log || true
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ if [ -z " ${IDF_PATH:- } " ]; then
6
+ echo " Error: IDF_PATH is not set" >&2
7
+ exit 1
8
+ fi
9
+
10
+ ENVSUBST=" $IDF_PATH /tools/ci/envsubst.py"
11
+
12
+ if [ ! -x " $ENVSUBST " ]; then
13
+ echo " Error: envsubst.py not found or not executable at $ENVSUBST " >&2
14
+ exit 1
15
+ fi
16
+
17
+ for file in " $@ " ; do
18
+ if [ ! -f " $file " ]; then
19
+ echo " Warning: $file does not exist, skipping" >&2
20
+ continue
21
+ fi
22
+
23
+ # Create a temporary file to hold the output
24
+ tmpfile=$( mktemp)
25
+
26
+ # Process the file
27
+ cat " $file " | " $ENVSUBST " > " $tmpfile "
28
+
29
+ # Overwrite the original file with the processed content
30
+ mv " $tmpfile " " $file "
31
+
32
+ echo " Processed: $file "
33
+ done
Original file line number Diff line number Diff line change 1
1
CONFIG_IDF_TARGET="linux"
2
2
# CONFIG_ESP_EVENT_POST_FROM_ISR is not set
3
+ CONFIG_BROKER_URL="mqtt://${MQTT_BROKER_URI}"
You can’t perform that action at this time.
0 commit comments