From b684730da29d9261fa31798c6f1f7becf19840ee Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Fri, 29 Jul 2022 16:12:22 +0800 Subject: [PATCH] ci: use the new requirement txt will be cleaned up in IDFCI-1347 --- .gitlab-ci.yml | 15 +++++---------- .gitlab/ci/docs.yml | 8 ++++---- .gitlab/ci/upload_cache.yml | 4 +--- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 055687c0db..357d3dddbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -211,7 +211,7 @@ before_script: # This adds tools (compilers) and the version-specific Python environment to PATH - *setup_tools_unless_target_test # Install packages required by CI scripts into IDF Python environment - - pip install -r $IDF_PATH/tools/ci/python_packages/ttfw_idf/requirements.txt + - pip install -r $IDF_PATH/tools/requirements/requirements.ci.txt - source tools/ci/configure_ci_environment.sh # Part of tools/ci/setup_python.sh; we don't use pyenv on macOS, so can't run the rest of the script. - export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH" @@ -228,9 +228,8 @@ before_script: - *setup_tools_unless_target_test - fetch_submodules - *download_test_python_contraint_file - - $IDF_PATH/tools/idf_tools.py install-python-env --features pytest - # TODO: remove this, IDFCI-1207 - - pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE} + # only need ci and pytest related packages, ttfw requirements would be mocked if not installed + - $IDF_PATH/tools/idf_tools.py install-python-env --features pytest,ci - eval "$($IDF_PATH/tools/idf_tools.py export)" # use idf venv instead .before_script_build_jobs: @@ -244,13 +243,9 @@ before_script: - *setup_tools_unless_target_test - fetch_submodules - *download_test_python_contraint_file - - $IDF_PATH/tools/idf_tools.py install-python-env --features pytest - # TODO: remove this, IDFCI-1207 - - pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE} + # only need ci and pytest related packages, ttfw requirements would be mocked if not installed + - $IDF_PATH/tools/idf_tools.py install-python-env --features pytest,ci - eval "$($IDF_PATH/tools/idf_tools.py export)" # use idf venv instead - # not only need pytest related packages, but also needs ttfw requirements - - internal_pip_install $IDF_BUILD_APPS_PROJ idf_build_apps - - pip install -r tools/ci/python_packages/ttfw_idf/requirements.txt -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE} - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS} - export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS} diff --git a/.gitlab/ci/docs.yml b/.gitlab/ci/docs.yml index 9a17a99145..c781c77a52 100644 --- a/.gitlab/ci/docs.yml +++ b/.gitlab/ci/docs.yml @@ -62,7 +62,7 @@ check_docs_lang_sync: dependencies: [] script: - cd docs - - pip install -U -r requirements.txt + - pip install -U -r $IDF_PATH/tools/requirements/requirements.docs.txt - build-docs -t $DOCTGT -bs $DOC_BUILDERS -l $DOCLANG build parallel: matrix: @@ -76,7 +76,7 @@ check_docs_gh_links: - .doc-rules:build:docs script: - cd docs - - pip install -U -r requirements.txt + - pip install -U -r $IDF_PATH/tools/requirements/requirements.docs.txt - build-docs gh-linkcheck # stage: build_doc @@ -161,7 +161,7 @@ build_docs_pdf: script: - add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER - export GIT_VER=$(git describe --always ${PIPELINE_COMMIT_SHA} --) - - pip install -U -r docs/requirements.txt + - pip install -U -r $IDF_PATH/tools/requirements/requirements.docs.txt - deploy-docs # stage: test_deploy @@ -227,5 +227,5 @@ check_doc_links: allow_failure: true script: - cd docs - - pip install -U -r requirements.txt + - pip install -U -r $IDF_PATH/tools/requirements/requirements.docs.txt - build-docs -t $DOCTGT -l $DOCLANG linkcheck diff --git a/.gitlab/ci/upload_cache.yml b/.gitlab/ci/upload_cache.yml index 0b2f166195..b2ddb81bc4 100644 --- a/.gitlab/ci/upload_cache.yml +++ b/.gitlab/ci/upload_cache.yml @@ -24,9 +24,7 @@ upload-pip-cache: - is_based_on_commits $REQUIRED_ANCESTOR_COMMITS - source tools/ci/setup_python.sh - rm -rf .cache/pip # clear old packages - - $IDF_PATH/tools/idf_tools.py install-python-env --features pytest - # TODO: remove this, IDFCI-1207 - - pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE} + - $IDF_PATH/tools/idf_tools.py install-python-env --features pytest,ci parallel: matrix: - GEO: [ 'shiny', 'brew' ]