ci(release): Add JSON install test (#10104)
This commit is contained in:
parent
5aaa49e76d
commit
9339c00d34
1 changed files with 47 additions and 1 deletions
48
.github/scripts/on-release.sh
vendored
48
.github/scripts/on-release.sh
vendored
|
|
@ -421,7 +421,53 @@ if [ "$RELEASE_PRE" == "false" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Upload package JSONs (temporary halted to fix json generation)
|
||||
# Test the package JSONs
|
||||
|
||||
echo "Installing arduino-cli ..."
|
||||
source ./.github/scripts/install-arduino-cli.sh
|
||||
|
||||
echo "Testing $PACKAGE_JSON_DEV install ..."
|
||||
echo "Updating index ..."
|
||||
arduino-cli core update-index --additional-urls "file://$OUTPUT_DIR/$PACKAGE_JSON_DEV"
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to update index ($?)"; exit 1; fi
|
||||
|
||||
echo "Installing esp32 ..."
|
||||
arduino-cli core install esp32:esp32
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to install esp32 ($?)"; exit 1; fi
|
||||
|
||||
echo "Compiling example ..."
|
||||
arduino-cli compile --fqbn espressif:esp32:esp32 $GITHUB_WORKSPACE/libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to compile example ($?)"; exit 1; fi
|
||||
|
||||
echo "Uninstalling esp32 ..."
|
||||
arduino-cli core uninstall esp32:esp32
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to uninstall esp32 ($?)"; exit 1; fi
|
||||
|
||||
echo "Test successful!"
|
||||
|
||||
if [ "$RELEASE_PRE" == "false" ]; then
|
||||
echo "Testing $PACKAGE_JSON_REL install ..."
|
||||
echo "Updating index ..."
|
||||
arduino-cli core update-index --additional-urls "file://$OUTPUT_DIR/$PACKAGE_JSON_REL"
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to update index ($?)"; exit 1; fi
|
||||
|
||||
echo "Installing esp32 ..."
|
||||
arduino-cli core install esp32:esp32
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to install esp32 ($?)"; exit 1; fi
|
||||
|
||||
echo "Compiling example ..."
|
||||
arduino-cli compile --fqbn espressif:esp32:esp32 $GITHUB_WORKSPACE/libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to compile example ($?)"; exit 1; fi
|
||||
|
||||
echo "Uninstalling esp32 ..."
|
||||
arduino-cli core uninstall esp32:esp32
|
||||
if [ $? -ne 0 ]; then echo "ERROR: Failed to uninstall esp32 ($?)"; exit 1; fi
|
||||
|
||||
echo "Test successful!"
|
||||
fi
|
||||
|
||||
# Upload package JSONs
|
||||
|
||||
echo "Uploading $PACKAGE_JSON_DEV ..."
|
||||
echo "Download URL: "`git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
|
||||
echo "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
|
||||
|
|
|
|||
Loading…
Reference in a new issue