forked from espressif/arduino-esp32
Update CI scripts for better error handling (#3316)
This commit is contained in:
40
.github/scripts/install-arduino-core-esp32.sh
vendored
40
.github/scripts/install-arduino-core-esp32.sh
vendored
@ -2,39 +2,33 @@
|
||||
|
||||
export ARDUINO_ESP32_PATH="$ARDUINO_USR_PATH/hardware/espressif/esp32"
|
||||
if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
|
||||
echo "Installing ESP32 Arduino Core in '$ARDUINO_ESP32_PATH'..."
|
||||
echo "Installing ESP32 Arduino Core ..."
|
||||
script_init_path="$PWD"
|
||||
mkdir -p "$ARDUINO_USR_PATH/hardware/espressif" && \
|
||||
mkdir -p "$ARDUINO_USR_PATH/hardware/espressif"
|
||||
cd "$ARDUINO_USR_PATH/hardware/espressif"
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
||||
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
|
||||
echo "Linking Core..." && \
|
||||
ln -s $GITHUB_WORKSPACE esp32
|
||||
else
|
||||
echo "Cloning Core Repository..." && \
|
||||
git clone https://github.com/espressif/arduino-esp32.git esp32 > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then echo "ERROR: GIT clone failed"; exit 1; fi
|
||||
fi
|
||||
|
||||
cd esp32 && \
|
||||
echo "Updating Submodules..." && \
|
||||
git submodule update --init --recursive > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Submodule update failed"; exit 1; fi
|
||||
|
||||
echo "Installing Python Serial..." && \
|
||||
echo "Installing Python Serial ..."
|
||||
pip install pyserial > /dev/null
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Install failed"; exit 1; fi
|
||||
|
||||
if [ "$OS_IS_WINDOWS" == "1" ]; then
|
||||
echo "Installing Python Requests..."
|
||||
echo "Installing Python Requests ..."
|
||||
pip install requests > /dev/null
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Install failed"; exit 1; fi
|
||||
fi
|
||||
|
||||
echo "Installing Platform Tools..."
|
||||
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
|
||||
echo "Linking Core..."
|
||||
ln -s $GITHUB_WORKSPACE esp32
|
||||
else
|
||||
echo "Cloning Core Repository..."
|
||||
git clone https://github.com/espressif/arduino-esp32.git esp32 > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
echo "Updating Submodules ..."
|
||||
cd esp32
|
||||
git submodule update --init --recursive > /dev/null 2>&1
|
||||
|
||||
echo "Installing Platform Tools ..."
|
||||
cd tools && python get.py
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Download failed"; exit 1; fi
|
||||
cd $script_init_path
|
||||
|
||||
echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'"
|
||||
|
Reference in New Issue
Block a user