From b11b4f5ec8b1b410a9762021b952d5de6a4b9f18 Mon Sep 17 00:00:00 2001 From: Antoine Beauchamp Date: Sun, 4 Aug 2024 12:08:38 -0400 Subject: [PATCH] Removed unnecessary step `arduino-cli board install` from `install_arduino_cores.*` scripts. Moved arduinocli-core-esp*.yaml files to /ci directory. There is no need to keep separate copies in /ci/linux and /ci/windows. Git handles the new line character just fine. Now using relative file path for yaml-merge calls. --- ci/{linux => }/arduinocli-core-esp32.yaml | 0 ci/{linux => }/arduinocli-core-esp8266.yaml | 0 ci/linux/install_arduino_cores.sh | 15 ++++++--------- ci/windows/arduinocli-core-esp32.yaml | 3 --- ci/windows/arduinocli-core-esp8266.yaml | 3 --- ci/windows/install_arduino_cores.bat | 16 ++++++---------- 6 files changed, 12 insertions(+), 25 deletions(-) rename ci/{linux => }/arduinocli-core-esp32.yaml (100%) rename ci/{linux => }/arduinocli-core-esp8266.yaml (100%) delete mode 100644 ci/windows/arduinocli-core-esp32.yaml delete mode 100644 ci/windows/arduinocli-core-esp8266.yaml diff --git a/ci/linux/arduinocli-core-esp32.yaml b/ci/arduinocli-core-esp32.yaml similarity index 100% rename from ci/linux/arduinocli-core-esp32.yaml rename to ci/arduinocli-core-esp32.yaml diff --git a/ci/linux/arduinocli-core-esp8266.yaml b/ci/arduinocli-core-esp8266.yaml similarity index 100% rename from ci/linux/arduinocli-core-esp8266.yaml rename to ci/arduinocli-core-esp8266.yaml diff --git a/ci/linux/install_arduino_cores.sh b/ci/linux/install_arduino_cores.sh index d919c13..3d6bcc6 100755 --- a/ci/linux/install_arduino_cores.sh +++ b/ci/linux/install_arduino_cores.sh @@ -18,14 +18,16 @@ cat "$ARDUINO_CONFIG_PATH" echo echo -echo Adding arduinocli-core-esp8266.yaml to arduino-cli config... -yaml-merge --nostdin arduinocli-core-esp8266.yaml '$ARDUINO_CONFIG_PATH' --overwrite='$ARDUINO_CONFIG_PATH' +export YAML_MERGE_FILE="../arduinocli-core-esp8266.yaml" +echo Adding $YAML_MERGE_FILE to arduino-cli config... +yaml-merge --nostdin '$YAML_MERGE_FILE' '$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 --nostdin arduinocli-core-esp32.yaml '$ARDUINO_CONFIG_PATH' --overwrite='$ARDUINO_CONFIG_PATH' +set YAML_MERGE_FILE="../arduinocli-core-esp32.yaml" +echo Adding $YAML_MERGE_FILE to arduino-cli config... +yaml-merge --nostdin '$YAML_MERGE_FILE' '$ARDUINO_CONFIG_PATH' --overwrite='$ARDUINO_CONFIG_PATH' cat "$ARDUINO_CONFIG_PATH" echo echo @@ -35,11 +37,6 @@ arduino-cli core update-index echo echo -echo arduino board install... -arduino-cli board install -echo -echo - echo Installing "arduino:avr" core... arduino-cli core install "arduino:avr" echo diff --git a/ci/windows/arduinocli-core-esp32.yaml b/ci/windows/arduinocli-core-esp32.yaml deleted file mode 100644 index 86a9c7d..0000000 --- a/ci/windows/arduinocli-core-esp32.yaml +++ /dev/null @@ -1,3 +0,0 @@ -board_manager: - additional_urls: - - https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json diff --git a/ci/windows/arduinocli-core-esp8266.yaml b/ci/windows/arduinocli-core-esp8266.yaml deleted file mode 100644 index 0cdb190..0000000 --- a/ci/windows/arduinocli-core-esp8266.yaml +++ /dev/null @@ -1,3 +0,0 @@ -board_manager: - additional_urls: - - http://arduino.esp8266.com/stable/package_esp8266com_index.json diff --git a/ci/windows/install_arduino_cores.bat b/ci/windows/install_arduino_cores.bat index e511418..7de342c 100644 --- a/ci/windows/install_arduino_cores.bat +++ b/ci/windows/install_arduino_cores.bat @@ -18,15 +18,17 @@ type "%ARDUINO_CONFIG_PATH%" echo. echo. -echo Adding arduinocli-core-esp8266.yaml to arduino-cli config... -yaml-merge --nostdin arduinocli-core-esp8266.yaml "%ARDUINO_CONFIG_PATH%" --overwrite="%ARDUINO_CONFIG_PATH%" +set YAML_MERGE_FILE=..\arduinocli-core-esp8266.yaml +echo Adding %YAML_MERGE_FILE% to arduino-cli config... +yaml-merge --nostdin "%YAML_MERGE_FILE%" "%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 --nostdin arduinocli-core-esp32.yaml "%ARDUINO_CONFIG_PATH%" --overwrite="%ARDUINO_CONFIG_PATH%" +set YAML_MERGE_FILE=..\arduinocli-core-esp32.yaml +echo Adding %YAML_MERGE_FILE% to arduino-cli config... +yaml-merge --nostdin "%YAML_MERGE_FILE%" "%ARDUINO_CONFIG_PATH%" --overwrite="%ARDUINO_CONFIG_PATH%" if %errorlevel% neq 0 exit /b %errorlevel% type "%ARDUINO_CONFIG_PATH%" echo. @@ -38,12 +40,6 @@ if %errorlevel% neq 0 exit /b %errorlevel% echo. echo. -echo arduino board install... -arduino-cli board install -if %errorlevel% neq 0 exit /b %errorlevel% -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