ci: github build esp-mqtt with more stable IDF (latest release version rather then master)

fixed also internal ci: use the same git command for buld and static analysis (reset --hard instead of checkout)
This commit is contained in:
David Cermak
2019-05-06 09:42:55 +02:00
parent 60cdb79a67
commit 1d294f7606
3 changed files with 13 additions and 5 deletions

View File

@ -79,7 +79,7 @@ clang_tidy_check:
- cd $IDF_PATH/components/mqtt/esp-mqtt
- rm -rf .git
- cp -r $CI_PROJECT_DIR/.git .
- git checkout $CI_COMMIT_SHA
- git reset --hard $CI_COMMIT_SHA
- mv $CI_PROJECT_DIR/tidybuild $IDF_PATH/examples/protocols/mqtt/tcp/tidybuild
- cd $IDF_PATH/examples/protocols/mqtt/tcp/tidybuild
- git clone "${CI_REPORT_TOOLS}"

View File

@ -16,6 +16,8 @@ before_install:
# Have to checkout a temp branch for later in tree reference
- git checkout -b temporary_ref_branch
- CI_COMMIT_SHA=$(git rev-parse HEAD)
# Test building with latest (stable == v3.3 for now) IDF
- LATEST_IDF=release/v3.3
install:
# Install ESP32 toochain following steps as desribed
@ -42,13 +44,13 @@ script:
- cd $IDF_PATH
- git checkout v3.1 && git submodule update --init --recursive
- cd $PROJECT_PATH
- ./modify_for_legacy_idf.sh || true
- ./modify_for_legacy_idf.sh ${LATEST_IDF} || true
- cd $PROJECT_PATH/examples/tcp
- make defconfig
- make -j4
# Master build with latest IDF
# Build with latest IDF
- cd $IDF_PATH
- git checkout master && git submodule update --init --recursive
- git checkout ${LATEST_IDF} && git submodule update --init --recursive
- cd $IDF_PATH/components/mqtt/esp-mqtt
- git remote add local $PROJECT_PATH/.git
- git fetch local

View File

@ -1,5 +1,11 @@
#!/usr/bin/env bash
if [[ -z $1 ]]; then
LATEST_IDF=master
else
LATEST_IDF=$1
fi
# This snipped prepares environment for using esp-mqtt repository separately from idf -- legacy use before IDFv3.2
#
esp_mqtt_path=`pwd`
@ -7,7 +13,7 @@ mkdir -p ${esp_mqtt_path}/examples
pushd
cd $IDF_PATH
former_commit_id=`git rev-parse HEAD`
git checkout master
git checkout ${LATEST_IDF}
for example in tcp; do
cp -r $IDF_PATH/examples/protocols/mqtt/${example} ${esp_mqtt_path}/examples