代码拉取完成,页面将自动刷新
同步操作将从 乐鑫开源/esp-adf 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
stages:
- build
- build_ut
- assign_test
- target_test
# - example_test
- deploy
variables:
# System environment
# Common parameters for the 'make' during CI tests
MAKEFLAGS: "-j5 --no-keep-going"
# more attempts for more robust
GET_SOURCES_ATTEMPTS: "10"
ARTIFACT_DOWNLOAD_ATTEMPTS: "10"
# We use get_sources.sh script to fetch the submodules and/or re-fetch the repo
# if it was corrupted (if submodule update fails this can happen)
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: none
ADF_PATH: "$CI_PROJECT_DIR"
IDF_PATH: "$CI_PROJECT_DIR/esp-idf"
CI_TARGET_UT_TEST_CONFIG_FILE: "$CI_PROJECT_DIR/tools/ci/target-ut-test.yml"
.setup_tools_unless_target_test: &setup_tools_unless_target_test |
if [[ "$SETUP_TOOLS" == "1" || "$CI_JOB_STAGE" != "target_test" ]]; then
$IDF_PATH/tools/idf_tools.py --non-interactive install && eval "$($IDF_PATH/tools/idf_tools.py --non-interactive export)" || exit 1
fi
.set_idf_version_and_update: &set_idf_version_and_update
$ADF_PATH/tools/ci/set_idf.sh ${IDF_VERSION}
before_script:
# add gitlab ssh key
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# replace submodule esp-idf to internal repository to speedup cloning
- sed -i "s%https://github.com/espressif/esp-idf%${GITLAB_SSH_SERVER}/idf/esp-idf.git%" .gitmodules
# replace submodule esp-adf-libs to internal repository to speedup cloning
- sed -i "s%https://github.com/espressif/esp-adf-libs%${GITLAB_SSH_SERVER}/adf/esp-adf-libs.git%" .gitmodules
# - sed -i "s%https://github.com/espressif/esp-sr.git%${GITLAB_SSH_SERVER}/speech-recognition-internal/esp_sr_public.git%" .gitmodules
- git config --global http.postBuffer 524288000
- git submodule update --init
- echo "current path:"$(pwd)
- cd $ADF_PATH/..
- if [[ ! -d "$ADF_PATH/../adf-libs-ut/" ]]; then git clone ssh://[email protected]:27227/adf/adf-libs-ut.git;else echo "adf-libs-ut folder already exists";fi
- cd -
- if [ -e $ADF_UT/tools/CreateSectionTable.pyc ]; then rm -f $ADF_UT/tools/CreateSectionTable.pyc; fi
# To disable set -e for automatic error detection, due to the switch_branch.sh use $? check return value
- set +e +o pipefail
- source $ADF_PATH/tools/ut/switch_branch.sh
- set -e -o pipefail
- if [ "$IDF_VERSION" = "release/v4.4" ];then cd $IDF_PATH; git checkout $IDF_VERSION; $IDF_PATH/tools/idf_tools.py --non-interactive install && eval "$($IDF_PATH/tools/idf_tools.py --non-interactive export)";fi
# - cd $IDF_PATH
# - git checkout $IDF_VERSION
# - $IDF_PATH/tools/idf_tools.py --non-interactive install && eval "$($IDF_PATH/tools/idf_tools.py --non-interactive export)"
- source $IDF_PATH/tools/ci/setup_python.sh
- if [ "$IDF_VERSION" != "release/v4.4" ];then source esp-idf/tools/ci/configure_ci_environment.sh;fi
# (the same regular expressions are used to set these are used in 'only:' sections below
# - source esp-idf/tools/ci/configure_ci_environment.sh
# fetch the submodules (& if necessary re-fetch repo) from gitlab
.add_gitlab_key_before:
before_script: &add_gitlab_key_before
- echo "Not fetching submodules"
- source $IDF_PATH/tools/ci/configure_ci_environment.sh
# add gitlab ssh key
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $AUTO_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
.add_gitlab_key_before_ut:
before_script: &add_gitlab_key_before_ut
- echo "Not fetching submodules"
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- source $IDF_PATH/tools/ci/setup_python.sh
- source $IDF_PATH/tools/ci/configure_ci_environment.sh
.build_template: &build_template
stage: build
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
tags:
- build
variables:
BATCH_BUILD: "1"
V: "0"
.build_template_v44: &build_template_v44
stage: build
image: $CI_DOCKER_REGISTRY/esp-env:v4.4-1
tags:
- build
variables:
BATCH_BUILD: "1"
V: "0"
.build_examples_make: &build_examples_make
<<: *build_template
parallel: 8
# This is a workaround for a rarely encountered issue with building examples in CI.
# Probably related to building of Kconfig in 'make clean' stage
retry: 1
artifacts:
when: always
paths:
- build_examples/*/*/*/build/*.bin
- build_examples/*/*/*/sdkconfig
- build_examples/*/*/*/build/*.elf
- build_examples/*/*/*/build/*.map
- build_examples/*/*/*/build/download.config
- build_examples/*/*/*/build/bootloader/*.bin
- build_examples/*/*/*/*/build/partition_table/*.bin
- $LOG_PATH
expire_in: 4 days
variables:
IDF_CI_BUILD: "1"
LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
script:
# it's not possible to build 100% out-of-tree and have the "artifacts"
# mechanism work, but this is the next best thing
- cd ${ADF_PATH}
- rm -rf build_examples
- mkdir build_examples
- cd build_examples
- mkdir -p ${LOG_PATH}
- echo "The IDF branch is v3.3(722043f734)"
- $ADF_PATH/tools/ci/set_idf.sh "722043f734"
# enable pedantic flags for compilation
- 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}
- ${ADF_PATH}/tools/ci/build_examples.sh
# Check if the tests demand Make built binaries. If not, delete them
- if [ "$EXAMPLE_TEST_BUILD_SYSTEM" == "make" ]; then exit 0; fi
- cd ..
- rm -rf build_examples
# same as above, but for CMake
.build_examples_cmake: &build_examples_cmake
extends: .build_template
parallel: 8
artifacts:
when: always
paths:
- build_examples/list.json
- build_examples/list_job_*.json
- build_examples/*/*/*/sdkconfig
- build_examples/*/*/*/build/*.bin
- build_examples/*/*/*/build/*.elf
- build_examples/*/*/*/build/*.map
- build_examples/*/*/*/build/flasher_args.json
- build_examples/*/*/*/build/bootloader/*.bin
- build_examples/*/*/*/build/partition_table/*.bin
- $LOG_PATH
expire_in: 4 days
variables:
LOG_PATH: "$CI_PROJECT_DIR/log_examples"
BUILD_PATH: "$CI_PROJECT_DIR/build_examples"
only:
variables:
- $BOT_TRIGGER_WITH_LABEL == null
- $BOT_LABEL_BUILD
- $BOT_LABEL_EXAMPLE_TEST
- $BOT_LABEL_REGULAR_TEST
- $BOT_LABEL_WEEKEND_TEST
script:
# it's not possible to build 100% out-of-tree and have the "artifacts"
# mechanism work, but this is the next best thing
- mkdir -p ${BUILD_PATH}
- mkdir -p ${LOG_PATH}
- echo "The IDF branch is "${IDF_VERSION}
- $ADF_PATH/tools/ci/set_idf.sh ${IDF_VERSION}
- *setup_tools_unless_target_test
- export PEDANTIC_CFLAGS="-Werror -Wno-implicit-fallthrough"
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS} && export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
- ${ADF_PATH}/tools/ci/build_examples_cmake.sh
# Check if the tests demand CMake built binaries. If not, delete them
- if [ "$EXAMPLE_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
- cd ..
- rm -rf build_examples
# same as above, but for v4.4
.build_examples_cmake_v44: &build_examples_cmake_v44
<<: *build_template_v44
parallel: 8
artifacts:
when: always
paths:
- build_examples/list.json
- build_examples/list_job_*.json
- build_examples/*/*/*/sdkconfig
- build_examples/*/*/*/build/*.bin
- build_examples/*/*/*/build/*.elf
- build_examples/*/*/*/build/*.map
- build_examples/*/*/*/build/flasher_args.json
- build_examples/*/*/*/build/bootloader/*.bin
- build_examples/*/*/*/build/partition_table/*.bin
- $LOG_PATH
- $EXAMPLE_TEST_OUTPUT_DIR
expire_in: 4 days
before_script:
# - source $IDF_PATH/tools/ci/configure_ci_environment.sh
variables:
SIZE_INFO_LOCATION: "$CI_PROJECT_DIR/size_info.txt"
LOG_PATH: "$CI_PROJECT_DIR/log_examples"
BUILD_PATH: "$CI_PROJECT_DIR/build_examples"
EXAMPLE_TEST_OUTPUT_DIR: ${CI_PROJECT_DIR}/examples/test_configs
CI_SCAN_TESTS_PY: ${CI_PROJECT_DIR}/esp-idf/tools/ci/python_packages/ttfw_idf/CIScanTests.py
EXAMPLE_TEST_DIR: ${CI_PROJECT_DIR}/examples
TEST_PREFIX: examples
TEST_RELATIVE_DIR: examples
TEST_TYPE: example_test
SCAN_TEST_JSON: ${CI_PROJECT_DIR}/${TEST_RELATIVE_DIR}/test_configs/scan_${IDF_TARGET}_${BUILD_SYSTEM}.json
PYTHON_VER: 3
# TEST_CONFIG_FILE: ${CI_PROJECT_DIR}/esp-idf/tools/ci/config/target-test.yml
# TEST_CONFIG_FILE: "$CI_PROJECT_DIR/esp-idf/.gitlab/ci/target-test.yml"
only:
variables:
- $BOT_TRIGGER_WITH_LABEL == null
- $BOT_LABEL_BUILD
- $BOT_LABEL_EXAMPLE_TEST
- $BOT_LABEL_REGULAR_TEST
- $BOT_LABEL_WEEKEND_TEST
script:
# it's not possible to build 100% out-of-tree and have the "artifacts"
# mechanism work, but this is the next best thing
- mkdir -p ${BUILD_PATH}
- mkdir -p ${LOG_PATH}
- echo "The IDF branch is "${IDF_VERSION}
- $ADF_PATH/tools/ci/set_idf.sh ${IDF_VERSION}
- source $IDF_PATH/tools/ci/configure_ci_environment.sh
- *setup_tools_unless_target_test
- pip3 install junit_xml
- pip3 install netifaces
- export PYTHONPATH=$IDF_PATH/tools/ci/python_packages:$IDF_PATH/tools
- echo "Ready to scan the examples"
- python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b cmake --exclude $ADF_PATH/examples/korvo_du1906 -c $TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
- export PEDANTIC_CFLAGS="-Werror -Wno-implicit-fallthrough"
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS} && export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
# - ${ADF_PATH}/tools/ci/build_examples_cmake.sh
- ${IDF_PATH}/tools/ci/find_apps_build_apps.sh
# Check if the tests demand CMake built binaries. If not, delete them
- if [ "$EXAMPLE_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
- cd ..
- rm -rf build_examples
.build_ut_template: &build_ut_template
stage: build_ut
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
tags:
- adf_build
variables:
BATCH_BUILD: "1"
V: "0"
.build_esp_adf_unit_test_template: &build_esp_adf_unit_test_template
<<: *build_ut_template
only:
variables:
- $BOT_TRIGGER_WITH_LABEL == null
- $BOT_LABEL_BUILD
- $BOT_LABEL_UNIT_TEST
- $BOT_LABEL_REGULAR_TEST
.build_esp_adf_unit_test_v44_template: &build_esp_adf_unit_test_v44_template
stage: build_ut
image: $CI_DOCKER_REGISTRY/esp-env:v4.4-1
tags:
- adf_build
variables:
BATCH_BUILD: "1"
V: "0"
only:
variables:
- $BOT_TRIGGER_WITH_LABEL == null
- $BOT_LABEL_BUILD
- $BOT_LABEL_UNIT_TEST
- $BOT_LABEL_REGULAR_TEST
.add_adf_components_to_ut_make_build: &add_adf_components_to_ut_make_build
- cd $ADF_PATH/../adf-libs-ut
- export ADF_UT=$(pwd)
- cd $ADF_PATH
- sed -i '/EXTRA_COMPONENT_DIRS += \$(ADF_PATH)\/components\//a\EXTRA_COMPONENT_DIRS += $(ADF_UT)/esp_audio' project.mk
- git log -2
- cd $IDF_PATH
- $ADF_PATH/tools/ci/set_idf.sh ${IDF_VERSION}
# - if [[ "$SETUP_TOOLS" == "1" || "$CI_JOB_STAGE" != "target_test" ]]; then
# $IDF_PATH/tools/idf_tools.py --non-interactive install && eval "$($IDF_PATH/tools/idf_tools.py --non-interactive export)" || exit 1
# fi
- source $IDF_PATH/tools/ci/configure_ci_environment.sh
- git apply $ADF_PATH/idf_patches/idf_v3.3_freertos.patch
- git apply $ADF_PATH/idf_patches/idf_v3.3_esp_http_client.patch
- cd -
- cd $IDF_PATH/tools/unit-test-app
- cp $ADF_UT/sdkconfig.defaults ./
- rm -rf $IDF_PATH/tools/ci
- cp -rf $ADF_UT/ci $IDF_PATH/tools
- sed -i "s%CRITICAL_LEAK_THRESHOLD = 4096%CRITICAL_LEAK_THRESHOLD = 26240%" $IDF_PATH/tools/unit-test-app/components/test_utils/test_runner.c
- sed -i "s%include \$(IDF_PATH)\/make\/project.mk%include \$(ADF_PATH)\/project.mk%g" Makefile
.add_adf_components_to_ut_v44_make_build: &add_adf_components_to_ut_v44_make_build
- cd $ADF_PATH/../adf-libs-ut
- export ADF_UT=$(pwd)
- cd $ADF_PATH
- sed -i '/EXTRA_COMPONENT_DIRS += \$(ADF_PATH)\/components\//a\EXTRA_COMPONENT_DIRS += $(ADF_UT)/esp_audio' project.mk
- git log -2
- cd $IDF_PATH
- $ADF_PATH/tools/ci/set_idf.sh ${IDF_VERSION}
# - if [[ "$SETUP_TOOLS" == "1" || "$CI_JOB_STAGE" != "target_test" ]]; then
# $IDF_PATH/tools/idf_tools.py --non-interactive install && eval "$($IDF_PATH/tools/idf_tools.py --non-interactive export)" || exit 1
# fi
- source $IDF_PATH/tools/ci/configure_ci_environment.sh
- git apply $ADF_PATH/idf_patches/idf_v4.4_freertos.patch
- cd -
- cd $IDF_PATH/tools/unit-test-app
- cp $ADF_UT/sdkconfig_v44.defaults ./sdkconfig.defaults
- rm -rf $IDF_PATH/tools/ci
- cp -rf $ADF_UT/ci $IDF_PATH/tools
- sed -i "s%include \$(IDF_PATH)\/make\/project.mk%include \$(ADF_PATH)\/project.mk%g" Makefile
.build_esp_adf_tests_make:
<<: *build_esp_adf_unit_test_template
artifacts:
paths:
- $IDF_PATH/components/idf_test/unit_test/TestCaseAll.yml
- $IDF_PATH/tools/unit-test-app/
- $IDF_PATH/tools/unit-test-app/output
- $IDF_PATH/tools/unit-test-app/build/*.elf
- $IDF_PATH/tools/unit-test-app/build/*.map
- $IDF_PATH/tools/unit-test-app/build/*.bin
- $IDF_PATH/tools/unit-test-app/build/download.config
- $IDF_PATH/tools/unit-test-app/build/bootloader/*
- $IDF_PATH/tools/tiny-test-fw/
- $IDF_PATH/tools/ci
- $IDF_PATH/components/esptool_py/esptool/
- $IDF_PATH/components/partition_table/
# when: always
expire_in: 4 days
dependencies: []
variables:
LOG_PATH: "$CI_PROJECT_DIR/log_ut_make"
OUTPUT_PATH: ${IDF_PATH}/tools/unit-test-app/output
script:
- echo $PATH
- xtensa-esp32-elf-gcc -v
# - *set_idf_version_and_update
- *add_adf_components_to_ut_make_build
- MAKEFLAGS= make help # make sure kconfig tools are built in single process
- make clean
- make -j8 TEST_COMPONENTS="$ADF_UT/esp_audio"
- make print_flash_cmd > build/download.config
- mkdir adf_configs
- mkdir output
- mkdir output/default
- mkdir $IDF_PATH/components/idf_test/unit_test
- python --version
- pyenv global 2.7.15
- cp configs/default adf_configs/
- cp sdkconfig output/default/
- cp -ar build/*.bin output/default
- cp -ar build/*.elf output/default
- cp -ar build/*.map output/default
- cp -ar build/bootloader output/default
- cd $ADF_UT
- python tools/UnitTestParser.py
.build_esp_adf_tests_v44_make:
<<: *build_esp_adf_unit_test_v44_template
artifacts:
paths:
- $IDF_PATH/components/idf_test/unit_test/TestCaseAll.yml
- $IDF_PATH/tools/unit-test-app/
- $IDF_PATH/tools/unit-test-app/output
- $IDF_PATH/tools/unit-test-app/build/*.elf
- $IDF_PATH/tools/unit-test-app/build/*.map
- $IDF_PATH/tools/unit-test-app/build/*.bin
- $IDF_PATH/tools/unit-test-app/build/download.config
- $IDF_PATH/tools/unit-test-app/build/bootloader/*
- $IDF_PATH/tools/tiny-test-fw/
- $IDF_PATH/tools/ci
- $IDF_PATH/components/esptool_py/esptool/
- $IDF_PATH/components/partition_table/
# when: always
expire_in: 4 days
dependencies: []
variables:
LOG_PATH: "$CI_PROJECT_DIR/log_ut_make"
OUTPUT_PATH: ${IDF_PATH}/tools/unit-test-app/output
script:
- echo $PATH
- xtensa-esp32-elf-gcc -v
- *add_adf_components_to_ut_v44_make_build
- MAKEFLAGS= make help # make sure kconfig tools are built in single process
- make clean
- make -j8 TEST_COMPONENTS="$ADF_UT/esp_audio"
- make print_flash_cmd > build/download.config
- mkdir adf_configs
- mkdir output
- mkdir output/default
- mkdir $IDF_PATH/components/idf_test/unit_test
- cp configs/default adf_configs/
- cp -ar adf_configs $ADF_UT
- find / -name $ADF_UT/adf_configs
- cp sdkconfig output/default/
- cp -ar build/*.bin output/default
- cp -ar build/*.elf output/default
- cp -ar build/*.map output/default
- cp -ar build/bootloader output/default
- cp -r build $CI_PROJECT_DIR
- cd $IDF_PATH
- git checkout .
- git checkout -- $IDF_PATH/components/freertos/include/freertos/task.h $IDF_PATH/components/freertos/tasks.c $IDF_PATH/tools/unit-test-app/Makefile $IDF_PATH/tools/unit-test-app/components/test_utils/test_runner.c $IDF_PATH/tools/unit-test-app/sdkconfig.defaults
- rm -rf tools/ci/apply_bot_filter.py tools/ci/build_examples.sh tools/ci/build_examples_cmake.sh tools/ci/check-executable.sh tools/ci/check-line-endings.sh tools/ci/check_examples_cmake_make.sh
# use the 'tools/UnitTestParser.py' of release/v3.3 in order to generate 'idf_test/unit_test/TestCaseAll.yml'
- git checkout 722043f734
- git submodule update --init --recursive
- cd -
- pyenv install 2.7.15
- pyenv global 2.7.15
- pyenv rehash
- cd $IDF_PATH
- ./install.sh
- . ./export.sh
- cd -
- cp $CI_PROJECT_DIR/build $IDF_PATH/tools/unit-test-app -r
- cp -ar $ADF_UT/adf_configs $IDF_PATH/tools/unit-test-app
- cd $ADF_UT
- pip install netifaces
- pip install pyyaml
- pip install junit_xml
- python tools/UnitTestParser.py
- sed -i "23i\ - V44" $IDF_PATH/components/idf_test/unit_test/TestCaseAll.yml
adf_ut_make_v33:
extends: .build_esp_adf_tests_make
variables:
IDF_VERSION: 722043f734
IDF_TARGET: esp32
adf_ut_make_v44:
extends: .build_esp_adf_tests_v44_make
variables:
IDF_VERSION: release/v4.4
IDF_TARGET: esp32
build_examples_v41_cmake:
extends: .build_examples_cmake
variables:
IDF_TARGET: esp32
IDF_VERSION: release/v4.1
IDF_FIND_APP_PATH_ARG: ""
build_examples_v42_cmake:
extends: .build_examples_cmake
variables:
IDF_TARGET: esp32
IDF_VERSION: release/v4.2
IDF_FIND_APP_PATH_ARG: ""
build_examples_v43_cmake:
extends: .build_examples_cmake_v44
variables:
IDF_TARGET: esp32
IDF_VERSION: release/v4.3
BUILD_SYSTEM: cmake
IDF_FIND_APP_PATH_ARG: "-p"
TEST_CONFIG_FILE: ${CI_PROJECT_DIR}/esp-idf/tools/ci/config/target-test.yml
build_examples_v44_cmake:
extends: .build_examples_cmake_v44
variables:
IDF_TARGET: esp32
IDF_VERSION: release/v4.4
BUILD_SYSTEM: cmake
IDF_FIND_APP_PATH_ARG: "-p"
TEST_CONFIG_FILE: "$CI_PROJECT_DIR/esp-idf/.gitlab/ci/target-test.yml"
.build_examples_cmake_s2:
extends: .build_examples_cmake
variables:
IDF_TARGET: esp32s2beta
IDF_VERSION: release/v4.1
IDF_FIND_APP_PATH_ARG: "-p"
build_examples_v33_make:
<<: *build_examples_make
.build_adf_test:
<<: *build_template
artifacts:
when: always
paths:
- adf-cli/build/*.bin
- adf-cli/build/*.elf
- adf-cli/build/*.map
- adf-cli/build/download.config
- adf-cli/build/bootloader/*.bin
- $IDF_PATH/tools/ci
- $IDF_PATH/components/esptool_py
- $IDF_PATH/components/partition_table
expire_in: 1 month
script:
- cd ${IDF_PATH}
- git submodule update --init --recursive
- cd ${ADF_PATH}/components/esp-adf-libs
- git log -2
- cd ${ADF_PATH}
- git clone ${ADF_TEST_CLI_REPO}
- cd adf-cli
- git checkout ${CI_COMMIT_REF_NAME} || echo "Using adf-cli default branch..."
- make defconfig
- make
- make print_flash_cmd > build/download.config
build_docs:
stage: build
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env:v7
tags:
- build_docs
artifacts:
when: always
paths:
# English version of documentation
- docs/en/doxygen-warning-log.txt
- docs/en/sphinx-warning-log.txt
- docs/en/sphinx-warning-log-sanitized.txt
- docs/en/_build/html
# Chinese version of documentation
- docs/zh_CN/doxygen-warning-log.txt
- docs/zh_CN/sphinx-warning-log.txt
- docs/zh_CN/sphinx-warning-log-sanitized.txt
- docs/zh_CN/_build/html
expire_in: 1 mos
script:
- source /opt/pyenv/activate && pyenv global 3.6.10
- /opt/pyenv/pyenv-1.2.16/versions/3.6.10/bin/python -m pip install --user -r docs/requirements.txt
- cd docs
- ./check_lang_folder_sync.sh
- cd en
- make gh-linkcheck
- make html
- ../check_doc_warnings.sh
- cd ../zh_CN
- make gh-linkcheck
- make html
- ../check_doc_warnings.sh
.assign_test_template: &assign_test_template
tags:
- adf_assign_test
# image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
image: $CI_DOCKER_REGISTRY/ubuntu-test-env:old1 # just a temporary solution
stage: assign_test
artifacts:
paths:
- $IDF_PATH/components/idf_test/*/CIConfigs
- $IDF_PATH/components/idf_test/*/TC.sqlite
when: always
expire_in: 1 week
only:
variables:
- $BOT_TRIGGER_WITH_LABEL == null
- $BOT_LABEL_UNIT_TEST
- $BOT_LABEL_INTEGRATION_TEST
- $BOT_LABEL_EXAMPLE_TEST
before_script: *add_gitlab_key_before_ut
script:
- ls
- pwd
- python $UNIT_ASSIGN_SCRIPT $IDF_PATH/components/idf_test/unit_test/TestCaseAll.yml $CI_TARGET_UT_TEST_CONFIG_FILE $IDF_PATH/components/idf_test/unit_test/CIConfigs
assign_test_v33:
<<: *assign_test_template
dependencies:
- adf_ut_make_v33
variables:
# UNIT_ASSIGN_SCRIPT: "esp-adf-internal/esp-idf/tools/tiny-test-fw/CIAssignUnitTest.py"
UNIT_ASSIGN_SCRIPT: "esp-idf/tools/tiny-test-fw/CIAssignUnitTest.py"
PYTHON_VER: 3.7.7
assign_test_v44:
<<: *assign_test_template
dependencies:
- adf_ut_make_v44
variables:
UNIT_ASSIGN_SCRIPT: "esp-idf/tools/tiny-test-fw/CIAssignUnitTest.py"
PYTHON_VER: 3.7.7
.assign_test:
tags:
- assign_test
image: $CI_DOCKER_REGISTRY/audio_test_env$BOT_DOCKER_IMAGE_TAG
stage: assign_test
# gitlab ci do not support match job with RegEx or wildcard now in dependencies.
# we have a lot build example jobs. now we don't use dependencies, just download all artificats of build stage.
dependencies:
- build_examples_v44_cmake
- build_examples_v33_make
variables:
TEST_FW_PATH: "$CI_PROJECT_DIR/general-test-framework"
EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
AUTO_TEST_PATH: "$CI_PROJECT_DIR/audio_auto_test"
artifacts:
paths:
- $TEST_FW_PATH
- $EXAMPLE_CONFIG_OUTPUT_PATH
- $AUTO_TEST_PATH
expire_in: 1 mos
before_script: *add_gitlab_key_before
script:
- source /opt/pyenv/activate
- pyenv global 3.5.5
- git clone ${AUDIO_AUTO_REPO}
- git clone ${TEST_FW_REPO}
# assign example tests
- python $TEST_FW_PATH/CIAssignExampleTest.py $CI_PROJECT_DIR/examples $CI_PROJECT_DIR/.gitlab-ci.yml $EXAMPLE_CONFIG_OUTPUT_PATH
push_to_github:
stage: deploy
only:
- master
- /^release\/v/
# when: on_success
image: $CI_DOCKER_REGISTRY/esp32-ci-env
variables:
GIT_STRATEGY: clone
before_script:
- echo "skip default before_script"
script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GH_PUSH_KEY >> ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- git remote remove github &>/dev/null || true
- git remote add github [email protected]:espressif/esp-adf.git
- tools/ci/push_to_github.sh
include:
- 'tools/ci/target-ut-test.yml'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。