initial commmit
This commit is contained in:
11
managed_components/esp_mqtt/ci/build-test-rules.yml
Normal file
11
managed_components/esp_mqtt/ci/build-test-rules.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
|
||||
|
||||
examples/protocols:
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32"]
|
||||
|
||||
examples/protocols/mqtt/ssl_ds:
|
||||
disable:
|
||||
- if: SOC_DIG_SIGN_SUPPORTED != 1
|
||||
temporary: false
|
||||
reason: DS not present
|
||||
22
managed_components/esp_mqtt/ci/build_examples.sh
Normal file
22
managed_components/esp_mqtt/ci/build_examples.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# build mqtt examples with make if $1=="make", with cmake otherwise
|
||||
set -o errexit # Exit if command failed.
|
||||
|
||||
if [ -z $IDF_PATH ] ; then
|
||||
echo "Mandatory variables undefined"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
examples="tcp ssl ssl_mutual_auth ws wss"
|
||||
for i in $examples; do
|
||||
echo "Building MQTT example $i"
|
||||
cd $IDF_PATH/examples/protocols/mqtt/$i
|
||||
if [[ "$1" = "make" ]]; then
|
||||
make defconfig
|
||||
make -j 4
|
||||
else
|
||||
rm -rf build sdkconfig
|
||||
idf.py build
|
||||
fi;
|
||||
done
|
||||
2
managed_components/esp_mqtt/ci/idf_build_apps.toml
Normal file
2
managed_components/esp_mqtt/ci/idf_build_apps.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
build_dir = "$GITHUB_WORKSPACE/build_@t_@n"
|
||||
config="sdkconfig.ci"
|
||||
33
managed_components/esp_mqtt/ci/modify_for_legacy_idf.sh
Normal file
33
managed_components/esp_mqtt/ci/modify_for_legacy_idf.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
LATEST_IDF=master
|
||||
else
|
||||
LATEST_IDF=$1
|
||||
fi
|
||||
|
||||
# This snipped prepares environment for using esp-mqtt repository separately from idf -- legacy use before IDFv3.2
|
||||
#
|
||||
esp_mqtt_path=`pwd`
|
||||
mkdir -p ${esp_mqtt_path}/examples
|
||||
pushd
|
||||
cd $IDF_PATH
|
||||
former_commit_id=`git rev-parse HEAD`
|
||||
git checkout ${LATEST_IDF}
|
||||
|
||||
for example in tcp; do
|
||||
cp -r $IDF_PATH/examples/protocols/mqtt/${example} ${esp_mqtt_path}/examples
|
||||
echo 'EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/../../../' > ${esp_mqtt_path}/examples/${example}/Makefile
|
||||
cat $IDF_PATH/examples/protocols/mqtt/${example}/Makefile >> ${esp_mqtt_path}/examples/${example}/Makefile
|
||||
echo "CONFIG_MQTT_TRANSPORT_SSL=" >> ${esp_mqtt_path}/examples/${example}/sdkconfig.defaults
|
||||
echo "CONFIG_MQTT_TRANSPORT_WEBSOCKET=" >> ${esp_mqtt_path}/examples/${example}/sdkconfig.defaults
|
||||
done
|
||||
|
||||
cp -r $IDF_PATH/components/tcp_transport ${esp_mqtt_path}/..
|
||||
rm ${esp_mqtt_path}/../tcp_transport/transport_ssl.c
|
||||
echo -e "#include \"esp_transport.h\"\nvoid esp_transport_ws_set_path(esp_transport_handle_t t, const char *path) {}" > ${esp_mqtt_path}/../tcp_transport/transport_ws.c
|
||||
|
||||
cp $IDF_PATH/components/mqtt/Kconfig ${esp_mqtt_path}
|
||||
sed 's/esp-mqtt/\./g' $IDF_PATH/components/mqtt/component.mk > ${esp_mqtt_path}/component.mk
|
||||
git checkout $former_commit_id
|
||||
popd
|
||||
@@ -0,0 +1,7 @@
|
||||
CaseConfig:
|
||||
- name: test_app_protocol_mqtt_publish_connect
|
||||
overwrite:
|
||||
dut:
|
||||
class: ESP32QEMUDUT
|
||||
package: ttfw_idf
|
||||
|
||||
19
managed_components/esp_mqtt/ci/set_idf.sh
Normal file
19
managed_components/esp_mqtt/ci/set_idf.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# sets up the IDF repo incl submodules with specified version as $1
|
||||
set -o errexit # Exit if command failed.
|
||||
|
||||
if [ -z $IDF_PATH ] || [ -z $MQTT_PATH ] || [ -z $1 ] ; then
|
||||
echo "Mandatory variables undefined"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
echo "Checking out IDF version $1"
|
||||
cd $IDF_PATH
|
||||
# Cleans out the untracked files in the repo, so the next "git checkout" doesn't fail
|
||||
git clean -f
|
||||
git checkout $1
|
||||
# Removes the mqtt submodule, so the next submodule update doesn't fail
|
||||
rm -rf $IDF_PATH/components/mqtt/esp-mqtt
|
||||
git submodule update --init --recursive
|
||||
|
||||
16
managed_components/esp_mqtt/ci/set_mqtt.sh
Normal file
16
managed_components/esp_mqtt/ci/set_mqtt.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# sets the mqtt in IDF tree as a submodule with the version specified as $1
|
||||
set -o errexit # Exit if command failed.
|
||||
|
||||
if [ -z $IDF_PATH ] || [ -z $MQTT_PATH ] || [ -z $1 ] ; then
|
||||
echo "Mandatory variables undefined"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
echo "Checking out MQTT version to $1"
|
||||
# exchange remotes of mqtt submodules with plain copy
|
||||
cd $IDF_PATH/components/mqtt/esp-mqtt
|
||||
rm -rf .git # removes the actual IDF referenced version
|
||||
cp -r $MQTT_PATH/.git . # replaces with the MQTT_PATH (CI checked tree)
|
||||
git reset --hard $1 # sets the requested version
|
||||
Reference in New Issue
Block a user