mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-10-08 08:47:35 +00:00
Merge branch 'fix_ci_v5.5' into 'release/v5.5'
MR: ci: Simplify gitlab ci for v5.5 backport branch See merge request espressif/esp-mqtt!316
This commit is contained in:
+19
-84
@@ -30,100 +30,35 @@ before_script:
|
||||
tags:
|
||||
- build
|
||||
- internet
|
||||
variables:
|
||||
IDF_CCACHE_ENABLE: "1"
|
||||
artifacts:
|
||||
paths:
|
||||
- "app_info_*.txt"
|
||||
reports:
|
||||
junit: "build_summary_*.xml"
|
||||
when: always
|
||||
expire_in: 1 week
|
||||
script:
|
||||
# Replace the IDF's default esp-mqtt with this version
|
||||
- cd $IDF_PATH && bash install.sh --enable-ci && cd $MQTT_PATH
|
||||
- rm -rf $IDF_PATH/components/mqtt/esp-mqtt && cp -r $MQTT_PATH $IDF_PATH/components/mqtt/
|
||||
# Build the examples
|
||||
- $MQTT_PATH/ci/build_examples.sh
|
||||
- cd $IDF_PATH
|
||||
- >-
|
||||
idf-build-apps build --build-system cmake --no-check-warnings
|
||||
--junitxml $MQTT_PATH/build_summary_mqtt.xml
|
||||
--collect-app-info $MQTT_PATH/app_info_mqtt.txt
|
||||
-p examples/protocols --modified-components mqtt
|
||||
|
||||
build_idf_v5.0:
|
||||
build_idf_v5.5:
|
||||
extends: .build_template
|
||||
image: espressif/idf:release-v5.0
|
||||
|
||||
build_idf_v5.1:
|
||||
extends: .build_template
|
||||
image: espressif/idf:release-v5.1
|
||||
|
||||
build_idf_v5.2:
|
||||
extends: .build_template
|
||||
image: espressif/idf:release-v5.2
|
||||
|
||||
build_idf_v5.3:
|
||||
extends: .build_template
|
||||
image: espressif/idf:release-v5.3
|
||||
|
||||
build_idf_v5.4:
|
||||
extends: .build_template
|
||||
image: espressif/idf:release-v5.4
|
||||
|
||||
build_idf_latest:
|
||||
extends: .build_template
|
||||
image: espressif/idf:latest
|
||||
image: espressif/idf:release-v5.5
|
||||
|
||||
build_and_host_test:
|
||||
stage: build
|
||||
image: espressif/idf:latest
|
||||
image: espressif/idf:release-v5.5
|
||||
script:
|
||||
# Replace the IDF's default esp-mqtt with this version
|
||||
- rm -rf $IDF_PATH/components/mqtt/esp-mqtt && cp -r $MQTT_PATH $IDF_PATH/components/mqtt/
|
||||
- cd $IDF_PATH/components/mqtt/esp-mqtt/host_test
|
||||
- idf.py build
|
||||
- build/host_mqtt_client_test.elf
|
||||
|
||||
build_and_test_qemu:
|
||||
stage: build
|
||||
image: ${CI_DOCKER_REGISTRY}/qemu-v5.1:1-20220802
|
||||
tags:
|
||||
- build
|
||||
- shiny
|
||||
dependencies: []
|
||||
script:
|
||||
- export IDF_PATH=$CI_PROJECT_DIR/esp-idf
|
||||
- git clone "${IDF_REPO}"
|
||||
# switch to IDF and setup the tools
|
||||
- $MQTT_PATH/ci/set_idf.sh release/v5.1
|
||||
- $IDF_PATH/tools/idf_tools.py install-python-env
|
||||
- cd $IDF_PATH && tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)"
|
||||
# Remove `debug_backend` and Add `paho-mqtt` to the required packages
|
||||
- sed '/debug_backend/d;/pygobject/d' $IDF_PATH/tools/requirements/requirements.ttfw.txt > requirements.txt
|
||||
- python -m pip install -r requirements.txt
|
||||
- python -m pip install paho-mqtt
|
||||
- $MQTT_PATH/ci/set_mqtt.sh $CI_COMMIT_SHA
|
||||
# build publish-connect stress test, setup test parameters
|
||||
- cd tools/test_apps/protocols/mqtt/publish_connect_test && cat sdkconfig.qemu | $IDF_PATH/tools/ci/envsubst.py > sdkconfig.defaults && idf.py build
|
||||
- export TEST_PATH=`pwd` && export MQTT_PUBLISH_TEST=1
|
||||
- export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci/python_packages"
|
||||
# run test (with environment->qemu)
|
||||
- cd $IDF_PATH/tools/ci/python_packages/tiny_test_fw/bin
|
||||
# use more relaxed criteria with QEMU tests
|
||||
- export MQTT_PUBLISH_MSG_len_0=0 MQTT_PUBLISH_MSG_repeat_0=5
|
||||
- export MQTT_PUBLISH_MSG_len_1=2 MQTT_PUBLISH_MSG_repeat_1=50
|
||||
- export MQTT_PUBLISH_MSG_len_2=128 MQTT_PUBLISH_MSG_repeat_2=2
|
||||
- export MQTT_PUBLISH_MSG_len_3=20 MQTT_PUBLISH_MSG_repeat_3=20
|
||||
- python Runner.py $TEST_PATH -c $MQTT_PATH/ci/publish_connect_mqtt_qemu.yml -e $TEST_PATH/env.yml
|
||||
|
||||
check_remotes_sync:
|
||||
stage: test
|
||||
except:
|
||||
- master
|
||||
- idf
|
||||
script:
|
||||
- *add_gh_key_remote
|
||||
- git fetch --depth=1 origin master
|
||||
- git fetch --depth=1 github master
|
||||
- test "$(git rev-parse origin/master)" == "$(git rev-parse github/master)"
|
||||
|
||||
push_master_to_github:
|
||||
stage: deploy
|
||||
image: ${CI_DOCKER_REGISTRY}/esp32-ci-env
|
||||
tags:
|
||||
- build
|
||||
only:
|
||||
- master
|
||||
- idf
|
||||
when: on_success
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
script:
|
||||
- *add_gh_key_remote
|
||||
- git push github HEAD:${CI_COMMIT_REF_NAME}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,2 +0,0 @@
|
||||
build_dir = "$GITHUB_WORKSPACE/build_@t_@n"
|
||||
config="sdkconfig.ci"
|
||||
Reference in New Issue
Block a user