forked from espressif/esp-matter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
199 lines (181 loc) · 6.42 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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"