-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
120 lines (104 loc) · 3.01 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
stages:
- qemu_test
- build
variables:
BATCH_BUILD: "1"
V: "0"
MAKEFLAGS: "-j5 --no-keep-going"
GIT_SUBMODULE_STRATEGY: recursive
QEMU_IMAGE: ${CI_DOCKER_REGISTRY}/qemu-v5.2:2-20230522
# before each job, we need to check if this job is filtered by bot stage/job filter
.apply_bot_filter: &apply_bot_filter
python $APPLY_BOT_FILTER_SCRIPT || exit 0
.setup_env:
before_script: &setup_env
# apply bot filter in before script
- *apply_bot_filter
# add gitlab ssh key
- 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
- git --version
- git submodule update --init --recursive
.build_idf_template:
stage: build
before_script: *setup_env
image: espressif/idf:release-v5.0
tags:
- build
parallel: 3
variables:
PEDANTIC_FLAGS: "-Werror -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
EXTRA_CFLAGS: "${PEDANTIC_FLAGS}"
EXTRA_CXXFLAGS: "${PEDANTIC_FLAGS}"
script:
- export EXTRA_CFLAGS=$EXTRA_CFLAGS
- export EXTRA_CXXFLAGS=$EXTRA_CXXFLAGS
- cd ci
- ./build_test.sh $IDF_TARGET $CI_NODE_INDEX || exit 1
.build_idf_template_release_v4.4:
extends: .build_idf_template
image: espressif/idf:release-v4.4
.build_idf_template_release_v4.3:
extends: .build_idf_template
image: espressif/idf:release-v4.3
build_demo_esp32:
extends: .build_idf_template
variables:
IDF_TARGET: esp32
qemu_test_tlv_esp32:
stage: qemu_test
image: $QEMU_IMAGE
tags:
- qemu_test
script:
- export EXTRA_CFLAGS=$EXTRA_CFLAGS
- export EXTRA_CXXFLAGS=$EXTRA_CXXFLAGS
- export ROOT_PATH=$PWD
- git clone --recursive --single-branch -b v5.2-dev https://github.com/espressif/esp-idf --shallow-submodules --depth 1 /opt/esp-idf
- cd /opt/esp-idf
- bash install.sh
- . ./export.sh
- cd $ROOT_PATH/examples/esp_secure_cert_app/qemu_test
- ./build_qemu_images.sh tlv
- cd ../
- pytest --target esp32
- cd qemu_test
- ./build_qemu_images.sh legacy_format
- cd ../
- pytest --target esp32
build_demo_esp32s2:
extends: .build_idf_template
variables:
IDF_TARGET: esp32s2
build_demo_esp32s3:
extends: .build_idf_template
variables:
IDF_TARGET: esp32s3
build_demo_esp32c3:
extends: .build_idf_template
variables:
IDF_TARGET: esp32c3
build_demo_esp32_v4.4:
extends: .build_idf_template_release_v4.4
variables:
IDF_TARGET: esp32
build_demo_esp32s3_v4.4:
extends: .build_idf_template_release_v4.4
variables:
IDF_TARGET: esp32s3
build_demo_esp32c3_v4.4:
extends: .build_idf_template_release_v4.4
variables:
IDF_TARGET: esp32c3
build_demo_esp32_v4.3:
extends: .build_idf_template_release_v4.3
variables:
IDF_TARGET: esp32
build_demo_esp32c3_v4.3:
extends: .build_idf_template_release_v4.3
variables:
IDF_TARGET: esp32c3