1. 12 Jan, 2023 1 commit
  2. 10 Jan, 2023 1 commit
    • Giuliano Panzironi's avatar
      Store all temporary files under a single folder (#2031) · 34762a6d
      Giuliano Panzironi authored
      Fix #2028
      
      Any temporary file will be persisted in a new dedicated folder named as "arduino" located in the OS-specific temporary directory, e.g.:
      /tmp/
      ├── arduino
      │   ├── arduino-core-cache
      │   │   └── core_arduino_avr_uno_640aa5b4d646262327bbea65c3462b39.a
      │   └── arduino-sketch-89E1544CF5F196B29E530BA6940B661F
      │       ├── 06.ino.elf
      │       ├── 06.ino.with_bootloader.bin
      │       ├── build.options.json
      │       ├── compile_commands.json
      │       ├── core
      │       │   ├── abi.cpp.d
      [...]
      
      This change is meant to make easier maintenance operations for both end-users and operating-systems.
      Signed-off-by: default avatargiuliano <panzironi.giuliano@gmail.com>
      34762a6d
  3. 05 Jan, 2023 1 commit
  4. 04 Jan, 2023 1 commit
  5. 03 Jan, 2023 2 commits
  6. 21 Dec, 2022 1 commit
  7. 19 Dec, 2022 2 commits
    • MatteoPologruto's avatar
      Add `Online Help` link to gRPC interface's `Platform` (#2009) · 13fa409c
      MatteoPologruto authored
      * Add online help field to rpc platform
      
      * Add online help field to the output of `core search --format json`
      
      * Add tests for the changes
      13fa409c
    • per1234's avatar
      Disable "fail fast" feature in "Test Go" workflow (#2014) · de905799
      per1234 authored
      For efficiency, the "Test Go" GitHub Actions workflow splits the test suite into multiple jobs which run in parallel.
      This is done via a "job matrix".
      
      By default GitHub Actions uses a "fail fast" behavior for job matrixes, where all in progress or pending jobs of the
      matrix are immediately canceled upon failure of any job.
      
      The benefit of this "fail fast" behavior is efficiency in the case where a failure is universal and those other jobs
      were certain to eventually fail. However, in other cases a failure is either specific to the configuration of a single
      job (e.g., a Windows-specific bug), or a spurious result of a transient network outage. In the latter case, canceling
      the other jobs is very harmful. Running the jobs for the other operating systems would highlight the nature of an
      OS-specific failure for the contributor. Canceling other jobs due to a transient failure means all those jobs must be
      reran instead of only the specific job that suffered the failure.
      
      The workflow is hereby configured to disable the "fail fast" behavior. All the matrix jobs will now run even if one of
      them has failed.
      de905799
  8. 16 Dec, 2022 2 commits
  9. 14 Dec, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog]Migrate tests from `upload_test.py` to `test_upload.go` (#2001) · f850706b
      MatteoPologruto authored
      * Migrate TestUpload from test_upload.py to upload_test.go
      
      * Migrate TestUploadWithInputDirFlag from test_upload.py to upload_test.go
      
      * Migrate TestUploadWithInputFileFlag from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadCombo from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadComboWithCustomBuildPath from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadComboWithPdeExtension from test_upload.py to upload_test.go
      
      * Migrate TestUploadSketchWithPdeExtension from test_upload.py to upload_test.go
      
      * Migrate TestUploadWithInputDirContainingMultipleBinaries from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadComboSketchWithMismatchedCasing from test_upload.py to upload_test.go
      
      * Migrate TestUploadSketchWithMismatchedCasing from test_upload.py to upload_test.go
      
      * Migrate TestUploadToPortWithBoardAutodetect from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadToPortWithBoardAutodetect to upload_test.go and delete test_upload.py
      f850706b
  10. 13 Dec, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog] Migrate Lib tests for `test_lib.py` to `lib_test.go` (#1964) · 320a22c6
      MatteoPologruto authored
      * Migrate TestLibExamplesWithCaseMismatch from test_lib.py to lib_test.go
      
      * Migrate TestLibCommandsWithLibraryHavingInvalidVersion from test_lib.py to lib_test.go
      
      * Migrate TestInstallZipLibWithMacosMetadata from test_lib.py to lib_test.go
      
      * Migrate TestInstallZipInvalidLibrary from test_lib.py to lib_test.go
      
      * Migrate TestInstallGitInvalidLibrary from test_lib.py to lib_test.go
      
      * Migrate TestUpgradeDoesNotTryToUpgradeBundledCoreLibrariesInSketchbook from test_lib.py to lib_test.go
      
      * Migrate TestUpgradeDoesNotTryToUpgradeBundledCoreLibraries from test_lib.py to lib_test.go
      
      * Migrate TestInstallGitUrlAndZipPathFlagsVisibility from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithZipPath from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithZipPathMultipleLibraries from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithGitUrlLocalFileUri to lib_test.go and delete test_lib.py
      
      * Improve style and readability
      320a22c6
  11. 12 Dec, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog] Migrate `lib_test.py` to `test_lib.go` part two (#1999) · 53a27683
      MatteoPologruto authored
      * Migrate TestUninstallSpaces from test_lib.py to lib_test.go
      
      * Migrate TestLibOpsCaseInsensitive from test_lib.py to lib_test.go
      
      * Migrate TestSearch from test_lib.py to lib_test.go
      
      * Migrate TestSearchParagraph from test_lib.py to lib_test.go
      
      * Migrate TestLibListWithUpdatableFlag from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithGitUrlFromCurrentDirectory from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithGitLocalUrl from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithGitUrlRelativePath from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithGitUrlDoesNotCreateGitRepo from test_lib.py to lib_test.go
      
      * Migrate TestInstallWithGitUrlMultipleLibraries from test_lib.py to lib_test.go
      
      * Migrate TestLibExamples from test_lib.py to lib_test.go
      
      * Migrate TestLibExamplesWithPdeFile from test_lib.py to lib_test.go
      53a27683
  12. 09 Dec, 2022 3 commits
  13. 07 Dec, 2022 2 commits
    • per1234's avatar
      [skip changelog] Restore certificate check compatibility w/ RC2-40-CBC encrypted PKS #12 (#2002) · 90771beb
      per1234 authored
      The "Check Certificates" GitHub Actions workflow uses OpenSSL to check for problems with the project's signing
      certificates.
      
      Certificates exported to PKS #12 archive files using older tools may have been encrypted using the "RC2-40-CBC"
      algorithm.
      
      Due to the availability of more secure modern alternatives, default support for RC2-40-CBC encryption was dropped in
      OpenSSL 3.x.
      
      The macOS signing certificate uses this RC2-40-CBC encryption.
      
      The "Check Certificates" GitHub Actions workflow runs on the `ubuntu-latest` runner. Previously, this runner used Ubuntu
      20.04. This has now changed to Ubuntu 22.04. With the operating system update came an OpenSSL update from 1.1.1f to
      3.0.2. This caused the workflow runs to fail on the macOS certificate job:
      
      Error outputting keys and certificates
      80FBB0C5087F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:../crypto/evp/evp_fetch.c:349:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()
      
      Even though no longer done by default, OpenSSL still supports RC2-40-CBC encryption via its "legacy" provider. So
      compatibility with the certificate is restored by adding the `-legacy` flag to the `openssl pkcs12` commands.
      90771beb
    • MatteoPologruto's avatar
      [skip-changelog] Avoid running publish-go-tester-task if tag is set (#1984) · bc5cf6d7
      MatteoPologruto authored
      * Avoid running publish-go-tester-task if tag is set
      
      * Update .github/workflows/publish-go-tester-task.yml
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Update .github/workflows/publish-go-tester-task.yml
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      bc5cf6d7
  14. 02 Dec, 2022 2 commits
  15. 01 Dec, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog] Eliminate empty lines produced by `board details -b` (#1997) · 210dda42
      MatteoPologruto authored
      * Eliminate blank line between required tools row entries
      
      * Fix Programmers ID typo and modify tests accordingly
      
      * Reduce spacing between "Required tool" columns
      
      Splitting the table produced by `board details` after `Platform checksum` resets both the average length and the variance of the following cells, thus reducing the space between entries.
      210dda42
  16. 30 Nov, 2022 1 commit
  17. 29 Nov, 2022 2 commits
    • MatteoPologruto's avatar
      Fix `sketch new` default overwriting behavior (#1993) · ab73719d
      MatteoPologruto authored
      * Check .ino sketch file exists in path before creating a new one
      
      Running "arduino-cli sketch new ." from a sketch directory overwrites an existing .ino sketch file, without asking for confirmation. This fix introduces a check to verify if the specified path already
      contains a .ino sketch file. If it does, an error is returned, otherwise a new sketch is created as usual.
      
      * Add test to check if sketch new does not overwrite an already existing .ino sketch file
      
      * Add --overwrite flag to sketch new command
      
      Using the "--overwrite" flag, allows to create a new sketch overwriting an existing one.
      ab73719d
    • Cristian Maglie's avatar
      [breaking] Fixed detection of double-install using `lib install` with... · c5709162
      Cristian Maglie authored
      [breaking] Fixed detection of double-install using `lib install` with `--git-url` or `--zip-path` (#1983)
      
      * Remove useless logging
      
      The errors are already reported upstream via returned `err` value
      
      * librariesmanager.InstallPrerequisiteCheck signature change
      
      It now accepts library name and version as single arguments since we are
      going to use this function also for libraries not present in the index.
      
      * Added integration test
      
      * Fixed `lib install --git-url` pre-install checks
      
      Now it performs all the needed checks to avoid multiple installations.
      
      * Added test for double install with -.zip-path flag
      
      * Fixed `lib install --zip-path` pre-install checks
      
      Now it performs all the needed checks to avoid multiple installations
      
      * Simplified loop in LibraryInstall function
      
      * Factored some of the checks in LibrariesManager.InstallPrerequisiteCheck
      
      They were duplicated and spread around all the library install
      functions.
      
      * Refactored LibrariesManager.getLibrariesDir function
      
      This helped to find out 2 places where the `installDir` was unnecessary.
      
      * Factored all duplicated code for importing a library from a directory
      
      * Updated docs
      
      * Fixed integration test
      
      The installation folder is now taken from the `name` field in `library.properties`.
      
      * Update docs/UPGRADING.md
      Co-authored-by: default avatarUmberto Baldi <34278123+umbynos@users.noreply.github.com>
      Co-authored-by: default avatarUmberto Baldi <34278123+umbynos@users.noreply.github.com>
      c5709162
  18. 24 Nov, 2022 1 commit
  19. 22 Nov, 2022 3 commits
  20. 21 Nov, 2022 2 commits
    • Cristian Maglie's avatar
      Improve `board list` detection via cloud API (cache responses / do not error... · 06a3564d
      Cristian Maglie authored
      Improve `board list` detection via cloud API (cache responses / do not error on network failure) (#1982)
      
      * Slightly refactored apiByVidPid
      
      * Cache cloud-api response for 24h to improve responsiveness
      
      * Do not fail with errors in case of cloud-api is not available
      
      * Fixed linter warning...
      
      * Removed useless ErrNotFound from `apiByVidPid`
      
      The `apiByVidPid` function now masks the odd behavior of the builder-api
      returning an HTTP 404 if the request succeed but the result is empty.
      06a3564d
    • Silvano Cerza's avatar
      [breaking] Fix board attach CLI command, and remove gRPC API (#1930) · b1150e01
      Silvano Cerza authored
      * Remove board attach cli interface
      
      * Move tr function in separate file
      
      * Remove BoardAttach gRPC interface command
      
      * Remove BoardAttach calls from client_example
      
      * go mod tidy
      
      * Update board CLI command help text
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update dependency license metadata cache
      
      * Re-Implementation of 'board attach' command
      
      * Fixed comment indentation (gofmt)
      
      * Update UPGRADING.md
      
      * Added 'default_fqbn' and 'default_port' fields to sketch.yaml
      
      * Added functions to load and save sketch project files
      
      * Use sketch project file to determine default fqbn and port
      
      * Implement 'attach board' using sketch project file
      
      * Remove support for sketch.json
      
      * Updated documentation
      
      * Do not fully rewrite sketch.yaml when a key is automatically updated
      
      * Fixed 'board attach' command output
      
      * Do not write empty entries in sketch.yaml
      
      * Apply suggestions from code review
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Update docs/UPGRADING.md
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Other suggestions from code review
      
      * Updated UPGRADING.md
      
      This change is going into 0.30.0
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      Co-authored-by: default avatarCristian Maglie <c.maglie@arduino.cc>
      b1150e01
  21. 18 Nov, 2022 1 commit
  22. 16 Nov, 2022 6 commits
    • github-actions[bot]'s avatar
    • Cristian Maglie's avatar
      Fix download progress bar (not always displayed) (#1980) · 1fb5d144
      Cristian Maglie authored
      * Fix download progress bar (not always displayed)
      
      * Remove debug leftovers
      1fb5d144
    • Cristian Maglie's avatar
      Set `runtime.hardware.path` property during upload (#1978) · 8e1e16b3
      Cristian Maglie authored
      * Added integration test
      
      * Set runtime.hardware.path property during upload
      8e1e16b3
    • Cristian Maglie's avatar
    • MatteoPologruto's avatar
      [skip-changelog] Migrate tests from `test_core.py` to `core_test.go` (#1949) · f8506aa3
      MatteoPologruto authored
      * Migrate TestCoreSearchNoArgs from test_core.py to core_test.go
      
      * Migrate TestCoreUpdateIndexUrlNotFound from test_core.py to core_test.go
      
      * Migrate TestCoreUpdateIndexInternalServerError from test_core.py to core_test.go
      
      * Migrate TestCoreInstallWithoutUpdateIndex from test_core.py to core_test.go
      
      * Migrate TestCoreDownload from test_core.py to core_test.go
      
      * Migrate TestCoreInstall from test_core.py to core_test.go
      
      * Migrate TestCoreUninstall from test_core.py to core_test.go
      
      * Migrate TestCoreUninstallToolDependencyRemoval from test_core.py to core_test.go
      
      * Migrate TestCoreZipslip from test_core.py to core_test.go
      
      * Migrate TestCoreBrokenInstall from test_core.py to core_test.go
      
      * Migrate TestCoreUpdateWithLocalUrl from test_core.py to core_test.go
      
      * Migrate TestCoreSearchManuallyInstalledCoresNotPrinted from test_core.py to core_test.go
      
      * Migrate TestCoreListAllManuallyInstalledCore from test_core.py to core_test.go
      
      * Migrate TestCoreListUpdatableAllFlags from test_core.py to core_test.go
      
      * Migrate TestCoreUpgradeRemovesUnusedTools from test_core.py to core_test.go
      
      * Migrate TestCoreInstallRemovesUnusedTools from test_core.py to core_test.go
      
      * Migrate TestCoreListWithInstalledJson from test_core.py to core_test.go
      
      * Migrate TestCoreSearchSortedResults from test_core.py to core_test.go
      
      * Migrate TestCoreListSortedResults from test_core.py to core_test.go
      
      * Migrate TestCoreListDeprecatedPlatformWithInstalledJson from test_core.py to core_test.go
      
      * Migrate TestCoreListPlatformWithoutPlatformTxt from test_core.py to core_test.go
      
      * Migrate TestCoreWithMissingCustomBoardOptionsIsLoaded from test_core.py to core_test.go
      
      * Migrate TestCoreListOutdatedCore from test_core.py to core_test.go
      
      * Migrate TestCoreLoadingPackageManager from test_core.py to core_test.go
      
      * Migrate TestCoreIndexWithoutChecksum from test_core.py to core_test.go
      
      * Migrate TestCoreInstallEsp32 from test_core.py to core_test.go
      
      * Migrate TestCoreSearchUpdateIndexDelay from test_core.py to core_test.go
      
      * Migrate TestCoreDownloadMultiplePlatforms from test_core.py to core_test.go
      
      * Migrate TestCoreInstallCreatesInstalledJson to core_test.go and delete test_core.py
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      
      * Update internal/integrationtest/core/core_test.go
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      Co-authored-by: default avatarCristian Maglie <c.maglie@bug.st>
      f8506aa3
    • MatteoPologruto's avatar
      [skip-changelog] Migrate tests from `test_compile_part_4.py` to `compile_part_4_test.go` (#1924) · 0c823ea0
      MatteoPologruto authored
      * Migrate TestCompileWithLibrary from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithLibraryPriority from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestRecompileWithDifferentLibrary from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithConflictingLibrariesInclude from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithInvalidBuildOptionJson from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithEsp32BundledLibraries from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithEsp8266BundledLibraries from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestGenerateCompileCommandsJsonResilience from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileSketchWithTppFileInclude from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileSketchWithIppFileInclude from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithoutUploadAndFqbn from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileNonInstalledPlatformWithWrongPackagerAndArch from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithKnownPlatformNotInstalled from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileManuallyInstalledPlatformUsingBoardsLocalTxt from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithRelativeBuildPath from test_compile_part_4.py to compile_part_4_test.go
      
      * Migrate TestCompileWithFakeSecureBootCore to compile_part_4_test.go and delete test_compile_part_4.py
      
      * Rearrange compile tests to share the same environment
      0c823ea0
  23. 15 Nov, 2022 1 commit
  24. 14 Nov, 2022 1 commit