From ce7e879bb680cbf9ec572c65d5165b0d6ee6be1e Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 9 Jan 2020 14:15:39 -0800 Subject: [PATCH 01/10] Update ATTinyCore board's FQBN A millis option was added to ATTinyCore, and this option must be added to the FQBN to avoid the "{build.millis}: No such file or directory" compilation error. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index baf1d5f..87e82fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ script: # Test build_sketch with specific IDE version # Test build_sketch without absolute path - cd "${SKETCHBOOK_FOLDER}/libraries/CapacitiveSensor/examples/CapacitiveSensorSketch/" - - build_sketch "CapacitiveSensorSketch.pde" "ATTinyCore-master:avr:attinyx5:LTO=disable,TimerClockSource=default,chip=85,clock=8internal,bod=disable" "false" "1.8.4" + - build_sketch "CapacitiveSensorSketch.pde" "ATTinyCore-master:avr:attinyx5:LTO=disable,TimerClockSource=default,chip=85,clock=8internal,eesave=aenable,bod=disable,millis=enabled" "false" "1.8.4" # Test library installed from .zip # Test board from hardware package installed via Boards Manager without URL From bcd65a312a88bbacb73781028db9eb5568627d57 Mon Sep 17 00:00:00 2001 From: per1234 Date: Tue, 4 Feb 2020 21:12:58 -0800 Subject: [PATCH 02/10] check_name: correctly handle "/" in library.properties name value Previously, when the library.properties name value contained "/", the check incorrectly passed, and only the part of the name value following "/" was checked, because it was assumed to be a path separator. --- arduino-ci-script.sh | 83 +++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/arduino-ci-script.sh b/arduino-ci-script.sh index 36905cd..219a8cc 100644 --- a/arduino-ci-script.sh +++ b/arduino-ci-script.sh @@ -1237,43 +1237,51 @@ ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER=$((ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER + readonly ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_INVALID_CHARACTER_EXIT_STATUS=$ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER=$((ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER + 1)) readonly ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_TOO_LONG_EXIT_STATUS=$ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER +readonly ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_LAST_EXIT_STATUS=$ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER # The same folder name restrictions apply to libraries and sketches so this function may be used for both -function check_folder_name() { - local -r path="$1" - # Get the folder name from the path - local -r folderName="${path##*/}" +function check_name() { + local -r name="$1" local exitStatus=$ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS # Starting folder name with a number is only supported by Arduino IDE 1.8.4 and newer local -r startsWithNumberRegex="^[0-9]" - if [[ "$folderName" =~ $startsWithNumberRegex ]]; then - echo "WARNING: Discouraged folder name: ${folderName}. Folder name beginning with a number is only supported by Arduino IDE 1.8.4 and newer." + if [[ "$name" =~ $startsWithNumberRegex ]]; then + echo "WARNING: Discouraged folder name: ${name}. Folder name beginning with a number is only supported by Arduino IDE 1.8.4 and newer." fi # Starting folder name with a - or . is not allowed local -r startsWithInvalidCharacterRegex="^[-.]" - if [[ "$folderName" =~ $startsWithInvalidCharacterRegex ]]; then - echo "Invalid folder name: ${folderName}. Folder name beginning with a - or . is not allowed." + if [[ "$name" =~ $startsWithInvalidCharacterRegex ]]; then + echo "Invalid folder name: ${name}. Folder name beginning with a - or . is not allowed." exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_INVALID_FIRST_CHARACTER_EXIT_STATUS) fi # Allowed characters: a-z, A-Z, 0-1, -._ local -r disallowedCharactersRegex="[^a-zA-Z0-9._-]" - if [[ "$folderName" =~ $disallowedCharactersRegex ]]; then - echo "Invalid folder name: ${folderName}. Only letters, numbers, dots, dashes, and underscores are allowed." + if [[ "$name" =~ $disallowedCharactersRegex ]]; then + echo "Invalid folder name: ${name}. Only letters, numbers, dots, dashes, and underscores are allowed." exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_INVALID_CHARACTER_EXIT_STATUS) fi # <64 characters - if [[ ${#folderName} -gt 63 ]]; then - echo "Folder name $folderName exceeds the maximum of 63 characters." + if [[ ${#name} -gt 63 ]]; then + echo "Folder name $name exceeds the maximum of 63 characters." exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_TOO_LONG_EXIT_STATUS) fi return "$exitStatus" } -ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER=1 +function check_folder_name() { + local -r path="$1" + # Get the folder name from the path + local -r folderName="${path##*/}" + + check_name "$folderName" + return "$?" +} + +ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER=$((ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_LAST_EXIT_STATUS + 1)) readonly ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS=$ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER function check_library_properties_name() { local -r name="$1" @@ -1288,6 +1296,13 @@ function check_library_properties_name() { if [[ "${name,,}" =~ $ReservedNameRegex ]] && ! [[ "$name" =~ $GrandfatheredNameRegex ]]; then exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS) fi + + # Library Manager installs libraries to a folder that is the name field value with any spaces replaced with _ + local -r libraryManagerFolderName="${name// /_}" + + check_name "$libraryManagerFolderName" + exitStatus=$(set_exit_status "$exitStatus" $?) + return "$exitStatus" } @@ -1750,19 +1765,14 @@ function check_library_properties() { exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_BLANK_NAME_EXIT_STATUS) else # Check for invalid name value - # Library Manager installs libraries to a folder that is the name field value with any spaces replaced with _ - local libraryManagerFolderName="${nameValue// /_}" - check_folder_name "$libraryManagerFolderName" - local checkFolderNameExitStatus=$? - if [[ $checkFolderNameExitStatus -ne $ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]]; then - echo "WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format" - fi - - # Check if the library.properties name value starts with "arduino" (case-insensitive) check_library_properties_name "$nameValue" local checkLibraryPropertiesNameExitStatus=$? - if [[ "$checkLibraryPropertiesNameExitStatus" == "$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]]; then - echo "WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries. Libraries using a reserved name will not be accepted in the Library Manager index." + if [[ $checkLibraryPropertiesNameExitStatus -ne $ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]]; then + if [[ "$checkLibraryPropertiesNameExitStatus" == "$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]]; then + echo "WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries. Libraries using a reserved name will not be accepted in the Library Manager index." + else + echo "WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format" + fi fi fi fi @@ -2368,22 +2378,17 @@ function check_library_manager_compliance() { local nameValue nameValue="$(get_library_properties_field_value "$libraryProperties" 'name')" - # Check for characters in the library.properties name value disallowed by the Library Manager indexer - # Library Manager installs libraries to a folder that is the name field value with any spaces replaced with _ - local -r libraryManagerFolderName="${nameValue// /_}" - check_folder_name "$libraryManagerFolderName" - local -r checkFolderNameExitStatus=$? - if [[ $checkFolderNameExitStatus -ne $ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]]; then - echo "ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format" - exitStatus=$(set_exit_status "$exitStatus" $((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_CHECK_FOLDER_NAME_OFFSET + checkFolderNameExitStatus))) - fi - - # Check if the library.properties name value starts with "arduino" (case-insensitive) + # Check if the library.properties name value meets the requirements of the Library Manager indexer check_library_properties_name "$nameValue" - local checkLibraryPropertiesNameExitStatus=$? - if [[ "$checkLibraryPropertiesNameExitStatus" == "$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]]; then - echo "ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries." - exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_IS_RESERVED_EXIT_STATUS) + local -r checkLibraryPropertiesNameExitStatus=$? + if [[ $checkLibraryPropertiesNameExitStatus -ne $ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]]; then + if [[ "$checkLibraryPropertiesNameExitStatus" == "$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]]; then + echo "ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries." + exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_IS_RESERVED_EXIT_STATUS) + else + echo "ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format" + exitStatus=$(set_exit_status "$exitStatus" $((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_CHECK_FOLDER_NAME_OFFSET + checkLibraryPropertiesNameExitStatus))) + fi fi local urlValue From 9c5a7aacd210d9a11f1ddb1115d8efb71a13c371 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 7 Feb 2020 09:16:36 -0800 Subject: [PATCH 03/10] Blacklist the 1.8.11-ms-store-11 tag This version is not available for download. Fixes https://github.com/per1234/arduino-ci-script/issues/30 --- arduino-ci-script.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/arduino-ci-script.sh b/arduino-ci-script.sh index 219a8cc..982ec94 100644 --- a/arduino-ci-script.sh +++ b/arduino-ci-script.sh @@ -195,7 +195,7 @@ function install_ide() { return_handler "$ARDUINO_CI_SCRIPT_FAILURE_EXIT_STATUS" fi - # Generate an array declaration string containing a list all Arduino IDE versions which support CLI (1.5.2+ according to https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#history) + # Generate an array declaration string containing a list all available Arduino IDE versions which support CLI # Save the current folder local -r previousFolder="$PWD" cd "$ARDUINO_CI_SCRIPT_TEMPORARY_FOLDER" @@ -204,13 +204,26 @@ function install_ide() { cd Arduino git remote add origin https://github.com/arduino/Arduino.git if [[ "$startIDEversion" != "1.6.2" ]] && [[ "$startIDEversion" != "1.6.2" ]]; then - # Arduino IDE 1.6.2 has the nasty behavior of moving the included hardware cores to the .arduino15 folder, causing those versions to be used for all builds after Arduino IDE 1.6.2 is used. For that reason, 1.6.2 will only be installed if explicitly specified in the install_ide version arguments + # See "Arduino IDE version blacklist" documentation below local -r IDEversion162regex=--regex='refs/tags/1\.6\.2' if [[ "$ARDUINO_CI_SCRIPT_VERBOSITY_LEVEL" -gt 0 ]]; then echo "NOTE: Due to not playing nicely with other versions, Arduino IDE 1.6.2 will not be installed unless explicitly specified in the version arguments." fi fi - local -r ARDUINO_CI_SCRIPT_FULL_IDE_VERSION_LIST_ARRAY="${ARDUINO_CI_SCRIPT_IDE_VERSION_LIST_ARRAY_DECLARATION}'(\"$(git ls-remote --quiet --tags --refs | grep --invert-match --regexp='refs/tags/1\.0' --regexp='refs/tags/1\.5$' --regexp='refs/tags/1\.5\.1$' --regexp='refs/tags/1\.5\.4-r2$' --regexp='refs/tags/1\.5\.5-r2$' --regexp='refs/tags/1\.5\.7-macosx-java7$' --regexp='refs/tags/1\.5\.8-macosx-java7$' ${IDEversion162regex} --regexp='refs/tags/1\.6\.5-r2$' --regexp='refs/tags/1\.6\.5-r3$' | grep --regexp='refs/tags/[0-9]\+\.[0-9]\+\.[0-9]\+\(\(-.*$\)\|$\)' | cut --delimiter='/' --fields=3 | sort --version-sort | sed ':a;N;$!ba;s/\n/\" \"/g')\")'" + + # Arduino IDE tag blacklist: + # <1.5.2: no CLI (https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#history) + # 1.5.4-r2: Not available for download + # 1.5.5-r2: Not available for download + # 1.5.7-macosx-java7: Not available for download + # 1.5.8-macosx-java7: Not available for download + # 1.6.2: has the nasty behavior of moving the included hardware cores to the .arduino15 folder, causing those versions to be used for all builds after Arduino IDE 1.6.2 is used. For that reason, 1.6.2 will only be installed if explicitly specified in the install_ide version arguments + # 1.6.5-r2: Not available for download + # 1.6.5-r3: Not available for download + # 1.6.5-r2: Not available for download + # 1.6.5-r3: Not available for download + # 1.8.11-ms-store-1: Not available for download + local -r ARDUINO_CI_SCRIPT_FULL_IDE_VERSION_LIST_ARRAY="${ARDUINO_CI_SCRIPT_IDE_VERSION_LIST_ARRAY_DECLARATION}'(\"$(git ls-remote --quiet --tags --refs | grep --invert-match --regexp='refs/tags/1\.0' --regexp='refs/tags/1\.5$' --regexp='refs/tags/1\.5\.1$' --regexp='refs/tags/1\.5\.4-r2$' --regexp='refs/tags/1\.5\.5-r2$' --regexp='refs/tags/1\.5\.7-macosx-java7$' --regexp='refs/tags/1\.5\.8-macosx-java7$' ${IDEversion162regex} --regexp='refs/tags/1\.6\.5-r2$' --regexp='refs/tags/1\.6\.5-r3$' --regexp='refs/tags/1\.8\.11-ms-store-1$' | grep --regexp='refs/tags/[0-9]\+\.[0-9]\+\.[0-9]\+\(\(-.*$\)\|$\)' | cut --delimiter='/' --fields=3 | sort --version-sort | sed ':a;N;$!ba;s/\n/\" \"/g')\")'" cd .. # Remove the temporary repo rm Arduino --recursive --force From 57bcd031ba3d1a628092376a627913c71549bb32 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 10 Feb 2020 03:30:13 -0800 Subject: [PATCH 04/10] check_code_formatting: create application folder if it doesn't exist --- arduino-ci-script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino-ci-script.sh b/arduino-ci-script.sh index 982ec94..9c741a7 100644 --- a/arduino-ci-script.sh +++ b/arduino-ci-script.sh @@ -2457,7 +2457,7 @@ function check_code_formatting() { # Install astyle # Save the current folder local -r previousFolder="$PWD" - mkdir "${ARDUINO_CI_SCRIPT_APPLICATION_FOLDER}/astyle" + mkdir --parents "${ARDUINO_CI_SCRIPT_APPLICATION_FOLDER}/astyle" wget --no-verbose $ARDUINO_CI_SCRIPT_QUIET_OPTION --output-document="${ARDUINO_CI_SCRIPT_TEMPORARY_FOLDER}/astyle.tar.gz" "https://iweb.dl.sourceforge.net/project/astyle/astyle/astyle%203.1/astyle_3.1_linux.tar.gz" tar --extract --file="${ARDUINO_CI_SCRIPT_TEMPORARY_FOLDER}/astyle.tar.gz" --directory="${ARDUINO_CI_SCRIPT_APPLICATION_FOLDER}" cd "${ARDUINO_CI_SCRIPT_APPLICATION_FOLDER}/astyle/build/gcc" From 135aecc7e6efed27b9d91a445f4a28a1f10e1bb6 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 11 Jun 2020 19:14:58 -0700 Subject: [PATCH 05/10] CI: fix codespell false positive by adding word to ignore list "exampels" is in the script's check for misspelled examples folders. Although codespell is right to detect this as a misspelled word, the word is intentionally misspelled in the code, and thus needs to be ignored. --- etc/codespell-ignore-words-list.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/codespell-ignore-words-list.txt b/etc/codespell-ignore-words-list.txt index 0e2decd..c74fb04 100644 --- a/etc/codespell-ignore-words-list.txt +++ b/etc/codespell-ignore-words-list.txt @@ -1,3 +1,4 @@ ba propert te +exampels From b7882217509b3cff567b32c4a29359862f0c6d14 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 11 Jun 2020 19:18:44 -0700 Subject: [PATCH 06/10] CI: fix installation of shfmt Changes to shfmt have resulted in the previous installation method causing an error: ../../../golang.org/x/term/term_linux.go:11:7: ioctlReadTermios redeclared in this block --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87e82fb..11b7482 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,11 +60,11 @@ matrix: # Check for inconsistent script formatting - name: 'Script Formatting Check' - language: go + language: minimal install: - - go get -u mvdan.cc/sh/cmd/shfmt + - docker run --volume "$TRAVIS_BUILD_DIR":/mnt --workdir /mnt mvdan/shfmt:latest -i 2 -w . script: - - shfmt -i 2 -d . + - git diff --color --exit-code - name: 'Unit Tests' From 8cbff7d9e010d66a00a7a593cedfd0f89b446333 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 25 Jul 2020 23:49:26 -0700 Subject: [PATCH 07/10] Switch to recommended "blocklist" term in comments See: https://www.kernel.org/doc/html/latest/process/coding-style.html#naming --- arduino-ci-script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arduino-ci-script.sh b/arduino-ci-script.sh index 9c741a7..a34f90d 100644 --- a/arduino-ci-script.sh +++ b/arduino-ci-script.sh @@ -204,14 +204,14 @@ function install_ide() { cd Arduino git remote add origin https://github.com/arduino/Arduino.git if [[ "$startIDEversion" != "1.6.2" ]] && [[ "$startIDEversion" != "1.6.2" ]]; then - # See "Arduino IDE version blacklist" documentation below + # See "Arduino IDE version blocklist" documentation below local -r IDEversion162regex=--regex='refs/tags/1\.6\.2' if [[ "$ARDUINO_CI_SCRIPT_VERBOSITY_LEVEL" -gt 0 ]]; then echo "NOTE: Due to not playing nicely with other versions, Arduino IDE 1.6.2 will not be installed unless explicitly specified in the version arguments." fi fi - # Arduino IDE tag blacklist: + # Arduino IDE tag blocklist: # <1.5.2: no CLI (https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#history) # 1.5.4-r2: Not available for download # 1.5.5-r2: Not available for download From b29d515b8ef6584dc4fac2d399b622a60a9f403f Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 25 Jul 2020 23:53:36 -0700 Subject: [PATCH 08/10] Add all Microsoft Store releases to the IDE version blocklist For the second time, the script has been broken by a tag used for a release specific to the Microsoft Store version of the Arduino IDE. Both times this happened, the tag has followed a consistent format. So I have generalized the regular expression to exclude all such tags in hopes this will prevent any future occurrences of this issue. --- arduino-ci-script.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arduino-ci-script.sh b/arduino-ci-script.sh index a34f90d..d96e545 100644 --- a/arduino-ci-script.sh +++ b/arduino-ci-script.sh @@ -223,7 +223,8 @@ function install_ide() { # 1.6.5-r2: Not available for download # 1.6.5-r3: Not available for download # 1.8.11-ms-store-1: Not available for download - local -r ARDUINO_CI_SCRIPT_FULL_IDE_VERSION_LIST_ARRAY="${ARDUINO_CI_SCRIPT_IDE_VERSION_LIST_ARRAY_DECLARATION}'(\"$(git ls-remote --quiet --tags --refs | grep --invert-match --regexp='refs/tags/1\.0' --regexp='refs/tags/1\.5$' --regexp='refs/tags/1\.5\.1$' --regexp='refs/tags/1\.5\.4-r2$' --regexp='refs/tags/1\.5\.5-r2$' --regexp='refs/tags/1\.5\.7-macosx-java7$' --regexp='refs/tags/1\.5\.8-macosx-java7$' ${IDEversion162regex} --regexp='refs/tags/1\.6\.5-r2$' --regexp='refs/tags/1\.6\.5-r3$' --regexp='refs/tags/1\.8\.11-ms-store-1$' | grep --regexp='refs/tags/[0-9]\+\.[0-9]\+\.[0-9]\+\(\(-.*$\)\|$\)' | cut --delimiter='/' --fields=3 | sort --version-sort | sed ':a;N;$!ba;s/\n/\" \"/g')\")'" + # 1.8.13-ms-store-1: Not available for download + local -r ARDUINO_CI_SCRIPT_FULL_IDE_VERSION_LIST_ARRAY="${ARDUINO_CI_SCRIPT_IDE_VERSION_LIST_ARRAY_DECLARATION}'(\"$(git ls-remote --quiet --tags --refs | grep --invert-match --regexp='refs/tags/1\.0' --regexp='refs/tags/1\.5$' --regexp='refs/tags/1\.5\.1$' --regexp='refs/tags/1\.5\.4-r2$' --regexp='refs/tags/1\.5\.5-r2$' --regexp='refs/tags/1\.5\.7-macosx-java7$' --regexp='refs/tags/1\.5\.8-macosx-java7$' ${IDEversion162regex} --regexp='refs/tags/1\.6\.5-r2$' --regexp='refs/tags/1\.6\.5-r3$' --regexp='refs/tags/.*-ms-store.*$' | grep --regexp='refs/tags/[0-9]\+\.[0-9]\+\.[0-9]\+\(\(-.*$\)\|$\)' | cut --delimiter='/' --fields=3 | sort --version-sort | sed ':a;N;$!ba;s/\n/\" \"/g')\")'" cd .. # Remove the temporary repo rm Arduino --recursive --force From 56948633dc8cc2de9ca55aa599859c26007ffd82 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 28 Jan 2021 21:31:28 -0800 Subject: [PATCH 09/10] Add CI workflow to check for broken links in docs On every push or pull request, check for broken links in the Markdown files of the repository. --- .github/workflows/check-links.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/check-links.yml diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml new file mode 100644 index 0000000..fbb4b4e --- /dev/null +++ b/.github/workflows/check-links.yml @@ -0,0 +1,30 @@ +name: Check Links + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/check-links.yml" + - "**.md" + pull_request: + paths: + - ".github/workflows/check-links.yml" + - "**.md" + schedule: + # Run every Tuesday at 3 AM UTC to catch breakage caused by changes to the linked sites. + - cron: "0 3 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: yes From 9f37f6b52556c61765dea4b0e8a96c87dc7995e5 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 28 Jan 2021 21:47:23 -0800 Subject: [PATCH 10/10] Fix broken links in documentation --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 09eb6db..38e0d66 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,7 @@ Echo a tab separated report of all verification results to the log. The report i - Library Issue - Short description of the last library issue detected. ##### `publish_report_to_repository REPORT_GITHUB_TOKEN repositoryURL reportBranch reportFolder doLinkComment` -Add the report to a repository. See the [instructions for publishing job reports](publishing-job-reports) for details. +Add the report to a repository. See the [instructions for publishing job reports](#publishing-job-reports) for details. - Parameter: **REPORT_GITHUB_TOKEN** - The hidden or encrypted environment variable containing the GitHub personal access token. - Parameter: **repositoryURL** - The .git URL of the repository to publish the report to. This URL can be found by clicking the "Clone or download" button on the home page of the repository. The repository must already exist. - Parameter: **reportBranch** - The branch to publish the report to. The branch must already exist. @@ -198,7 +198,7 @@ Add the report to a repository. See the [instructions for publishing job reports - Parameter: **doLinkComment** - `true` or `false` Whether to comment on the GitHub thread of the commit that triggered the build with a link to the report. ##### `publish_report_to_gist REPORT_GITHUB_TOKEN REPORT_GIST_URL doLinkComment` -Add the report to the report gist. See the [instructions for publishing job reports](publishing-job-reports) for details. +Add the report to the report gist. See the [instructions for publishing job reports](#publishing-job-reports) for details. - Parameter: **REPORT_GITHUB_TOKEN** - The hidden or encrypted environment variable containing the GitHub personal access token. - Parameter: **REPORT_GIST_URL** - The URL of the report gist. - Parameter: **doLinkComment** - `true` or `false` Whether to comment on the GitHub thread of the commit that triggered the build with a link to the report. @@ -243,8 +243,8 @@ The Arduino IDE will usually try to start the GUI whenever there is an error in ##### Verbose output Verbose output results in a harder to read log so you should leave it off or minimized when possible but it can be useful for troubleshooting. Note that turning on verbose output for a large build may cause the log to exceed 4 MB, which causes Travis CI to terminate the job. -- Verbose script output - See [`set_script_verbosity` documentation](set_script_verbosity-script_verbosity_level) in the Usage section. -- Verbose output during compilation - See [`set_verbose_output_during_compilation` documentation](set_verbose_output_during_compilation-verboseoutputduringcompilation) in the Usage section. +- Verbose script output - See [`set_script_verbosity` documentation](#set_script_verbosity-script_verbosity_level) in the Usage section. +- Verbose output during compilation - See [`set_verbose_output_during_compilation` documentation](#set_verbose_output_during_compilation-verboseoutputduringcompilation) in the Usage section. - Verbose output for Travis CI - Add one or both of the following lines to your `.travis.yml` file to get more details of the Travis CI build process. - Print shell input lines as they are read: - `- set -o verbose`