From 55a5d6ef32d2e7567e164f69a36aa2c14edae7f9 Mon Sep 17 00:00:00 2001 From: Euripedes Rocha Filho Date: Wed, 17 Jun 2026 17:03:35 +0200 Subject: [PATCH] ci: Simplify gitlab ci for v5.5 backport branch --- .gitlab-ci.yml | 103 ++++++++--------------------------------- ci/build_examples.sh | 22 --------- ci/idf_build_apps.toml | 2 - 3 files changed, 19 insertions(+), 108 deletions(-) delete mode 100755 ci/build_examples.sh delete mode 100644 ci/idf_build_apps.toml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50e9301..16839b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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} diff --git a/ci/build_examples.sh b/ci/build_examples.sh deleted file mode 100755 index 9643ea2..0000000 --- a/ci/build_examples.sh +++ /dev/null @@ -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 diff --git a/ci/idf_build_apps.toml b/ci/idf_build_apps.toml deleted file mode 100644 index c93a728..0000000 --- a/ci/idf_build_apps.toml +++ /dev/null @@ -1,2 +0,0 @@ -build_dir = "$GITHUB_WORKSPACE/build_@t_@n" -config="sdkconfig.ci"