-
Notifications
You must be signed in to change notification settings - Fork 58
/
.gitlab-ci.yml
74 lines (65 loc) · 2.17 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
stages:
- build
.build_all_examples: &build_all_examples |
for EXAMPLE in $EXAMPLES; do
cd $CI_PROJECT_DIR/$EXAMPLE
echo Building $EXAMPLE
if [[ "$EXAMPLE" == "5_cloud" || "$EXAMPLE" == "6_ota" || "$EXAMPLE" == "7_mfg" ]]; then
touch main/cloud_cfg/server.cert main/cloud_cfg/device.cert main/cloud_cfg/device.key main/cloud_cfg/deviceid.txt main/cloud_cfg/endpoint.txt
fi
for TARGET in $EXAMPLE_TARGETS; do
echo Building for $TARGET
idf.py set-target $TARGET
idf.py build
mkdir -p $CI_PROJECT_DIR/esp-jumpstart-bins-${CI_JOB_ID}/$EXAMPLE/$TARGET/
cp $CI_PROJECT_DIR/$EXAMPLE/build/*.bin $CI_PROJECT_DIR/esp-jumpstart-bins-${CI_JOB_ID}/$EXAMPLE/$TARGET/
done
echo Build Complete for $EXAMPLE
done
echo Generating zip file for binaries generated
cd $CI_PROJECT_DIR
echo Generating zip file for binaries generated
tar -zcvf esp-jumpstart-bins-${CI_JOB_ID}.zip esp-jumpstart-bins-${CI_JOB_ID}/
.fetch_aws_iot: &fetch_aws_iot |
git submodule update --init --recursive
.build_template:
stage: build
image: espressif/idf:latest
tags:
- build
- internet
variables:
PEDANTIC_FLAGS: "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
EXTRA_CFLAGS: "${PEDANTIC_FLAGS}"
EXTRA_CXXFLAGS: "${PEDANTIC_FLAGS}"
EXAMPLE_TARGETS: "esp32"
EXAMPLES: "1_hello_world 2_drivers 3_wifi_connection 4_network_config 5_cloud 6_ota 7_mfg"
script:
- *fetch_aws_iot
- *build_all_examples
build_idf_v4.1:
extends: .build_template
image: espressif/idf:release-v4.1
build_idf_v4.2:
extends: .build_template
image: espressif/idf:release-v4.2
build_idf_v4.3:
extends: .build_template
image: espressif/idf:release-v4.3
variables:
EXAMPLE_TARGETS: "esp32 esp32c3"
build_idf_v4.4:
extends: .build_template
image: espressif/idf:release-v4.4
variables:
EXAMPLE_TARGETS: "esp32 esp32c3 esp32s3"
build_idf_v5.0:
extends: .build_template
image: espressif/idf:release-v5.0
variables:
EXAMPLE_TARGETS: "esp32 esp32c3 esp32s3"
build_idf_master:
extends: .build_template
image: espressif/idf:latest
variables:
EXAMPLE_TARGETS: "esp32 esp32c3 esp32s3"