From 9db9ee764810736635da7944b0f6892b65b66ff5 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Thu, 18 Aug 2022 11:20:39 +0200 Subject: [PATCH] ci: Build and Test QEMU on v5.0 * Patch the QEMU build * Use public containers for build only tests on v5.0 and master --- .gitlab-ci.yml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4fe38adb..4a0804c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,27 +23,27 @@ before_script: - chmod 600 ~/.ssh/id_rsa - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - PATH=$CI_PROJECT_DIR/esp-idf/tools:$PATH - - export IDF_PATH=$CI_PROJECT_DIR/esp-idf - export MQTT_PATH=$CI_PROJECT_DIR -build_with_idf_v5: +.build_template: stage: build - image: ${CI_DOCKER_REGISTRY}/esp-env-v5.0:2 tags: - build - - shiny - dependencies: [] + - internet script: - - git clone "${IDF_REPO}" - - cd ${IDF_PATH} && set +u && source tools/ci/setup_python.sh - - $MQTT_PATH/ci/set_idf.sh master - - $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)" - - $MQTT_PATH/ci/set_mqtt.sh $CI_COMMIT_SHA - - export PEDANTIC_CFLAGS="-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function" - - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS} && export EXTRA_CXXFLAGS=${EXTRA_CFLAGS} + # 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/ + # Build the examples - $MQTT_PATH/ci/build_examples.sh +build_idf_v5.0: + extends: .build_template + image: espressif/idf:release-v5.0 + +build_idf_latest: + extends: .build_template + image: espressif/idf:latest + build_and_test_qemu: stage: build image: ${CI_DOCKER_REGISTRY}/qemu-v5.0:2-20210826 @@ -52,12 +52,15 @@ build_and_test_qemu: - 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 master + - $MQTT_PATH/ci/set_idf.sh release/v5.0 - $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)" - - python -m pip install -r $IDF_PATH/tools/ci/python_packages/ttfw_idf/requirements.txt + # Remove `debug_backend` and Add `paho-mqtt` to the required packages + - sed '/debug_backend/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