mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
02e70abf84
Gitlab CI will cache build directory per branch and per build step. Also it doesn't try to update submodules. We have to do this manually because otherwise we end up with old version of submodule in cached directory.
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
stages:
|
|
- build
|
|
- test
|
|
- deploy
|
|
|
|
before_script:
|
|
- git submodule update --init --recursive
|
|
|
|
build_template_app:
|
|
stage: build
|
|
image: espressif/esp32-ci-env
|
|
|
|
variables:
|
|
SDK_PATH: "$CI_PROJECT_DIR"
|
|
IDF_PATH: "$CI_PROJECT_DIR"
|
|
GIT_STRATEGY: clone
|
|
|
|
script:
|
|
- git clone https://github.com/espressif/esp-idf-template.git
|
|
- cd esp-idf-template
|
|
- make defconfig
|
|
- make all
|
|
|
|
test_nvs_on_host:
|
|
stage: test
|
|
image: espressif/esp32-ci-env
|
|
script:
|
|
- cd components/nvs_flash/test
|
|
- make test
|
|
|
|
test_build_system:
|
|
stage: test
|
|
image: espressif/esp32-ci-env
|
|
variables:
|
|
IDF_PATH: "$CI_PROJECT_DIR"
|
|
script:
|
|
- ./make/test_build_system.sh
|
|
|
|
push_master_to_github:
|
|
stage: deploy
|
|
only:
|
|
- master
|
|
when: on_success
|
|
image: espressif/esp32-ci-env
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
script:
|
|
- mkdir -p ~/.ssh
|
|
- chmod 700 ~/.ssh
|
|
- echo -n $GH_PUSH_KEY >> ~/.ssh/id_rsa_base64
|
|
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
|
- git remote add github git@github.com:espressif/esp-idf.git
|
|
- git push github HEAD:master
|