-
Notifications
You must be signed in to change notification settings - Fork 24
/
.gitlab-ci.yml
95 lines (84 loc) · 2.31 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
stages:
- build
# Avoid running duplicate pipeline
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
IDF_COMPONENT_MGR_12: 0
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY_TMP > ~/.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
- |
if [ "$IDF_COMPONENT_MGR_12" == "1" ]; then
pip install idf-component-manager==1.2.0
else
python -m pip install --upgrade idf-component-manager
fi
.test_build: &test_build
# Build examples
- for TARGET in $EXAMPLE_TARGETS; do
- if [ "$TARGET" == "esp32p4" ]; then
- PREVIEW="--preview"
- else
- PREVIEW=""
- fi
- idf.py $PREVIEW set-target $TARGET build
- done
.build_template:
stage: build
image: espressif/idf:latest
tags:
- build
variables:
PEDANTIC_FLAGS: "-Werror -Wno-error=cpp -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
EXTRA_CFLAGS: "${PEDANTIC_FLAGS}"
EXTRA_CXXFLAGS: "${PEDANTIC_FLAGS}"
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- when: always
script:
- cd ${CI_PROJECT_DIR}/test_app
# build examples
- *test_build
- cd ${CI_PROJECT_DIR}
# Test p4 on master...
build_idf_latest:
extends: .build_template
image: espressif/idf:latest
variables:
EXAMPLE_TARGETS: esp32 esp32s3 esp32c3 esp32p4
build_idf_v5.2:
extends: .build_template
image: espressif/idf:release-v5.2
variables:
EXAMPLE_TARGETS: esp32 esp32s3 esp32c3
build_idf_v5.0:
extends: .build_template
image: espressif/idf:release-v5.0
variables:
EXAMPLE_TARGETS: esp32 esp32s3 esp32c3
build_idf_v4.4:
extends: .build_template
image: espressif/idf:release-v4.4
variables:
EXAMPLE_TARGETS: esp32 esp32s3 esp32c3
IDF_COMPONENT_MGR_12: 1
build_idf_v4.3:
extends: .build_template
image: espressif/idf:release-v4.3
variables:
EXAMPLE_TARGETS: esp32
build_idf_v4.2:
extends: .build_template
image: espressif/idf:release-v4.2
variables:
EXAMPLE_TARGETS: esp32