-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created new installation script install_arduino_cores.bat/.sh for ins…
…talling esp8266 and esp32 support.
- Loading branch information
1 parent
c1968f8
commit 1ef6ac2
Showing
12 changed files
with
153 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@echo off | ||
|
||
:: Validate appveyor's environment | ||
if "%APPVEYOR_BUILD_FOLDER%"=="" ( | ||
echo Please define 'APPVEYOR_BUILD_FOLDER' environment variable. | ||
exit /B 1 | ||
) | ||
|
||
:: Call matching script for windows | ||
call "%APPVEYOR_BUILD_FOLDER%\ci\windows\%~n0.bat" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@echo off | ||
|
||
:: Validate GitHub CI's environment | ||
if "%GITHUB_WORKSPACE%"=="" ( | ||
echo Please define 'GITHUB_WORKSPACE' environment variable. | ||
exit /B 1 | ||
) | ||
|
||
:: Call matching script for windows | ||
call "%GITHUB_WORKSPACE%\ci\windows\%~n0.bat" | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
|
||
:: Remember installation directory | ||
echo Remember ARDUINO_CLI_INSTALL_DIR as %ARDUINO_CLI_INSTALL_DIR% in %GITHUB_ENV% | ||
echo ARDUINO_CLI_INSTALL_DIR=%ARDUINO_CLI_INSTALL_DIR%>> %GITHUB_ENV% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Any commands which fail will cause the shell script to exit immediately | ||
set -e | ||
|
||
# Validate GitHub CI environment | ||
if [ "$GITHUB_WORKSPACE" = "" ]; then | ||
echo "Please define 'GITHUB_WORKSPACE' environment variable."; | ||
exit 1; | ||
fi | ||
|
||
# Call matching script for linux | ||
# and execute the script under the current shell instead of loading another one | ||
this_filename=`basename "$0"` | ||
. $GITHUB_WORKSPACE/ci/linux/$this_filename | ||
|
||
# Remember installation directory | ||
echo Remember ARDUINO_CLI_INSTALL_DIR as $ARDUINO_CLI_INSTALL_DIR in $GITHUB_ENV | ||
echo ARDUINO_CLI_INSTALL_DIR=$ARDUINO_CLI_INSTALL_DIR>> $GITHUB_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
board_manager: | ||
additional_urls: | ||
- http://arduino.esp8266.com/stable/package_esp8266com_index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Any commands which fail will cause the shell script to exit immediately | ||
set -e | ||
|
||
# Set arduino-cli config file path | ||
export ARDUINO_CONFIG_PATH="/home/$USER/.arduino15/arduino-cli.yaml" | ||
echo ARDUINO_CONFIG_PATH set to '$ARDUINO_CONFIG_PATH' | ||
cat "$ARDUINO_CONFIG_PATH" | ||
echo. | ||
echo. | ||
|
||
echo Adding arduinocli-core-esp8266.yaml to arduino-cli config... | ||
yaml-merge arduinocli-core-esp8266.yaml '$ARDUINO_CONFIG_PATH' --overwrite='$ARDUINO_CONFIG_PATH' | ||
cat "$ARDUINO_CONFIG_PATH" | ||
echo | ||
echo | ||
|
||
echo Adding arduinocli-core-esp32.yaml to arduino-cli config... | ||
yaml-merge arduinocli-core-esp32.yaml '$ARDUINO_CONFIG_PATH' --overwrite='$ARDUINO_CONFIG_PATH' | ||
cat "$ARDUINO_CONFIG_PATH" | ||
echo | ||
echo | ||
|
||
echo Installing "arduino:avr" core... | ||
arduino-cli core install "arduino:avr" | ||
echo | ||
echo | ||
|
||
echo Installing "esp8266:esp8266" core... | ||
arduino-cli core install "esp8266:esp8266" | ||
echo | ||
echo | ||
|
||
echo Installing "esp32:esp32" core... | ||
arduino-cli core install "esp32:esp32" | ||
echo | ||
echo | ||
|
||
echo Listing all installed cores... | ||
arduino-cli core list | ||
echo | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
board_manager: | ||
additional_urls: | ||
- http://arduino.esp8266.com/stable/package_esp8266com_index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@echo off | ||
cd /d %~dp0 | ||
|
||
:: Set arduino-cli config file path | ||
set ARDUINO_CONFIG_PATH=C:\Users\%USERNAME%\AppData\Local\Arduino15\arduino-cli.yaml | ||
echo ARDUINO_CONFIG_PATH set to '%ARDUINO_CONFIG_PATH%' | ||
type "%ARDUINO_CONFIG_PATH%" | ||
echo. | ||
echo. | ||
|
||
echo Adding arduinocli-core-esp8266.yaml to arduino-cli config... | ||
yaml-merge arduinocli-core-esp8266.yaml "%ARDUINO_CONFIG_PATH%" --overwrite="%ARDUINO_CONFIG_PATH%" | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
type "%ARDUINO_CONFIG_PATH%" | ||
echo. | ||
echo. | ||
|
||
echo Adding arduinocli-core-esp32.yaml to arduino-cli config... | ||
yaml-merge arduinocli-core-esp32.yaml "%ARDUINO_CONFIG_PATH%" --overwrite="%ARDUINO_CONFIG_PATH%" | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
type "%ARDUINO_CONFIG_PATH%" | ||
echo. | ||
echo. | ||
|
||
echo Installing arduino:avr core... | ||
REM Use `--skip-post-install` on AppVeyor to skip UAC prompt which is blocking the build. | ||
arduino-cli core install arduino:avr --skip-post-install | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
echo. | ||
echo. | ||
|
||
echo Installing esp8266:esp8266 core... | ||
arduino-cli core install esp8266:esp8266 | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
echo. | ||
echo. | ||
|
||
echo Installing esp32:esp32 core... | ||
arduino-cli core update-index | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
arduino-cli board listall | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
arduino-cli core install esp32:esp32 | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
echo. | ||
echo. | ||
|
||
echo Listing all installed cores... | ||
arduino-cli core list | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
echo. | ||
echo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters