forked from espressif/esp-serial-flasher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
101 lines (89 loc) · 2.98 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
stages:
- build
- test
- deploy
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- if: "$CI_COMMIT_BRANCH"
variables:
STM32_CUBE_F4_REPO: https://github.com/STMicroelectronics/STM32CubeF4
STM32_CUBE_F4_REPO_TAG: v1.26.2
ARM_TOOLCHAIN_URL: https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2?revision=05382cca-1721-44e1-ae19-1e7c3dc96118&la=en&hash=D7C9D18FCA2DD9F894FD9F3C3DC9228498FA281A
QEMU_PATH: /opt/qemu/bin/qemu-system-xtensa
.build_idf_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}"
script:
- cd $CI_PROJECT_DIR/examples/esp32_example
- idf.py build -DMD5_ENABLED=1
- idf.py build -DMD5_ENABLED=0
build_idf_v3.3:
extends: .build_idf_template
image: espressif/idf:release-v3.3
build_idf_v4.1:
extends: .build_idf_template
image: espressif/idf:release-v4.1
build_idf_v4.2:
extends: .build_idf_template
image: espressif/idf:release-v4.2
build_idf_v4.3:
extends: .build_idf_template
image: espressif/idf:release-v4.3
build_idf_v4.4:
extends: .build_idf_template
image: espressif/idf:release-v4.4
build_idf_master:
extends: .build_idf_template
image: espressif/idf:latest
build_stm32:
stage: build
# IDF is not necessary for STM32 build, but this image is already used in another job
# and it comes with a recent enough CMake version.
image: espressif/idf:latest
tags:
- build
- internet
script:
- cd $CI_PROJECT_DIR
- git submodule update --init
- git clone --depth=1 -b ${STM32_CUBE_F4_REPO_TAG} ${STM32_CUBE_F4_REPO}
- wget --no-verbose -O gcc-arm-none-eabi.tar.bz2 ${ARM_TOOLCHAIN_URL}
- tar -xjf gcc-arm-none-eabi.tar.bz2
- mv gcc-arm-none-eabi-* gcc-arm-none-eabi
- mkdir $CI_PROJECT_DIR/examples/stm32_example/build
- cd $CI_PROJECT_DIR/examples/stm32_example/build
- cmake -DTOOLCHAIN_PREFIX=$CI_PROJECT_DIR/gcc-arm-none-eabi -DSTM32Cube_DIR=$CI_PROJECT_DIR/STM32CubeF4 -G Ninja ..
- cmake --build .
run_tests:
stage: test
image: ${CI_DOCKER_REGISTRY}/qemu:esp-develop-20191124
tags:
- build
- internet
script:
- cd $CI_PROJECT_DIR/test
- export QEMU_PATH=/opt/qemu/bin/qemu-system-xtensa
- ./run_test.sh qemu
- ./run_test.sh host
push_to_the_components_registry:
stage: deploy
image: python:3.10-alpine
tags:
- build
- internet
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$FORCE_PUSH_COMPONENT == "1"'
script:
- pip install idf-component-manager
- python -m idf_component_manager upload-component --allow-existing --name=esp-serial-flasher --namespace=espressif