-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
109 lines (101 loc) · 3.19 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
stages:
- build
variables:
CI_DOCKER_REGISTRY: "ciregistry.espressif.cn:8443"
ESP_ZIGBEE_SDK_PATH: "$CI_PROJECT_DIR/esp-zigbee-sdk"
ESP_ZBOSS_LIB_PATH: "$CI_PROJECT_DIR"
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n "${GITLAB_KEY}" >~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 >~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >>~/.ssh/config
.setup_idf: &setup_idf
- cd $CI_PROJECT_DIR/..
- rm -rf esp-idf
- git clone --recursive -b v5.3.1 ${ESP_IDF_URL}
- cd esp-idf
- git checkout --track origin/$CI_COMMIT_REF_NAME || git branch
- git submodule sync --recursive
- git submodule update --recursive --init
- ./install.sh
- . ./export.sh
.setup_esp_sdk: &setup_esp_sdk
- cd $CI_PROJECT_DIR
- git clone --recursive -b main ${ESP_ZIGBEE_SDK_URL}
- cd esp-zigbee-sdk
- git checkout --track origin/$CI_COMMIT_REF_NAME || git branch
- git submodule update --recursive --init
- cp -r ${ESP_ZIGBEE_SDK_PATH}/components/esp-zigbee-lib ${IDF_PATH}/components/espressif__esp-zigbee-lib
.update_zboss_lib_script: &update_zboss_lib_script
- *setup_idf
- *setup_esp_sdk
- cd ${ESP_ZBOSS_LIB_PATH}
- cp -r ${ESP_ZBOSS_LIB_PATH} ${IDF_PATH}/components/espressif__esp-zboss-lib
- cd ${ESP_ZIGBEE_SDK_PATH}
- pip install -r tools/ci/requirements-build.txt
build_non_pytest_examples:
stage: build
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.3:1
artifacts:
paths:
- "**/build*/*.bin"
- "**/build*/flasher_args.json"
- "**/build*/config/sdkconfig.json"
- "**/build*/bootloader/*.bin"
- "**/build*/partition_table/*.bin"
when: always
expire_in: 4 days
script:
- *update_zboss_lib_script
- python tools/ci/build_apps.py ./examples --no_pytest
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
parallel: 2
tags:
- build
build_pytest_examples:
stage: build
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.3:1
artifacts:
paths:
- "**/build*/*.bin"
- "**/build*/*.map"
- "**/build*/*.elf"
- "**/build*/flasher_args.json"
- "**/build*/flash_project_args"
- "**/build*/config/sdkconfig.json"
- "**/build*/bootloader/*.bin"
- "**/build*/partition_table/*.bin"
when: always
expire_in: 4 days
script:
- *update_zboss_lib_script
- python tools/ci/build_apps.py ./examples --pytest
tags:
- build
build_idf_examples:
stage: build
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.3:1
artifacts:
paths:
- "**/build*/size.json"
- "**/build*/build_log.txt"
- "**/build*/*.bin"
- "**/build*/*.map"
- "**/build*/*.elf"
- "**/build*/flasher_args.json"
- "**/build*/flash_project_args"
- "**/build*/config/sdkconfig.json"
- "**/build*/bootloader/*.bin"
- "**/build*/partition_table/*.bin"
when: always
expire_in: 4 days
script:
- *update_zboss_lib_script
- cp -r ${ESP_ZBOSS_LIB_PATH}/tools/ci/build_apps.py ${IDF_PATH}/examples/zigbee/build_apps.py
- cd ${IDF_PATH}
- python examples/zigbee/build_apps.py ./examples/zigbee --idf_examples
tags:
- build