mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-12 15:49:00 +08:00
Fix travis to test proper filesystem according platform
This commit is contained in:
parent
6fc6df1577
commit
dccc47234b
@ -18,10 +18,10 @@ install:
|
|||||||
- pip install -U platformio
|
- pip install -U platformio
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- TARGET=esp32 PLATFORM=arduino BT=yes AUTHENTICATION=yes
|
- TARGET=esp32 PLATFORM=arduino BT=yes AUTHENTICATION=yes FILESYSTEM=FAT
|
||||||
- TARGET=esp32 PLATFORM=arduino BT=yes AUTHENTICATION=no
|
- TARGET=esp32 PLATFORM=arduino BT=yes AUTHENTICATION=no FILESYSTEM=SPIFFS
|
||||||
- TARGET=esp8266 PLATFORM=arduino BT=no AUTHENTICATION=yes
|
- TARGET=esp8266 PLATFORM=arduino BT=no AUTHENTICATION=yes FILESYSTEM=SPIFFS
|
||||||
- TARGET=esp8266 PLATFORM=arduino BT=no AUTHENTICATION=no
|
- TARGET=esp8266 PLATFORM=arduino BT=no AUTHENTICATION=no FILESYSTEM=SPIFFS
|
||||||
- TARGET=all PLATFORM=PIO BT=yes AUTHENTICATION=yes
|
- TARGET=all PLATFORM=PIO BT=yes AUTHENTICATION=yes
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
22
command.sh
22
command.sh
@ -7,7 +7,9 @@ function build_sketch()
|
|||||||
local ide=$3
|
local ide=$3
|
||||||
local bt=$4
|
local bt=$4
|
||||||
local auth=$5
|
local auth=$5
|
||||||
if [[ "$3" == "arduino" ]];
|
local filessystem=$6
|
||||||
|
|
||||||
|
if [[ "$ide" == "arduino" ]];
|
||||||
then
|
then
|
||||||
echo "Setup for Arduino"
|
echo "Setup for Arduino"
|
||||||
rm -f $HOME/.arduino15/preferences.txt
|
rm -f $HOME/.arduino15/preferences.txt
|
||||||
@ -16,23 +18,33 @@ function build_sketch()
|
|||||||
sed -i "s/\/\/#define AUTHENTICATION_FEATURE /#define AUTHENTICATION_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
sed -i "s/\/\/#define AUTHENTICATION_FEATURE /#define AUTHENTICATION_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
echo "Bluetooth is enabled"
|
echo "Bluetooth is enabled"
|
||||||
sed -i "s/\/\/#define BLUETOOTH_FEATURE /#define BLUETOOTH_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
sed -i "s/\/\/#define BLUETOOTH_FEATURE /#define BLUETOOTH_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
if [[ "$4" == "no" ]];
|
if [[ "$bt" == "no" ]];
|
||||||
then
|
then
|
||||||
echo "Disable Bluetooth"
|
echo "Disable Bluetooth"
|
||||||
sed -i "s/#define BLUETOOTH_FEATURE /\/\/#define BLUETOOTH_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
sed -i "s/#define BLUETOOTH_FEATURE /\/\/#define BLUETOOTH_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
fi
|
fi
|
||||||
if [[ "$5" == "no" ]];
|
if [[ "$auth" == "no" ]];
|
||||||
then
|
then
|
||||||
echo "Disable Authentication"
|
echo "Disable Authentication"
|
||||||
sed -i "s/#define AUTHENTICATION_FEATURE /\/\/#define AUTHENTICATION_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
sed -i "s/#define AUTHENTICATION_FEATURE /\/\/#define AUTHENTICATION_FEATURE/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
fi
|
fi
|
||||||
if [[ "$2" == "esp32" ]];
|
if [[ "$target" == "esp32" ]];
|
||||||
then
|
then
|
||||||
echo "setup for esp32"
|
echo "setup for esp32"
|
||||||
arduino --board esp32:esp32:esp32:PartitionScheme=min_spiffs,FlashFreq=80,PSRAM=disabled,CPUFreq=240,FlashMode=qio,FlashSize=4M,DebugLevel=none --pref compiler.warning_level=all --save-prefs
|
arduino --board esp32:esp32:esp32:PartitionScheme=min_spiffs,FlashFreq=80,PSRAM=disabled,CPUFreq=240,FlashMode=qio,FlashSize=4M,DebugLevel=none --pref compiler.warning_level=all --save-prefs
|
||||||
else
|
else
|
||||||
echo "setup for esp8266"
|
echo "setup for esp8266"
|
||||||
arduino --board esp8266com:esp8266:generic:eesz=4M3M,xtal=160,FlashMode=dio,FlashFreq=40,sdk=nonosdk221,ip=lm2f,dbg=Disabled,vt=flash,exception=disabled,ssl=basic --save-prefs
|
arduino --board esp8266com:esp8266:generic:eesz=4M3M,xtal=160,FlashMode=dio,FlashFreq=40,sdk=nonosdk221,ip=lm2f,dbg=Disabled,vt=flash,exception=disabled,ssl=basic --save-prefs
|
||||||
|
fi
|
||||||
|
if [[ "$filessystem" == "SPIFFS" ]];
|
||||||
|
then
|
||||||
|
sed -i "s/\/\/#define FILESYSTEM_FEATURE ESP_FAT_FILESYSTEM/#define FILESYSTEM_FEATURE ESP_SPIFFS_FILESYSTEM/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
|
sed -i "s/\/\/#define FILESYSTEM_FEATURE ESP_LITTLEFS_FILESYSTEM/#define FILESYSTEM_FEATURE ESP_SPIFFS_FILESYSTEM/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
|
fi
|
||||||
|
if [[ "$filessystem" == "FAT" ]];
|
||||||
|
then
|
||||||
|
sed -i "s/\/\/#define FILESYSTEM_FEATURE ESP_SPIFFS_FILESYSTEM/#define FILESYSTEM_FEATURE ESP_FAT_FILESYSTEM/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
|
sed -i "s/\/\/#define FILESYSTEM_FEATURE ESP_LITTLEFS_FILESYSTEM/#define FILESYSTEM_FEATURE ESP_FAT_FILESYSTEM/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
fi
|
fi
|
||||||
# build sketch with arduino ide
|
# build sketch with arduino ide
|
||||||
echo -e "\n Build $sketch \n"
|
echo -e "\n Build $sketch \n"
|
||||||
@ -48,6 +60,8 @@ function build_sketch()
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "setup for platformIO"
|
echo "setup for platformIO"
|
||||||
|
sed -i "s/\/\/#define FILESYSTEM_FEATURE ESP_FAT_FILESYSTEM/#define FILESYSTEM_FEATURE ESP_SPIFFS_FILESYSTEM/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
|
sed -i "s/\/\/#define FILESYSTEM_FEATURE ESP_LITTLEFS_FILESYSTEM/#define FILESYSTEM_FEATURE ESP_SPIFFS_FILESYSTEM/g" $TRAVIS_BUILD_DIR/esp3d/configuration.h
|
||||||
rm -fr $HOME/arduino_ide
|
rm -fr $HOME/arduino_ide
|
||||||
rm -fr $HOME/.arduino15
|
rm -fr $HOME/.arduino15
|
||||||
platformio run
|
platformio run
|
||||||
|
Loading…
x
Reference in New Issue
Block a user