forked from espressif/esp-serial-flasher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
62 lines (54 loc) · 2.05 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
stages:
- build
- test
variables:
IDF_REPO: https://gitlab-ci-token:${CI_JOB_TOKEN}@${IDF_MIRROR_HOST}/espressif/esp-idf.git
STM32_CUBE_F4_REPO: https://github.com/STMicroelectronics/STM32CubeF4
SERIAL_FLASHER_REPO: ${GITLAB_SSH_SERVER}/espressif/esp-serial-flasher.git
QEMU_PATH: /opt/qemu/bin/qemu-system-xtensa
.clone_and_setup_idf: &clone_and_setup_idf |
git clone "${IDF_REPO}"
cd esp-idf
tools/idf_tools.py --non-interactive install all && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1
git submodule update --init
export IDF_PATH=$(pwd)
.clone_and_setup_stm32: &clone_and_setup_stm32 |
cd $CI_PROJECT_DIR
git submodule update --init
git clone "${STM32_CUBE_F4_REPO}"
mkdir $CI_PROJECT_DIR/examples/stm32_example/build
wget -O gcc-arm-none-eabi.tar.bz2 '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'
tar -xjf gcc-arm-none-eabi.tar.bz2
mv gcc-arm-none-eabi-* gcc-arm-none-eabi
before_script:
# Use CI Tools
- curl -sSL ${CIT_LOADER_URL} | sh
- source citools/import_functions
- PATH=$CI_PROJECT_DIR/esp-idf/tools:$PATH
build_with_idf:
stage: build
image: $CI_DOCKER_REGISTRY/esp-env:v4.4-1
tags:
- build
- internet
script:
- source /opt/pyenv/activate && pyenv global 3.6.13
- *clone_and_setup_idf
- cd $CI_PROJECT_DIR/examples/esp32_example
# Build for all supported targets
- idf.py build -DMD5_ENABLED=1
- idf.py build -DMD5_ENABLED=0
- *clone_and_setup_stm32
- cd $CI_PROJECT_DIR/examples/stm32_example/build
- cmake -DTOOLCHAIN_PREFIX=$CI_PROJECT_DIR/gcc-arm-none-eabi -DSTM32Cube_DIR=$CI_PROJECT_DIR/STM32CubeF4 .. && 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