mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/ci_custom_constraint_file' into 'master'
CI: Support using a custom Python constraint file for testing purposes See merge request espressif/esp-idf!16927
This commit is contained in:
commit
9d0cf89656
@ -75,6 +75,14 @@ variables:
|
|||||||
# cache python dependencies
|
# cache python dependencies
|
||||||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
||||||
|
|
||||||
|
# Set this variable to the branch of idf-constraints repo in order to test a custom Python constraint file. The
|
||||||
|
# branch name must be without the remote part ("origin/"). Keep the variable empty in order to use the constraint
|
||||||
|
# file from https://dl.espressif.com/dl/esp-idf.
|
||||||
|
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"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .cache/pip
|
- .cache/pip
|
||||||
@ -95,6 +103,13 @@ cache:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
.download_test_python_contraint_file: &download_test_python_contraint_file |
|
||||||
|
if [[ -n "$CI_PYTHON_CONSTRAINT_BRANCH" ]]; then
|
||||||
|
wget -O /tmp/constraint.txt --header="Authorization:Bearer ${ESPCI_TOKEN}" https://gitlab.espressif.cn:6688/api/v4/projects/2581/repository/files/${CI_PYTHON_CONSTRAINT_FILE}/raw?ref=${CI_PYTHON_CONSTRAINT_BRANCH}
|
||||||
|
mkdir -p ~/.espressif
|
||||||
|
mv /tmp/constraint.txt ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
|
||||||
|
fi
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- source tools/ci/utils.sh
|
- source tools/ci/utils.sh
|
||||||
- source tools/ci/setup_python.sh
|
- source tools/ci/setup_python.sh
|
||||||
@ -102,6 +117,7 @@ before_script:
|
|||||||
- source tools/ci/configure_ci_environment.sh
|
- source tools/ci/configure_ci_environment.sh
|
||||||
- *setup_tools_unless_target_test
|
- *setup_tools_unless_target_test
|
||||||
- fetch_submodules
|
- fetch_submodules
|
||||||
|
- *download_test_python_contraint_file
|
||||||
- $IDF_PATH/tools/idf_tools.py install-python-env
|
- $IDF_PATH/tools/idf_tools.py install-python-env
|
||||||
|
|
||||||
# used for check scripts which we want to run unconditionally
|
# used for check scripts which we want to run unconditionally
|
||||||
@ -111,6 +127,7 @@ before_script:
|
|||||||
- source tools/ci/utils.sh
|
- source tools/ci/utils.sh
|
||||||
- source tools/ci/setup_python.sh
|
- source tools/ci/setup_python.sh
|
||||||
- source tools/ci/configure_ci_environment.sh
|
- source tools/ci/configure_ci_environment.sh
|
||||||
|
- *download_test_python_contraint_file
|
||||||
- $IDF_PATH/tools/idf_tools.py install-python-env
|
- $IDF_PATH/tools/idf_tools.py install-python-env
|
||||||
|
|
||||||
.before_script_minimal:
|
.before_script_minimal:
|
||||||
@ -122,6 +139,7 @@ before_script:
|
|||||||
before_script:
|
before_script:
|
||||||
- source tools/ci/utils.sh
|
- source tools/ci/utils.sh
|
||||||
- export IDF_TOOLS_PATH="${HOME}/.espressif_runner_${CI_RUNNER_ID}_${CI_CONCURRENT_ID}"
|
- export IDF_TOOLS_PATH="${HOME}/.espressif_runner_${CI_RUNNER_ID}_${CI_CONCURRENT_ID}"
|
||||||
|
- *download_test_python_contraint_file
|
||||||
- $IDF_PATH/tools/idf_tools.py install-python-env
|
- $IDF_PATH/tools/idf_tools.py install-python-env
|
||||||
# On macOS, these tools need to be installed
|
# On macOS, these tools need to be installed
|
||||||
- $IDF_PATH/tools/idf_tools.py --non-interactive install cmake ninja
|
- $IDF_PATH/tools/idf_tools.py --non-interactive install cmake ninja
|
||||||
@ -142,6 +160,7 @@ before_script:
|
|||||||
- source tools/ci/configure_ci_environment.sh
|
- source tools/ci/configure_ci_environment.sh
|
||||||
- *setup_tools_unless_target_test
|
- *setup_tools_unless_target_test
|
||||||
- fetch_submodules
|
- fetch_submodules
|
||||||
|
- *download_test_python_contraint_file
|
||||||
- $IDF_PATH/tools/idf_tools.py install-python-env
|
- $IDF_PATH/tools/idf_tools.py install-python-env
|
||||||
- cd /tmp
|
- cd /tmp
|
||||||
- retry_failed git clone --depth 1 --branch $PYTEST_EMBEDDED_TAG https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/idf/pytest-embedded.git
|
- retry_failed git clone --depth 1 --branch $PYTEST_EMBEDDED_TAG https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/idf/pytest-embedded.git
|
||||||
|
Loading…
x
Reference in New Issue
Block a user