mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
200 lines
6.4 KiB
YAML
200 lines
6.4 KiB
YAML
stages:
|
|
- build
|
|
- docs
|
|
|
|
variables:
|
|
IDF_PATH: "$CI_PROJECT_DIR/esp-idf"
|
|
GIT_STRATEGY: fetch
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
|
|
.chip_submodule_update: &chip_submodule_update
|
|
- git submodule sync --recursive
|
|
- git submodule update --recursive --init --reference /local_references/github/
|
|
|
|
.setup_idf: &setup_idf
|
|
# - cd $REPOS_PATH # IDF_PATH is set to something else already?
|
|
# using release/v4.4 branch of espressif/esp-idf github repo
|
|
- git clone --recursive --single-branch -b v4.4.1 --reference-if-able /local_references/github/ https://github.com/espressif/esp-idf.git
|
|
- cd esp-idf
|
|
- export IDF_GITHUB_ASSETS="dl.espressif.com/github_assets"
|
|
- ./install.sh
|
|
- . ./export.sh
|
|
|
|
.setup_idf_v5_0: &setup_idf_v5_0
|
|
# - cd $REPOS_PATH # IDF_PATH is set to something else already?
|
|
# using commit 047903c612 of espressif/esp-idf github repo
|
|
# idf_v5_0 is used for zigbee_bridge example and examples of ESP32-H2
|
|
- git clone --recursive --reference-if-able /local_references/github/ https://github.com/espressif/esp-idf.git
|
|
- cd esp-idf
|
|
- git checkout 047903c612e2c7212693c0861966bf7c83430ebf
|
|
- git submodule update --init --recursive
|
|
- export IDF_GITHUB_ASSETS="dl.espressif.com/github_assets"
|
|
- ./install.sh
|
|
- . ./export.sh
|
|
|
|
.setup_matter: &setup_matter
|
|
- cd $ESP_MATTER_PATH
|
|
- ./install.sh
|
|
- . ./export.sh
|
|
|
|
.build_matter_examples: &build_matter_examples
|
|
- export MATTER_EXAMPLES_PATH=$ESP_MATTER_PATH/connectedhomeip/connectedhomeip/examples
|
|
- cd $MATTER_EXAMPLES_PATH/all-clusters-app/esp32
|
|
- idf.py build
|
|
- cd $MATTER_EXAMPLES_PATH/temperature-measurement-app/esp32
|
|
- idf.py build
|
|
- cd $MATTER_EXAMPLES_PATH/lock-app/esp32
|
|
- idf.py build
|
|
- cd $MATTER_EXAMPLES_PATH/pigweed-app/esp32
|
|
- idf.py build
|
|
- cd $MATTER_EXAMPLES_PATH/persistent-storage/esp32
|
|
- idf.py build
|
|
|
|
.build_examples: &build_examples
|
|
- cd $ESP_MATTER_PATH/examples/blemesh_bridge
|
|
- idf.py set-target esp32
|
|
- idf.py build
|
|
- idf.py set-target esp32c3
|
|
- idf.py build
|
|
- cd $ESP_MATTER_PATH/examples/zap_light
|
|
- idf.py set-target esp32
|
|
- idf.py build
|
|
- cd $ESP_MATTER_PATH/examples/light_switch
|
|
- idf.py set-target esp32
|
|
- idf.py build
|
|
- cd $ESP_MATTER_PATH/examples/light
|
|
- idf.py set-target esp32
|
|
- idf.py build
|
|
- idf.py set-target esp32c3
|
|
- idf.py build
|
|
|
|
.build_external_platform_example: &build_external_platform_example
|
|
- rm -rf $ESP_MATTER_PATH/../platform
|
|
- mkdir $ESP_MATTER_PATH/../platform
|
|
- cp -r $ESP_MATTER_PATH/connectedhomeip/connectedhomeip/src/platform/ESP32 $ESP_MATTER_PATH/../platform/ESP32_custom
|
|
- cp $ESP_MATTER_PATH/examples/common/external_platform/BUILD.gn $ESP_MATTER_PATH/../platform/ESP32_custom
|
|
- cd $ESP_MATTER_PATH/examples/light
|
|
- cp sdkconfig.defaults sdkconfig.defaults.backup
|
|
- cp sdkconfig.defaults.ext_plat_ci sdkconfig.defaults
|
|
- idf.py set-target esp32
|
|
- idf.py build
|
|
- cp sdkconfig.defaults.backup sdkconfig.defaults
|
|
|
|
.build_examples_idf_v5_0: &build_examples_idf_v5_0
|
|
# pyparsing in python_env created by matter is version 2.4.0 IDF v5.0 requires 3.0.8
|
|
- pip install pyparsing==3.0.8
|
|
- cd $ESP_MATTER_PATH/examples/zap_light
|
|
- idf.py --preview set-target esp32h2
|
|
- idf.py build
|
|
- cd $ESP_MATTER_PATH/examples/light_switch
|
|
- idf.py --preview set-target esp32h2
|
|
- idf.py build
|
|
- cd $ESP_MATTER_PATH/examples/light
|
|
- idf.py --preview set-target esp32h2
|
|
- idf.py build
|
|
- cd $ESP_MATTER_PATH/examples/zigbee_bridge
|
|
- idf.py set-target esp32
|
|
- idf.py build
|
|
|
|
build_esp_matter_examples:
|
|
stage: build
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env:matter
|
|
tags:
|
|
- matter_build
|
|
|
|
script:
|
|
- export ESP_MATTER_PATH=$PWD
|
|
- mkdir repos
|
|
- export REPOS_PATH=$PWD/repos
|
|
- *chip_submodule_update
|
|
- *setup_idf
|
|
- *setup_matter
|
|
- *build_examples
|
|
- *build_external_platform_example
|
|
|
|
build_esp_matter_examples_idf_v5_0:
|
|
stage: build
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env:matter
|
|
tags:
|
|
- matter_build
|
|
|
|
script:
|
|
- export ESP_MATTER_PATH=$PWD
|
|
- mkdir repos
|
|
- export REPOS_PATH=$PWD/repos
|
|
- *chip_submodule_update
|
|
- *setup_idf_v5_0
|
|
- *setup_matter
|
|
- *build_examples_idf_v5_0
|
|
|
|
build_upstream_examples:
|
|
stage: build
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env:matter
|
|
tags:
|
|
- matter_build
|
|
when: manual
|
|
script:
|
|
- export ESP_MATTER_PATH=$PWD
|
|
- mkdir repos
|
|
- export REPOS_PATH=$PWD/repos
|
|
- *chip_submodule_update
|
|
- *setup_idf
|
|
- *setup_matter
|
|
- *build_matter_examples
|
|
|
|
build_docs:
|
|
stage: build
|
|
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env:v4.4-1-v4
|
|
tags:
|
|
- matter_build
|
|
artifacts:
|
|
when: always
|
|
paths:
|
|
- docs/_build/*/*/*.txt
|
|
- docs/_build/*/*/html/*
|
|
expire_in: 1 days
|
|
script:
|
|
- cd docs
|
|
- pip install -r requirements.txt
|
|
- build-docs -t esp32 esp32c3 esp32h2 -l en
|
|
|
|
.deploy_docs_template:
|
|
stage: docs
|
|
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env:v4.4-1-v4
|
|
tags:
|
|
- docs
|
|
needs:
|
|
- build_docs
|
|
script:
|
|
- source ${CI_PROJECT_DIR}/docs/utils.sh
|
|
- add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
|
|
- export GIT_VER=$(git describe --always)
|
|
- pip install -r ${CI_PROJECT_DIR}/docs/requirements.txt
|
|
- deploy-docs
|
|
|
|
deploy_docs_preview:
|
|
extends:
|
|
- .deploy_docs_template
|
|
when: manual
|
|
variables:
|
|
TYPE: "preview"
|
|
DOCS_BUILD_DIR: "${CI_PROJECT_DIR}/docs/_build/"
|
|
DOCS_DEPLOY_PRIVATEKEY: "$DOCS_PREVIEW_DEPLOY_KEY"
|
|
DOCS_DEPLOY_SERVER: "$DOCS_PREVIEW_SERVER"
|
|
DOCS_DEPLOY_SERVER_USER: "$DOCS_PREVIEW_SERVER_USER"
|
|
DOCS_DEPLOY_PATH: "$DOCS_PREVIEW_PATH"
|
|
DOCS_DEPLOY_URL_BASE: "https://$DOCS_PREVIEW_SERVER_URL/docs/esp-matter"
|
|
|
|
deploy_docs_production:
|
|
extends:
|
|
- .deploy_docs_template
|
|
when: manual
|
|
variables:
|
|
TYPE: "preview"
|
|
DOCS_BUILD_DIR: "${CI_PROJECT_DIR}/docs/_build/"
|
|
DOCS_DEPLOY_PRIVATEKEY: "$DOCS_PROD_DEPLOY_KEY"
|
|
DOCS_DEPLOY_SERVER: "$DOCS_PROD_SERVER"
|
|
DOCS_DEPLOY_SERVER_USER: "$DOCS_PROD_SERVER_USER"
|
|
DOCS_DEPLOY_PATH: "$DOCS_PROD_PATH"
|
|
DOCS_DEPLOY_URL_BASE: "https://docs.espressif.com/projects/esp-matter"
|