@@ -421,7 +421,54 @@ if [ "$RELEASE_PRE" == "false" ]; then
421
421
fi
422
422
fi
423
423
424
- # Upload package JSONs (temporary halted to fix json generation)
424
+ # Test the package JSONs
425
+
426
+ echo " Installing arduino-cli ..."
427
+ export PATH=" /home/runner/bin:$PATH "
428
+ source ./.github/scripts/install-arduino-cli.sh
429
+
430
+ echo " Testing $PACKAGE_JSON_DEV install ..."
431
+ echo " Updating index ..."
432
+ arduino-cli core update-index --additional-urls " file://$OUTPUT_DIR /$PACKAGE_JSON_DEV "
433
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to update index ($? )" ; exit 1; fi
434
+
435
+ echo " Installing esp32 ..."
436
+ arduino-cli core install esp32:esp32
437
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to install esp32 ($? )" ; exit 1; fi
438
+
439
+ echo " Compiling example ..."
440
+ arduino-cli compile --fqbn esp32:esp32:esp32 $GITHUB_WORKSPACE /libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
441
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to compile example ($? )" ; exit 1; fi
442
+
443
+ echo " Uninstalling esp32 ..."
444
+ arduino-cli core uninstall esp32:esp32
445
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to uninstall esp32 ($? )" ; exit 1; fi
446
+
447
+ echo " Test successful!"
448
+
449
+ if [ " $RELEASE_PRE " == " false" ]; then
450
+ echo " Testing $PACKAGE_JSON_REL install ..."
451
+ echo " Updating index ..."
452
+ arduino-cli core update-index --additional-urls " file://$OUTPUT_DIR /$PACKAGE_JSON_REL "
453
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to update index ($? )" ; exit 1; fi
454
+
455
+ echo " Installing esp32 ..."
456
+ arduino-cli core install esp32:esp32
457
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to install esp32 ($? )" ; exit 1; fi
458
+
459
+ echo " Compiling example ..."
460
+ arduino-cli compile --fqbn esp32:esp32:esp32 $GITHUB_WORKSPACE /libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
461
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to compile example ($? )" ; exit 1; fi
462
+
463
+ echo " Uninstalling esp32 ..."
464
+ arduino-cli core uninstall esp32:esp32
465
+ if [ $? -ne 0 ]; then echo " ERROR: Failed to uninstall esp32 ($? )" ; exit 1; fi
466
+
467
+ echo " Test successful!"
468
+ fi
469
+
470
+ # Upload package JSONs
471
+
425
472
echo " Uploading $PACKAGE_JSON_DEV ..."
426
473
echo " Download URL: " ` git_safe_upload_asset " $OUTPUT_DIR /$PACKAGE_JSON_DEV " `
427
474
echo " Pages URL: " ` git_safe_upload_to_pages " $PACKAGE_JSON_DEV " " $OUTPUT_DIR /$PACKAGE_JSON_DEV " `
0 commit comments