mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: Allow testing IDF Python tools in the CI context
This commit is contained in:
parent
eef5e73842
commit
ba62e17d40
@ -86,6 +86,15 @@ variables:
|
|||||||
# Update the filename for a specific ESP-IDF release. It is used only with CI_PYTHON_CONSTRAINT_BRANCH.
|
# Update the filename for a specific ESP-IDF release. It is used only with CI_PYTHON_CONSTRAINT_BRANCH.
|
||||||
CI_PYTHON_CONSTRAINT_FILE: "espidf.constraints.v5.0.txt"
|
CI_PYTHON_CONSTRAINT_FILE: "espidf.constraints.v5.0.txt"
|
||||||
|
|
||||||
|
# Set this variable to repository name of a Python tool you wish to install and test in the context of ESP-IDF CI.
|
||||||
|
# Keep the variable empty when not used.
|
||||||
|
CI_PYTHON_TOOL_REPO: ""
|
||||||
|
|
||||||
|
# Set this variable to the branch of a Python tool repo specified in CI_PYTHON_TOOL_REPO. The
|
||||||
|
# branch name must be without the remote part ("origin/"). Keep the variable empty when not used.
|
||||||
|
# This is used only if CI_PYTHON_TOOL_REPO is not empty.
|
||||||
|
CI_PYTHON_TOOL_BRANCH: ""
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key: pip-cache
|
key: pip-cache
|
||||||
paths:
|
paths:
|
||||||
@ -117,6 +126,13 @@ cache:
|
|||||||
mv /tmp/constraint.txt ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
|
mv /tmp/constraint.txt ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
.download_test_python_tool: &download_test_python_tool |
|
||||||
|
if [[ -n "$CI_PYTHON_TOOL_REPO" ]]; then
|
||||||
|
git clone --quiet --depth=1 -b ${CI_PYTHON_TOOL_BRANCH} https://gitlab-ci-token:${ESPCI_TOKEN}@${GITLAB_HTTPS_HOST}/espressif/${CI_PYTHON_TOOL_REPO}.git
|
||||||
|
pip install ./${CI_PYTHON_TOOL_REPO}
|
||||||
|
rm -rf ${CI_PYTHON_TOOL_REPO}
|
||||||
|
fi
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- source tools/ci/utils.sh
|
- source tools/ci/utils.sh
|
||||||
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
|
- is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
|
||||||
@ -129,6 +145,7 @@ before_script:
|
|||||||
- $IDF_PATH/tools/idf_tools.py install-python-env
|
- $IDF_PATH/tools/idf_tools.py install-python-env
|
||||||
# install esptool globally, TODO: remove this, IDFCI-1207
|
# install esptool globally, TODO: remove this, IDFCI-1207
|
||||||
- pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
|
- pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
|
||||||
|
- *download_test_python_tool
|
||||||
|
|
||||||
# used for check scripts which we want to run unconditionally
|
# used for check scripts which we want to run unconditionally
|
||||||
.before_script_no_sync_submodule:
|
.before_script_no_sync_submodule:
|
||||||
@ -161,6 +178,7 @@ before_script:
|
|||||||
- *download_test_python_contraint_file
|
- *download_test_python_contraint_file
|
||||||
# TODO: remove this, IDFCI-1207
|
# TODO: remove this, IDFCI-1207
|
||||||
- pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
|
- pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
|
||||||
|
- *download_test_python_tool
|
||||||
|
|
||||||
.before_script_macos:
|
.before_script_macos:
|
||||||
before_script:
|
before_script:
|
||||||
|
Loading…
Reference in New Issue
Block a user